nis-util  1.0.D108
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
colon_group::record Class Reference

#include <group.h>

Public Types

typedef boost::shared_ptr< recordpointer
typedef std::vector< rcstringmembers_t

Public Member Functions

 ~record ()
const source_locationget_source_location (void) const
rcstring get_name (void) const
rcstring get_password (void) const
rcstring get_gid (void) const
long get_gid_binary (void) const
const members_tget_members (void) const
rcstring get_use_instead (void) const
bool is_members_only (void) const
rcstring representation (void) const
void append_member (const rcstring &user_name)
bool is_member (const rcstring &user_name) const

Static Public Member Functions

static pointer create (const source_location &locn, const rcstring &name, const rcstring &password, const rcstring &gid, const members_t &members)

Private Member Functions

 record (const source_location &locn, const rcstring &name, const rcstring &password, const rcstring &gid, const members_t &members)

Private Attributes

source_location locn
rcstring name
rcstring password
rcstring gid
members_t members
rcstring use_instead
bool members_only

Detailed Description

The record class is used to represent a group file entry. Values of this type are returned by the get method.

Definition at line 54 of file group.h.


Member Typedef Documentation

Definition at line 64 of file group.h.

typedef boost::shared_ptr<record> colon_group::record::pointer

Definition at line 57 of file group.h.


Constructor & Destructor Documentation

The destructor.

Definition at line 103 of file group.cc.

colon_group::record::record ( const source_location locn,
const rcstring name,
const rcstring password,
const rcstring gid,
const members_t members 
) [private]

The constructor. It is private on purpose, use the create class method instead.

Parameters:
locnThe source file location of this record.
nameThe name of the group.
passwordThe password of the group.
gidThe group ID of the group.
membersThe members (by user name) of the group.

Definition at line 108 of file group.cc.


Member Function Documentation

void colon_group::record::append_member ( const rcstring user_name)

The append_member method is used to append the given user name to the group's member list.

Definition at line 381 of file group.cc.

colon_group::record::pointer colon_group::record::create ( const source_location locn,
const rcstring name,
const rcstring password,
const rcstring gid,
const members_t members 
) [static]

The create class method is used to create new dynamically allocated instances of this class.

Parameters:
locnThe source file location of this record.
nameThe name of the group.
passwordThe password of the group.
gidThe group ID of the group.
membersThe members (by user name) of the group.

Definition at line 153 of file group.cc.

rcstring colon_group::record::get_gid ( void  ) const [inline]

Definition at line 88 of file group.h.

long colon_group::record::get_gid_binary ( void  ) const
const members_t& colon_group::record::get_members ( void  ) const [inline]

Definition at line 90 of file group.h.

rcstring colon_group::record::get_name ( void  ) const [inline]

Definition at line 86 of file group.h.

rcstring colon_group::record::get_password ( void  ) const [inline]

Definition at line 87 of file group.h.

Definition at line 85 of file group.h.

Definition at line 92 of file group.h.

bool colon_group::record::is_member ( const rcstring user_name) const

The is_member method is used to test if a particular user name is a member of the group.

Definition at line 347 of file group.cc.

bool colon_group::record::is_members_only ( void  ) const [inline]

Definition at line 93 of file group.h.

The representation method is used to generate a string which represents the group, suitable for inserting into a group file or group map. (There is no newline on the end.)

Definition at line 355 of file group.cc.


Field Documentation

The gid instance variable is used to remember ihe group ID of the group.

Definition at line 157 of file group.h.

The locn instance variable is used to remember the source file location of this record.

Definition at line 139 of file group.h.

The members instance variable is used to remember the list of users who are explictly members of this group.

Definition at line 163 of file group.h.

The members_only instance variable is used to remember if this group may only be as the default group of the group members.

Definition at line 177 of file group.h.

The name instance variable is used to remember the name of the group.

Definition at line 145 of file group.h.

The password instance variable is used to remember the password of the group.

Definition at line 151 of file group.h.

Some groups should not be used as a default groups. If this field is not the empty string, the named group should be used instead.

Definition at line 170 of file group.h.


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