LibCT 2.0
|
00001 // ------------------------------------------------------------------ 00012 #ifndef _LIBCT_INTVALUE_H 00013 #define _LIBCT_INTVALUE_H 00014 00015 #include "TemplateVariable.h" 00016 00017 #include <string> 00018 #include <sstream> 00019 00020 namespace LibCT 00021 { 00023 class IntValue : public TemplateVariable<int> 00024 { 00025 public: 00027 IntValue(VariableContainer* pContainer, const std::string& name) 00028 : TemplateVariable(pContainer, name) 00029 { 00030 } 00031 00034 std::string ToString() const 00035 { 00036 std::ostringstream stream; 00037 stream << m_Value; 00038 return stream.str(); 00039 } 00040 00043 VariableType GetType() const 00044 { 00045 return VariableTypeInt; 00046 } 00047 00050 std::string GetTypeString() const 00051 { 00052 return "Int"; 00053 } 00054 }; 00055 } 00056 00057 #endif // _LIBCT_INTVALUE_H