blob: e39e42029859c1f4f77dae5eddc81792d97e94f6 [file] [log] [blame]
Mark Sleee8540632006-05-30 09:24:40 +00001#ifndef T_SET_H
2#define T_SET_H
3
4#include "t_type.h"
5
Mark Sleef5377b32006-10-10 01:42:59 +00006/**
7 * A set is a lightweight container type that just wraps another data type.
8 *
9 * @author Mark Slee <mcslee@facebook.com>
10 */
Mark Sleee8540632006-05-30 09:24:40 +000011class t_set : public t_type {
12 public:
Mark Sleef5377b32006-10-10 01:42:59 +000013 t_set(t_type* elem_type) :
14 elem_type_(elem_type) {}
Mark Sleee8540632006-05-30 09:24:40 +000015
Mark Sleef5377b32006-10-10 01:42:59 +000016 t_type* get_elem_type() const {
17 return elem_type_;
18 }
19
20 bool is_set() const {
21 return true;
22 }
Mark Sleee8540632006-05-30 09:24:40 +000023
24 private:
25 t_type* elem_type_;
26};
27
28#endif