summary refs log tree commit diff stats
path: root/generator/frame.h
blob: 411ce6cce9361fbd346c835f638795e4ecc8b445 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef FRAME_H_26770FF1
#define FRAME_H_26770FF1

#include <list>
#include "part.h"

namespace verbly {
  namespace generator {
    
    class database;
    
    class frame {
    public:
      
      // Aliases
      
      using const_iterator = std::list<part>::const_iterator;
      
      // Constructor
      
      frame();
      
      // Mutators
      
      void push_back(part fp);
      
      // Accessors
      
      int getId() const
      {
        return id_;
      }
      
      const_iterator begin() const
      {
        return std::begin(parts_);
      }
      
      const_iterator end() const
      {
        return std::end(parts_);
      }
      
    private:
      
      static int nextId_;
      
      const int id_;
      
      std::list<part> parts_;
      
    };
    
    database& operator<<(database& db, const frame& arg);
    
  };
};

#endif /* end of include guard: FRAME_H_26770FF1 */