Mark Slee | 3198572 | 2006-05-24 21:45:31 +0000 | [diff] [blame] | 1 | #ifndef T_CONSTANT_H |
| 2 | #define T_CONSTANT_H |
| 3 | |
| 4 | #include <string> |
| 5 | |
| 6 | class t_constant { |
| 7 | public: |
| 8 | t_constant(std::string name) : |
| 9 | name_(name), has_value_(false), value_(0) {} |
| 10 | |
| 11 | t_constant(std::string name, int value) : |
| 12 | name_(name), has_value_(true), value_(value) {} |
| 13 | |
| 14 | ~t_constant() {} |
| 15 | |
| 16 | const std::string& get_name() { return name_; } |
| 17 | bool has_value() { return has_value_; } |
| 18 | int get_value() { return value_; } |
| 19 | |
| 20 | private: |
| 21 | std::string name_; |
| 22 | bool has_value_; |
| 23 | int value_; |
| 24 | }; |
| 25 | |
| 26 | #endif |