Blender V2.61 - r43446

ErrorValue.h

Go to the documentation of this file.
00001 /*
00002  * ErrorValue.h: interface for the CErrorValue class.
00003  * Copyright (c) 1996-2000 Erwin Coumans <coockie@acm.org>
00004  *
00005  * Permission to use, copy, modify, distribute and sell this software
00006  * and its documentation for any purpose is hereby granted without fee,
00007  * provided that the above copyright notice appear in all copies and
00008  * that both that copyright notice and this permission notice appear
00009  * in supporting documentation.  Erwin Coumans makes no
00010  * representations about the suitability of this software for any
00011  * purpose.  It is provided "as is" without express or implied warranty.
00012  *
00013  */
00014 
00019 #if !defined _ERRORVALUE_H
00020 #define _ERRORVALUE_H
00021 
00022 #include "Value.h"
00023 
00024 class CErrorValue : public CPropValue  
00025 {
00026 
00027 public:
00028     virtual const STR_String & GetText();
00029     virtual double GetNumber();
00030     CErrorValue();
00031     CErrorValue(const char *errmsg);
00032     virtual ~CErrorValue();
00033     virtual CValue* Calc(VALUE_OPERATOR op, CValue* val);
00034     virtual CValue* CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val);
00035     virtual CValue* GetReplica();
00036 
00037 private:
00038     STR_String m_strErrorText;
00039 
00040 
00041 #ifdef WITH_CXX_GUARDEDALLOC
00042 public:
00043     void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CErrorValue"); }
00044     void operator delete( void *mem ) { MEM_freeN(mem); }
00045 #endif
00046 };
00047 
00048 #endif // !defined _ERRORVALUE_H
00049