-
Notifications
You must be signed in to change notification settings - Fork 0
/
UML.txt
149 lines (143 loc) · 6.33 KB
/
UML.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
+-----------------------------------+
| AskMeSystem |
+-----------------------------------+
| - userManager |
| - questionManager |
+-----------------------------------+
| + load_data_base(bool) |
| + reset_currentUser_questions() |
| + run() |
+-----------------------------------+
+---------------------------------------------------------+
| HelperFunction |
+---------------------------------------------------------+
| + read_line_from_file(string): vector<string> |
| + write_line_on_file(string, vector<string>, int) const |
| + split_string(string, char): vector<string> |
| + to_int(string): int |
+---------------------------------------------------------+
+-------------------------------------------+
| Question |
+-------------------------------------------+
| - question_id |
| - parent_question_id |
| - from_user_id |
| - to_user_id |
| - is_anonymous_questions |
| - question_text |
| - answer_text |
+-------------------------------------------+
| + Question() |
| + Question(string) |
| + to_string() const: string |
| + print_to_question() const |
| + print_from_question() const |
| + print_feed_question() const |
| + get_question_id() const: int |
| + set_question_id(int&) |
| + get_parent_question_id() const: int |
| + set_parent_question_id(int&) |
| + get_from_user_id() const: int |
| + set_from_user_id(int&) |
| + get_to_user_id() const: int |
| + set_to_user_id(int&) |
| + get_is_anonymous_questions() const: int |
| + set_is_anonymous_questions(int&) |
| + get_question_text() const: string |
| + set_question_text(string&) |
| + get_answer_text() const: string |
| + set_answer_text(string&) |
+-------------------------------------------+
+-------------------------------------------------------------------------+
| QuestionManager |
+-------------------------------------------------------------------------+
| - question_id_to_question_ids_thread: map<int, vector<int>> |
| - question_id_to_QuestionObject: map<int, Question> |
| - last_id: int |
+-------------------------------------------------------------------------+
| + QuestionManager() |
| + load_data_base() |
| + get_user_to_questions(const User&) const: vector<int> |
| + get_user_from_questions(const User&) const: vector<pair<int, int>> |
| + print_user_to_question(User&) |
| + print_user_from_question(User&) |
| + ask_question(User&, pair<int, int>&) |
| + answer_question(User&, QuestionManager&) |
| + delete_question(User&, QuestionManager&) |
| + list_feed() const |
| + update_data_base() |
| + get_question_id_to_question_ids_thread() const: map<int, vector<int>> |
| + set_question_id_to_question_ids_thread(map<int, vector<int>>&) |
| + get_question_id_to_QuestionObject() const: map<int, Question> |
| + set_question_id_to_QuestionObject(map<int, Question>&) |
| + get_last_id() const: int |
| + set_last_id(int&) |
+-------------------------------------------------------------------------+
+--------------------------------------------------------------------+
| User |
+--------------------------------------------------------------------+
| - user_id |
| - user_name |
| - password |
| - name |
| - email |
| - allow_anonymous_questions |
| - question_id_from_me: vector<int> |
| - question_id_to_question_ids_thread: map<int, vector<int>> |
+--------------------------------------------------------------------+
| + User() |
| + User(string) |
| + to_string() const: string |
| + print() const |
| + reset_to_questions(const vector<int>&) |
| + reset_from_questions(const vector<pair<int, int>>&) |
| + get_user_id() const: int |
| + set_user_id(int&) |
| + get_user_name() const: string |
| + set_user_name(string&) |
| + get_password() const: string |
| + set_password(string&) |
| + get_name() const: string |
| + set_name(string&) |
| + get_email() const: string |
| + set_email(string&) |
| + get_allow_anonymous_questions() const: int |
| + set_allow_anonymous_questions(int&) |
| + get_question_id_from_me(): vector<int>& |
| + set_question_id_from_me(vector<int>&) |
| + get_question_id_to_question_ids_thread(): map<int, vector<int>>& |
| + set_question_id_to_question_ids_thread(map<int, vector<int>>&) |
+--------------------------------------------------------------------+
+-----------------------------------------------------------+
| UserManager |
+-----------------------------------------------------------+
| - user_name_to_UserObject: map<string, User> |
| - current_user: User |
| - last_id: int |
+-----------------------------------------------------------+
| + UserManager() |
| + load_data_base() |
| + log_in() |
| + sign_up() |
| + reset_from_questions(const vector<pair<int, int>>&) |
| + reset_to_questions(const vector<int>&) |
| + list_user_names_ids() |
| + read_user_id(): pair<int, int>& |
| + update_data_base(User&) |
| + get_user_name_to_UserObject() const: map<string, User> |
| + set_user_name_to_UserObject(map<string, User>&) |
| + get_current_user(): User& |
| + set_current_user(User&) |
| + get_last_id() const: int |
| + set_last_id(int&) |
+-----------------------------------------------------------+
+---------------------------------------------------+
| View |
+---------------------------------------------------+
| + show_read_menu(vector<string>): int |
| + read_int(int, int): int |
| + read_question_id(User&, QuestionManager&): int |
| + read_question_id_thread(User&): int |
| + access_system(UserManager&) |
| + menu() const: vector<string> |
+---------------------------------------------------+