blob: 304bb1684be6a800d243d0128389aa8dcaf0a51b [file] [log] [blame]
Mark Slee31985722006-05-24 21:45:31 +00001#ifndef T_FIELD_H
2#define T_FIELD_H
3
4#include <string>
5
6/**
7 * Class to represent a field in a thrift structure or in a set of arguments
8 * to a thrift function.
9 *
10 * @author Mark Slee <mcslee@facebook.com>
11 */
12class t_field {
13 public:
14 t_field(t_type* type, std::string name, uint32_t key) :
15 type_(type), name_(name), key_(key) {}
16
17 ~t_field() {}
18
19 t_type* get_type() const { return type_; }
20 const std::string& get_name() const { return name_; }
21 uint32_t get_key() const { return key_; }
22
23 private:
24 t_type* type_;
25 std::string name_;
26 uint32_t key_;
27};
28
29#endif