diff options
Diffstat (limited to 'verbly/lib/adverb.h')
-rw-r--r-- | verbly/lib/adverb.h | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/verbly/lib/adverb.h b/verbly/lib/adverb.h new file mode 100644 index 0000000..65e3c5c --- /dev/null +++ b/verbly/lib/adverb.h | |||
@@ -0,0 +1,95 @@ | |||
1 | #ifndef ADVERB_H_86F8302F | ||
2 | #define ADVERB_H_86F8302F | ||
3 | |||
4 | namespace verbly { | ||
5 | |||
6 | class adverb : public word { | ||
7 | private: | ||
8 | std::string _base_form; | ||
9 | std::string _comparative_form; | ||
10 | std::string _superlative_form; | ||
11 | |||
12 | friend class adverb_query; | ||
13 | |||
14 | public: | ||
15 | adverb(const data& _data, int _id); | ||
16 | |||
17 | std::string base_form() const; | ||
18 | std::string comparative_form() const; | ||
19 | std::string superlative_form() const; | ||
20 | |||
21 | bool has_comparative_form() const; | ||
22 | bool has_superlative_form() const; | ||
23 | |||
24 | adverb_query antonyms() const; | ||
25 | adverb_query synonyms() const; | ||
26 | adjective_query anti_mannernyms() const; | ||
27 | |||
28 | adverb_query& derived_from(const word& _w); | ||
29 | adverb_query& not_derived_from(const word& _w); | ||
30 | }; | ||
31 | |||
32 | class adverb_query { | ||
33 | public: | ||
34 | adverb_query(const data& _data); | ||
35 | |||
36 | adverb_query& limit(int _limit); | ||
37 | adverb_query& random(bool _random); | ||
38 | adverb_query& except(const adverb& _word); | ||
39 | adverb_query& rhymes_with(const word& _word); | ||
40 | adverb_query& has_pronunciation(bool _has_prn); | ||
41 | |||
42 | adverb_query& requires_comparative_form(bool _arg); | ||
43 | adverb_query& requires_superlative_form(bool _arg); | ||
44 | |||
45 | adverb_query& has_antonyms(bool _arg); | ||
46 | adverb_query& antonym_of(const adverb& _adv); | ||
47 | adverb_query& not_antonym_of(const adverb& _adv); | ||
48 | |||
49 | adverb_query& has_synonyms(bool _arg); | ||
50 | adverb_query& synonym_of(const adverb& _adv); | ||
51 | adverb_query& not_synonym_of(const adverb& _adv); | ||
52 | |||
53 | adverb_query& is_mannernymic(bool _arg); | ||
54 | adverb_query& mannernym_of(const adjective& _adj); | ||
55 | |||
56 | adverb_query& derived_from(const word& _w); | ||
57 | adverb_query& not_derived_from(const word& _w); | ||
58 | |||
59 | std::list<adverb> run() const; | ||
60 | |||
61 | const static int unlimited = -1; | ||
62 | |||
63 | private: | ||
64 | const data& _data; | ||
65 | int _limit = unlimited; | ||
66 | bool _random = false; | ||
67 | std::list<std::string> _rhymes; | ||
68 | std::list<adverb> _except; | ||
69 | bool _has_prn = false; | ||
70 | |||
71 | bool _requires_comparative_form = false; | ||
72 | bool _requires_superlative_form = false; | ||
73 | |||
74 | bool _has_antonyms = false; | ||
75 | std::list<adverb> _antonym_of; | ||
76 | std::list<adverb> _not_antonym_of; | ||
77 | |||
78 | bool _has_synonyms = false; | ||
79 | std::list<adverb> _synonym_of; | ||
80 | std::list<adverb> _not_synonym_of; | ||
81 | |||
82 | bool _is_mannernymic = false; | ||
83 | std::list<adjective> _mannernym_of; | ||
84 | |||
85 | std::list<adjective> _derived_from_adjective; | ||
86 | std::list<adjective> _not_derived_from_adjective; | ||
87 | std::list<adverb> _derived_from_adverb; | ||
88 | std::list<adverb> _not_derived_from_adverb; | ||
89 | std::list<noun> _derived_from_noun; | ||
90 | std::list<noun> _not_derived_from_noun; | ||
91 | }; | ||
92 | |||
93 | }; | ||
94 | |||
95 | #endif /* end of include guard: ADVERB_H_86F8302F */ | ||