summary refs log tree commit diff stats
path: root/generator/frame.h
blob: 3e15b398cd0b9da15cfd86239713ea870dbc6e4e (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
60
#ifndef FRAME_H_26770FF1
#define FRAME_H_26770FF1

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

namespace verbly {
  namespace generator {

    class frame {
    public:

      // Aliases

      using const_iterator = std::list<part>::const_iterator;

      // Constructor

      frame();

      // Duplication

      static frame duplicate(const frame& other);

      // Mutators

      void push_back(part fp);

      // Accessors

      int getId() const
      {
        return id_;
      }

      int getLength() const
      {
        return parts_.size();
      }

      const part& operator[](int index) const
      {
        return parts_.at(index);
      }

    private:

      static int nextId_;

      const int id_;

      std::vector<part> parts_;

    };

  };
};

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