The Pedigree Project  0.1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Group Class Reference

#include <Group.h>

+ Collaboration diagram for Group:

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 &)
 
Groupoperator= (const Group &)
 

Private Attributes

size_t m_Gid
 
String m_Name
 
List< User * > m_Users
 

Detailed Description

Defines the properties of a Group on the system.

Definition at line 32 of file Group.h.

Constructor & Destructor Documentation

Group::Group ( size_t  gid,
String  name 
)

Constructor.

Parameters
gidSystem-wide unique group ID.
nameGroup name.

Definition at line 24 of file Group.cc.

Group::Group ( )
private

It doesn't make sense for a Group to have public default or copy constructors.

Member Function Documentation

size_t Group::getId ( )
inline

Returns the GID.

Definition at line 51 of file Group.h.

Referenced by ProcFs::addProcess(), Process::getUserId(), and WaitCleanup::terminated().

+ Here is the caller graph for this function:

String Group::getName ( )
inline

Returns the group name.

Definition at line 56 of file Group.h.

Referenced by UserManager::getGroup(), and WaitCleanup::terminated().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

void Group::leave ( User pUser)

Member Data Documentation

size_t Group::m_Gid
private

Group ID.

Definition at line 69 of file Group.h.

String Group::m_Name
private

Name.

Definition at line 71 of file Group.h.

List<User *> Group::m_Users
private

Group contents.

Definition at line 73 of file Group.h.

Referenced by isMember(), join(), and leave().


The documentation for this class was generated from the following files: