aboutsummaryrefslogtreecommitdiff
path: root/src/Group.cpp
blob: 93a06887ba7aff72c1b17552fcb23b811595b9e0 (plain)
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
#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()
    {
        
    }

    void Group::addUser(const User *user)
    {
        users.push_back(user);
    }

    const string& Group::getName() const
    {
        return name;    
    }

    const vector<const User*>& Group::getUsers() const
    {
        return users;
    }
}