diff options
Diffstat (limited to 'lib/word.h')
-rw-r--r-- | lib/word.h | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/lib/word.h b/lib/word.h index ddcabe4..8a333a4 100644 --- a/lib/word.h +++ b/lib/word.h | |||
@@ -7,7 +7,7 @@ | |||
7 | #include "filter.h" | 7 | #include "filter.h" |
8 | #include "notion.h" | 8 | #include "notion.h" |
9 | #include "lemma.h" | 9 | #include "lemma.h" |
10 | #include "group.h" | 10 | #include "frame.h" |
11 | 11 | ||
12 | struct sqlite3_stmt; | 12 | struct sqlite3_stmt; |
13 | 13 | ||
@@ -97,17 +97,9 @@ namespace verbly { | |||
97 | 97 | ||
98 | const lemma& getLemma() const; | 98 | const lemma& getLemma() const; |
99 | 99 | ||
100 | bool hasGroup() const | 100 | bool hasFrames() const; |
101 | { | ||
102 | if (!valid_) | ||
103 | { | ||
104 | throw std::domain_error("Bad access to uninitialized word"); | ||
105 | } | ||
106 | 101 | ||
107 | return hasGroup_; | 102 | const std::vector<frame>& getFrames() const; |
108 | } | ||
109 | |||
110 | const group& getGroup() const; | ||
111 | 103 | ||
112 | // Convenience accessors | 104 | // Convenience accessors |
113 | 105 | ||
@@ -136,7 +128,7 @@ namespace verbly { | |||
136 | 128 | ||
137 | static const field notion; | 129 | static const field notion; |
138 | static const field lemma; | 130 | static const field lemma; |
139 | static const field group; | 131 | static const field frame; |
140 | 132 | ||
141 | // Relationships with self | 133 | // Relationships with self |
142 | 134 | ||
@@ -161,6 +153,9 @@ namespace verbly { | |||
161 | static const field regionalDomains; | 153 | static const field regionalDomains; |
162 | 154 | ||
163 | private: | 155 | private: |
156 | |||
157 | void initializeFrames() const; | ||
158 | |||
164 | bool valid_ = false; | 159 | bool valid_ = false; |
165 | 160 | ||
166 | int id_; | 161 | int id_; |
@@ -176,7 +171,9 @@ namespace verbly { | |||
176 | 171 | ||
177 | mutable class notion notion_; | 172 | mutable class notion notion_; |
178 | mutable class lemma lemma_; | 173 | mutable class lemma lemma_; |
179 | mutable class group group_; | 174 | |
175 | mutable bool initializedFrames_ = false; | ||
176 | mutable std::vector<class frame> frames_; | ||
180 | 177 | ||
181 | }; | 178 | }; |
182 | 179 | ||