summary refs log tree commit diff stats
path: root/generator/group.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-01-24 21:50:39 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-01-24 21:50:39 -0500
commite1fa4a088dd95caef22045f905a9d5d22b71bef0 (patch)
tree09f30eadcbb5a7352f19a6070dc363298f16aff8 /generator/group.h
parent0ba0fff06fb679f5cabedd52257fc0c38a600279 (diff)
downloadverbly-e1fa4a088dd95caef22045f905a9d5d22b71bef0.tar.gz
verbly-e1fa4a088dd95caef22045f905a9d5d22b71bef0.tar.bz2
verbly-e1fa4a088dd95caef22045f905a9d5d22b71bef0.zip
Whitespace changes
Diffstat (limited to 'generator/group.h')
-rw-r--r--generator/group.h52
1 files changed, 26 insertions, 26 deletions
diff --git a/generator/group.h b/generator/group.h index 5084ea4..83f40c2 100644 --- a/generator/group.h +++ b/generator/group.h
@@ -9,71 +9,71 @@
9 9
10namespace verbly { 10namespace verbly {
11 namespace generator { 11 namespace generator {
12 12
13 class frame; 13 class frame;
14 class database; 14 class database;
15 15
16 class group { 16 class group {
17 public: 17 public:
18 18
19 // Constructor 19 // Constructor
20 20
21 group(); 21 group();
22 22
23 // Mutators 23 // Mutators
24 24
25 void setParent(const group& parent); 25 void setParent(const group& parent);
26 26
27 void addRole(role r); 27 void addRole(role r);
28 28
29 void addFrame(const frame& f); 29 void addFrame(const frame& f);
30 30
31 // Accessors 31 // Accessors
32 32
33 int getId() const 33 int getId() const
34 { 34 {
35 return id_; 35 return id_;
36 } 36 }
37 37
38 bool hasParent() const 38 bool hasParent() const
39 { 39 {
40 return (parent_ != nullptr); 40 return (parent_ != nullptr);
41 } 41 }
42 42
43 const group& getParent() const 43 const group& getParent() const
44 { 44 {
45 // Calling code should always call hasParent first 45 // Calling code should always call hasParent first
46 assert(parent_ != nullptr); 46 assert(parent_ != nullptr);
47 47
48 return *parent_; 48 return *parent_;
49 } 49 }
50 50
51 std::set<std::string> getRoles() const; 51 std::set<std::string> getRoles() const;
52 52
53 const role& getRole(std::string name) const; 53 const role& getRole(std::string name) const;
54 54
55 std::set<const frame*> getFrames() const; 55 std::set<const frame*> getFrames() const;
56 56
57 private: 57 private:
58 58
59 static int nextId_; 59 static int nextId_;
60 60
61 const int id_; 61 const int id_;
62 62
63 const group* parent_ = nullptr; 63 const group* parent_ = nullptr;
64 std::map<std::string, role> roles_; 64 std::map<std::string, role> roles_;
65 std::set<const frame*> frames_; 65 std::set<const frame*> frames_;
66 66
67 // Caches 67 // Caches
68 68
69 std::set<std::string> roleNames_; 69 std::set<std::string> roleNames_;
70 70
71 }; 71 };
72 72
73 // Serializer 73 // Serializer
74 74
75 database& operator<<(database& db, const group& arg); 75 database& operator<<(database& db, const group& arg);
76 76
77 }; 77 };
78}; 78};
79 79