about summary refs log tree commit diff stats
path: root/verbly/lib/data.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2016-03-16 22:57:15 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2016-03-16 22:57:15 -0400
commit29c6d78edb88a38c2bfde54fc7ecccc691bbef30 (patch)
tree21d458d02337420dfb1fd5eda4cffada38f9642a /verbly/lib/data.cpp
parent8b1333d0e6e2b9a5014bdbff2987d899f5413fee (diff)
downloadfurries-29c6d78edb88a38c2bfde54fc7ecccc691bbef30.tar.gz
furries-29c6d78edb88a38c2bfde54fc7ecccc691bbef30.tar.bz2
furries-29c6d78edb88a38c2bfde54fc7ecccc691bbef30.zip
Added verbly submodule
Diffstat (limited to 'verbly/lib/data.cpp')
-rw-r--r--verbly/lib/data.cpp50
1 files changed, 0 insertions, 50 deletions
diff --git a/verbly/lib/data.cpp b/verbly/lib/data.cpp deleted file mode 100644 index 57a8850..0000000 --- a/verbly/lib/data.cpp +++ /dev/null
@@ -1,50 +0,0 @@
1#include "verbly.h"
2
3namespace verbly {
4
5 data::data(std::string datafile)
6 {
7 if (sqlite3_open_v2(datafile.c_str(), &ppdb, SQLITE_OPEN_READONLY, NULL) != SQLITE_OK)
8 {
9 throw std::invalid_argument(sqlite3_errmsg(ppdb));
10 }
11 }
12
13 data::data(data&& other)
14 {
15 ppdb = other.ppdb;
16 }
17
18 data& data::operator=(data&& other)
19 {
20 ppdb = other.ppdb;
21
22 return *this;
23 }
24
25 data::~data()
26 {
27 sqlite3_close_v2(ppdb);
28 }
29
30 verb_query data::verbs() const
31 {
32 return verb_query(*this);
33 }
34
35 adjective_query data::adjectives() const
36 {
37 return adjective_query(*this);
38 }
39
40 adverb_query data::adverbs() const
41 {
42 return adverb_query(*this);
43 }
44
45 noun_query data::nouns() const
46 {
47 return noun_query(*this);
48 }
49
50};