From 1fd518d1c2b1d4e88ad88218b606a284b7128107 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Mon, 16 Oct 2017 11:19:23 -0400 Subject: Added length field to form table This commit contains a database update. --- lib/form.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'lib/form.h') 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 { return proper_; } + int getLength() const + { + if (!valid_) + { + throw std::domain_error("Bad access to uninitialized form"); + } + + return length_; + } + const std::vector& getPronunciations() const; // Convenience @@ -91,6 +101,7 @@ namespace verbly { static const field text; static const field complexity; static const field proper; + static const field length; operator filter() const { @@ -123,8 +134,9 @@ namespace verbly { int id_; std::string text_; - int complexity_ ; + int complexity_; bool proper_; + int length_; const database* db_; -- cgit 1.4.1