LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
record.hxx
Go to the documentation of this file.
1 
5 #ifndef TYPE_RECORD_HXX
6 # define TYPE_RECORD_HXX
7 
8 # include <type/record.hh>
9 # include <misc/contract.hh>
10 
11 namespace type
12 {
13  inline const Record::fields_type&
15  {
16  return fields_;
17  }
18 
19  inline void
20  Record::field_add(const Field& field)
21  {
22  fields_.push_back(field);
23  }
24 
25  inline void
26  Record::field_add(const misc::symbol name, const Type& type)
27  {
28  fields_.emplace_back(name, type);
29  }
30 
32  Record::begin() const
33  {
34  return fields_.begin();
35  }
36 
38  Record::end() const
39  {
40  return fields_.end();
41  }
42 } // namespace type
43 
44 #endif // !TYPE_RECORD_HXX