summary refs log tree commit diff stats
path: root/lib/form.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-10-16 11:19:23 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-10-16 11:19:23 -0400
commit1fd518d1c2b1d4e88ad88218b606a284b7128107 (patch)
tree220bbea3845cdd8058c3a4c44b8acb6687803cc3 /lib/form.h
parent59eab842de02b2b2ba8bf53e2214b558457e6356 (diff)
downloadverbly-1fd518d1c2b1d4e88ad88218b606a284b7128107.tar.gz
verbly-1fd518d1c2b1d4e88ad88218b606a284b7128107.tar.bz2
verbly-1fd518d1c2b1d4e88ad88218b606a284b7128107.zip
Added length field to form table
This commit contains a database update.
Diffstat (limited to 'lib/form.h')
-rw-r--r--lib/form.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/form.h b/lib/form.h index e3e1185..479672f 100644 --- a/lib/form.h +++ b/lib/form.h
@@ -73,6 +73,16 @@ namespace verbly {
73 return proper_; 73 return proper_;
74 } 74 }
75 75
76 int getLength() const
77 {
78 if (!valid_)
79 {
80 throw std::domain_error("Bad access to uninitialized form");
81 }
82
83 return length_;
84 }
85
76 const std::vector<pronunciation>& getPronunciations() const; 86 const std::vector<pronunciation>& getPronunciations() const;
77 87
78 // Convenience 88 // Convenience
@@ -91,6 +101,7 @@ namespace verbly {
91 static const field text; 101 static const field text;
92 static const field complexity; 102 static const field complexity;
93 static const field proper; 103 static const field proper;
104 static const field length;
94 105
95 operator filter() const 106 operator filter() const
96 { 107 {
@@ -123,8 +134,9 @@ namespace verbly {
123 134
124 int id_; 135 int id_;
125 std::string text_; 136 std::string text_;
126 int complexity_ ; 137 int complexity_;
127 bool proper_; 138 bool proper_;
139 int length_;
128 140
129 const database* db_; 141 const database* db_;
130 142