blob: 239868f211c5112cbd03d76ba79372d9fdf35a0e [file] [log] [blame]
Mark Sleee8540632006-05-30 09:24:40 +00001#ifndef T_SET_H
2#define T_SET_H
3
Mark Slee4f8da1d2006-10-12 02:47:27 +00004#include "t_container.h"
Mark Sleee8540632006-05-30 09:24:40 +00005
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 Slee4f8da1d2006-10-12 02:47:27 +000011class t_set : public t_container {
Mark Sleee8540632006-05-30 09:24:40 +000012 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