00001 00008 #ifndef VALUE_HH 00009 #define VALUE_HH 00010 00011 #include"untyped_value.hh" 00012 00013 namespace my_lib { 00014 namespace internal { 00015 00025 template<typename T> 00026 struct Value : untyped_value { 00027 Value(const T& val) : val(val) {} 00028 T val; 00029 untyped_value* clone() const { 00030 return new Value(val); 00031 } 00032 std::ostream& output(std::ostream& o) const{ 00033 return (o << val); 00034 } 00035 00036 }; 00037 }// fin internal 00038 }//fin my_lib 00039 #endif //VALUE_HH