nis-util  1.0.D108
Data Structures | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
colon_group Class Reference

#include <group.h>

Inheritance diagram for colon_group:
colon colon_group_slurp colon_group_slurp_check

Data Structures

class  record

Public Types

typedef boost::shared_ptr
< colon_group
pointer

Public Member Functions

virtual ~colon_group ()
record::pointer get (void)

Static Public Member Functions

static pointer create (const rcstring &filename)

Protected Member Functions

 colon_group (const rcstring &filename)

Private Member Functions

bool validate (const record::pointer &rp)
 colon_group ()
 colon_group (const colon_group &rhs)
colon_groupoperator= (const colon_group &rhs)

Private Attributes

long last_gid

Detailed Description

The colon_group class is used to represent the parse state of a group formatted file.

Definition at line 30 of file group.h.


Member Typedef Documentation

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

Reimplemented in colon_group_slurp_check, and colon_group_slurp.

Definition at line 34 of file group.h.


Constructor & Destructor Documentation

The destructor.

Definition at line 28 of file group.cc.

colon_group::colon_group ( const rcstring filename) [protected]

The constructor.

Parameters:
filenameThe name of the file to be read.

Definition at line 33 of file group.cc.

colon_group::colon_group ( ) [private]

The default constructor. Do not use.

colon_group::colon_group ( const colon_group rhs) [private]

The copy constructor. Do not use.


Member Function Documentation

colon_group::pointer colon_group::create ( const rcstring filename) [static]

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

Parameters:
filenameThe name of the file to be read.

Reimplemented in colon_group_slurp.

Definition at line 49 of file group.cc.

The get method is used to get another group entry from the file.

Input lines are validated for simple correctness. Invalid lines cause fatal errors (see the error method) and are not passed through.

Returns:
pointer to new record, or NULL at end of file

Definition at line 56 of file group.cc.

colon_group& colon_group::operator= ( const colon_group rhs) [private]

The assignment operator. Do not use.

bool colon_group::validate ( const record::pointer rp) [private]

The validate method is used to check that group entries are valid, within themselves. (Validation between fields, or between files, is not done.) Returns true for valid lines, and false otherwise.

Parameters:
rppointer to record to be validated
Returns:
Returns true for valid lines, and false otherwise.

Definition at line 162 of file group.cc.


Field Documentation

long colon_group::last_gid [private]

The last_gid instance variable track the gid within the file, for sequence error reporting. This is tracked because it catches most gid typographical errors.

Definition at line 221 of file group.h.


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