Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 1 | #ifndef T_SET_H |
2 | #define T_SET_H | ||||
3 | |||||
Mark Slee | 4f8da1d | 2006-10-12 02:47:27 +0000 | [diff] [blame^] | 4 | #include "t_container.h" |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 5 | |
Mark Slee | f5377b3 | 2006-10-10 01:42:59 +0000 | [diff] [blame] | 6 | /** |
7 | * A set is a lightweight container type that just wraps another data type. | ||||
8 | * | ||||
9 | * @author Mark Slee <mcslee@facebook.com> | ||||
10 | */ | ||||
Mark Slee | 4f8da1d | 2006-10-12 02:47:27 +0000 | [diff] [blame^] | 11 | class t_set : public t_container { |
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 12 | public: |
Mark Slee | f5377b3 | 2006-10-10 01:42:59 +0000 | [diff] [blame] | 13 | t_set(t_type* elem_type) : |
14 | elem_type_(elem_type) {} | ||||
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 15 | |
Mark Slee | f5377b3 | 2006-10-10 01:42:59 +0000 | [diff] [blame] | 16 | t_type* get_elem_type() const { |
17 | return elem_type_; | ||||
18 | } | ||||
19 | |||||
20 | bool is_set() const { | ||||
21 | return true; | ||||
22 | } | ||||
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 23 | |
24 | private: | ||||
25 | t_type* elem_type_; | ||||
26 | }; | ||||
27 | |||||
28 | #endif |