diff options
Diffstat (limited to 'generator/lemma.h')
-rw-r--r-- | generator/lemma.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/generator/lemma.h b/generator/lemma.h new file mode 100644 index 0000000..6452e08 --- /dev/null +++ b/generator/lemma.h | |||
@@ -0,0 +1,58 @@ | |||
1 | #ifndef LEMMA_H_D73105A7 | ||
2 | #define LEMMA_H_D73105A7 | ||
3 | |||
4 | #include <string> | ||
5 | #include <map> | ||
6 | #include <set> | ||
7 | #include "enums.h" | ||
8 | |||
9 | namespace verbly { | ||
10 | namespace generator { | ||
11 | |||
12 | class database; | ||
13 | class form; | ||
14 | |||
15 | class lemma { | ||
16 | public: | ||
17 | |||
18 | // Constructors | ||
19 | |||
20 | explicit lemma(const form& baseForm); | ||
21 | |||
22 | // Mutators | ||
23 | |||
24 | void addInflection(inflection type, const form& f); | ||
25 | |||
26 | // Accessors | ||
27 | |||
28 | int getId() const | ||
29 | { | ||
30 | return id_; | ||
31 | } | ||
32 | |||
33 | const form& getBaseForm() const | ||
34 | { | ||
35 | return baseForm_; | ||
36 | } | ||
37 | |||
38 | std::set<const form*> getInflections(inflection type) const; | ||
39 | |||
40 | private: | ||
41 | |||
42 | static int nextId_; | ||
43 | |||
44 | const int id_; | ||
45 | const form& baseForm_; | ||
46 | |||
47 | std::map<inflection, std::set<const form*>> inflections_; | ||
48 | |||
49 | }; | ||
50 | |||
51 | // Serializer | ||
52 | |||
53 | database& operator<<(database& db, const lemma& arg); | ||
54 | |||
55 | }; | ||
56 | }; | ||
57 | |||
58 | #endif /* end of include guard: LEMMA_H_D73105A7 */ | ||