summary refs log tree commit diff stats
path: root/lib/frame.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/frame.h')
-rw-r--r--lib/frame.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/lib/frame.h b/lib/frame.h index 97473a0..36e179e 100644 --- a/lib/frame.h +++ b/lib/frame.h
@@ -41,6 +41,16 @@ namespace verbly {
41 return id_; 41 return id_;
42 } 42 }
43 43
44 int getLength() const
45 {
46 if (!valid_)
47 {
48 throw std::domain_error("Bad access to uninitialized frame");
49 }
50
51 return length_;
52 }
53
44 const std::vector<part>& getParts() const 54 const std::vector<part>& getParts() const
45 { 55 {
46 if (!valid_) 56 if (!valid_)
@@ -61,6 +71,8 @@ namespace verbly {
61 71
62 static const field id; 72 static const field id;
63 73
74 static const field length;
75
64 operator filter() const 76 operator filter() const
65 { 77 {
66 if (!valid_) 78 if (!valid_)
@@ -73,13 +85,18 @@ namespace verbly {
73 85
74 // Relationships to other objects 86 // Relationships to other objects
75 87
76 static const field group; 88 static const field word;
89
90 static field part();
91 static field part(int index);
77 92
78 private: 93 private:
79 bool valid_ = false; 94 bool valid_ = false;
80 95
81 int id_; 96 int id_;
82 std::vector<part> parts_; 97 int groupId_;
98 int length_;
99 std::vector<class part> parts_;
83 100
84 const database* db_; 101 const database* db_;
85 102