diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-02-01 21:15:13 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-08-18 23:25:12 +0200 |
commit | 1c7e6e074155499155adbbb651db1c66f1762ba2 (patch) | |
tree | c08a95e772c8e23228a2be78e308aba313034f26 /src/Group.cpp | |
parent | bd2bd91ac947a7b1f6d097d7efa4b0ab2041d4db (diff) |
Sync time with ntp server, starting with basic operations
Diffstat (limited to 'src/Group.cpp')
-rw-r--r-- | src/Group.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/Group.cpp b/src/Group.cpp index 213a0bb..c87be1e 100644 --- a/src/Group.cpp +++ b/src/Group.cpp @@ -1,8 +1,17 @@ #include "../include/Group.hpp" #include "../include/User.hpp" +using namespace std; + namespace odhtdb { + Group::Group(const string &_name) : + name(_name) + { + if(name.size() > 255) + throw GroupNameTooLongException(name); + } + Group::~Group() { for(User *user : users) @@ -10,4 +19,19 @@ namespace odhtdb delete user; } } + + void Group::addUser(User *user) + { + users.push_back(user); + } + + const string& Group::getName() const + { + return name; + } + + const vector<User*>& Group::getUsers() const + { + return users; + } }
\ No newline at end of file |