LibCT 2.0

Include/DoubleValue.h

Go to the documentation of this file.
00001 // ------------------------------------------------------------------
00012 #ifndef _LIBCT_DOUBLEVALUE_H
00013 #define _LIBCT_DOUBLEVALUE_H
00014 
00015 #include "TemplateVariable.h"
00016 
00017 #include <string>
00018 #include <sstream>
00019 
00020 namespace LibCT
00021 {
00023         class DoubleValue : public TemplateVariable<double>
00024         {
00025         public:
00027                 DoubleValue(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 VariableTypeDouble;
00046                 }
00047 
00050                 std::string     GetTypeString() const
00051                 {
00052                         return "Double";
00053                 }
00054         };
00055 }
00056 
00057 
00058 #endif // _LIBCT_DOUBLEVALUE_H