The Pedigree Project
0.1
|
#include <Group.h>
Public Member Functions | |
Group (size_t gid, String name) | |
void | join (User *pUser) |
void | leave (User *pUser) |
bool | isMember (User *pUser) |
size_t | getId () |
String | getName () |
Private Member Functions | |
Group () | |
Group (const Group &) | |
Group & | operator= (const Group &) |
Private Attributes | |
size_t | m_Gid |
String | m_Name |
List< User * > | m_Users |
Group::Group | ( | size_t | gid, |
String | name | ||
) |
|
private |
It doesn't make sense for a Group to have public default or copy constructors.
|
inline |
Returns the GID.
Definition at line 51 of file Group.h.
Referenced by ProcFs::addProcess(), Process::getUserId(), and WaitCleanup::terminated().
|
inline |
Returns the group name.
Definition at line 56 of file Group.h.
Referenced by UserManager::getGroup(), and WaitCleanup::terminated().
bool Group::isMember | ( | User * | pUser | ) |
Queries user membership.
Definition at line 49 of file Group.cc.
References List< T, nodePoolSize >::begin(), List< T, nodePoolSize >::end(), and m_Users.
void Group::join | ( | User * | pUser | ) |
Adds a user.
Definition at line 32 of file Group.cc.
References m_Users, and List< T, nodePoolSize >::pushBack().
Referenced by UserManager::getGroup().
void Group::leave | ( | User * | pUser | ) |
Removes a user.
Definition at line 37 of file Group.cc.
References List< T, nodePoolSize >::begin(), List< T, nodePoolSize >::end(), List< T, nodePoolSize >::erase(), and m_Users.