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

#include <passwd.h>

Public Types

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

Public Member Functions

 ~record ()
const source_locationget_source_location (void) const
rcstring get_name (void) const
rcstring get_password (void) const
rcstring get_uid (void) const
long get_uid_binary (void) const
rcstring get_gid (void) const
long get_gid_binary (void) const
rcstring get_gecos (void) const
rcstring get_home (void) const
rcstring get_shell (void) const
rcstring representation (void) const
const groups_tget_groups (void) const
void append_group (const rcstring &gid)

Static Public Member Functions

static pointer create (const source_location &locn, const rcstring &name, const rcstring &passwd, const rcstring &uid, const rcstring &gid, const rcstring &gecos, const rcstring &home, const rcstring &shell)

Private Member Functions

 record (const source_location &locn, const rcstring &name, const rcstring &passwd, const rcstring &uid, const rcstring &gid, const rcstring &gecos, const rcstring &home, const rcstring &shell)
 record ()
 record (const record &rhs)
recordoperator= (const record &rhs)

Private Attributes

source_location locn
rcstring name
rcstring password
rcstring uid
rcstring gid
rcstring gecos
rcstring home
rcstring shell
groups_t groups

Detailed Description

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

Definition at line 54 of file passwd.h.


Member Typedef Documentation

Definition at line 91 of file passwd.h.

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

Definition at line 57 of file passwd.h.


Constructor & Destructor Documentation

The destructor.

Definition at line 457 of file passwd.cc.

colon_passwd::record::record ( const source_location locn,
const rcstring name,
const rcstring passwd,
const rcstring uid,
const rcstring gid,
const rcstring gecos,
const rcstring home,
const rcstring shell 
) [private]

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

Definition at line 462 of file passwd.cc.

The default constructor. Do not use.

colon_passwd::record::record ( const record rhs) [private]

The copy constructor. Do not use.


Member Function Documentation

Definition at line 551 of file passwd.cc.

colon_passwd::record::pointer colon_passwd::record::create ( const source_location locn,
const rcstring name,
const rcstring passwd,
const rcstring uid,
const rcstring gid,
const rcstring gecos,
const rcstring home,
const rcstring shell 
) [static]

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

Definition at line 486 of file passwd.cc.

rcstring colon_passwd::record::get_gecos ( void  ) const [inline]

Definition at line 79 of file passwd.h.

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

Definition at line 77 of file passwd.h.

long colon_passwd::record::get_gid_binary ( void  ) const

Definition at line 521 of file passwd.cc.

const groups_t& colon_passwd::record::get_groups ( void  ) const [inline]

Definition at line 93 of file passwd.h.

rcstring colon_passwd::record::get_home ( void  ) const [inline]

Definition at line 80 of file passwd.h.

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

Definition at line 73 of file passwd.h.

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

Definition at line 74 of file passwd.h.

rcstring colon_passwd::record::get_shell ( void  ) const [inline]

Definition at line 81 of file passwd.h.

Definition at line 72 of file passwd.h.

rcstring colon_passwd::record::get_uid ( void  ) const [inline]

Definition at line 75 of file passwd.h.

long colon_passwd::record::get_uid_binary ( void  ) const

Definition at line 510 of file passwd.cc.

record& colon_passwd::record::operator= ( const record rhs) [private]

The assignment operator. Do not use.

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

Definition at line 532 of file passwd.cc.


Field Documentation

Definition at line 116 of file passwd.h.

Definition at line 115 of file passwd.h.

The groups instance variable may be used to hold the additional groups the user belongs to. (Depending on how things were scanned.)

Definition at line 125 of file passwd.h.

Definition at line 117 of file passwd.h.

The locn instance variable is used to remember the location of this row in the source file. This is useful for error messages.

Definition at line 110 of file passwd.h.

Definition at line 112 of file passwd.h.

Definition at line 113 of file passwd.h.

Definition at line 118 of file passwd.h.

Definition at line 114 of file passwd.h.


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