Mark Slee | e9ce01c | 2007-05-16 02:29:53 +0000 | [diff] [blame] | 1 | // Copyright (c) 2006- Facebook |
| 2 | // Distributed under the Thrift Software License |
| 3 | // |
| 4 | // See accompanying file LICENSE or visit the Thrift site at: |
| 5 | // http://developers.facebook.com/thrift/ |
| 6 | |
Mark Slee | 4f8da1d | 2006-10-12 02:47:27 +0000 | [diff] [blame] | 7 | #ifndef T_CONTAINER_H |
| 8 | #define T_CONTAINER_H |
| 9 | |
| 10 | #include "t_type.h" |
| 11 | |
| 12 | class t_container : public t_type { |
| 13 | public: |
| 14 | t_container() : |
| 15 | cpp_name_(), |
| 16 | has_cpp_name_(false) {} |
| 17 | |
| 18 | virtual ~t_container() {} |
| 19 | |
| 20 | void set_cpp_name(std::string cpp_name) { |
| 21 | cpp_name_ = cpp_name; |
| 22 | has_cpp_name_ = true; |
| 23 | } |
| 24 | |
| 25 | bool has_cpp_name() { |
| 26 | return has_cpp_name_; |
| 27 | } |
| 28 | |
| 29 | std::string get_cpp_name() { |
| 30 | return cpp_name_; |
| 31 | } |
| 32 | |
| 33 | bool is_container() const { |
| 34 | return true; |
| 35 | } |
| 36 | |
| 37 | private: |
| 38 | std::string cpp_name_; |
| 39 | bool has_cpp_name_; |
| 40 | |
| 41 | }; |
| 42 | |
| 43 | #endif |