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