00001 // VoidValue.h: interface for the CVoidValue class. 00002 #ifndef __VOIDVALUE_H__ 00003 #define __VOIDVALUE_H__ 00004 00005 #include "Value.h" 00006 00007 00008 // 00009 // Void value, used to transport *any* type of data 00010 // 00011 class CVoidValue : public CPropValue 00012 { 00013 //PLUGIN_DECLARE_SERIAL (CVoidValue,CValue) 00014 00015 public: 00017 CVoidValue() : m_pAnything(NULL), m_bDeleteOnDestruct(false) { } 00018 CVoidValue(void * voidptr, bool bDeleteOnDestruct, AllocationTYPE alloctype) : m_pAnything(voidptr), m_bDeleteOnDestruct(bDeleteOnDestruct) { if (alloctype == STACKVALUE) CValue::DisableRefCount(); } 00019 virtual ~CVoidValue(); // Destruct void value, delete memory if we're owning it 00020 00022 virtual const CCString & GetText(); // Get string description of void value (unimplemented) 00023 virtual float GetNumber() { return -1; } 00024 00026 virtual CValue* Calc(VALUE_OPERATOR op, CValue *val); 00027 virtual CValue* CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue* val); 00028 00030 virtual CValue* GetReplica(); 00031 00033 bool m_bDeleteOnDestruct; 00034 void* m_pAnything; 00035 }; 00036 00037 #endif // !defined _VOIDVALUE_H