summary refs log tree commit diff stats
path: root/generator/form.h
diff options
context:
space:
mode:
Diffstat (limited to 'generator/form.h')
-rw-r--r--generator/form.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/generator/form.h b/generator/form.h new file mode 100644 index 0000000..5576035 --- /dev/null +++ b/generator/form.h
@@ -0,0 +1,71 @@
1#ifndef FORM_H_7EFBC970
2#define FORM_H_7EFBC970
3
4#include <string>
5#include <set>
6
7namespace verbly {
8 namespace generator {
9
10 class pronunciation;
11 class database;
12
13 class form {
14 public:
15
16 // Constructor
17
18 explicit form(std::string text);
19
20 // Mutators
21
22 void addPronunciation(const pronunciation& p);
23
24 // Accessors
25
26 int getId() const
27 {
28 return id_;
29 }
30
31 std::string getText() const
32 {
33 return text_;
34 }
35
36 int getComplexity() const
37 {
38 return complexity_;
39 }
40
41 bool isProper() const
42 {
43 return proper_;
44 }
45
46 std::set<const pronunciation*> getPronunciations() const
47 {
48 return pronunciations_;
49 }
50
51 private:
52
53 static int nextId_;
54
55 const int id_;
56 const std::string text_;
57 const int complexity_;
58 const bool proper_;
59
60 std::set<const pronunciation*> pronunciations_;
61
62 };
63
64 // Serializer
65
66 database& operator<<(database& db, const form& arg);
67
68 };
69};
70
71#endif /* end of include guard: FORM_H_7EFBC970 */