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

#include <netgroup.h>

Inheritance diagram for space_netgroup:
space space_netgroup_slurp

Data Structures

struct  entry_t
class  record

Public Types

typedef boost::shared_ptr
< space_netgroup
pointer

Public Member Functions

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

Static Public Member Functions

static pointer create (const rcstring &filename)
static rcstring is_ok_netgroup_name (const rcstring &)

Protected Member Functions

 space_netgroup (const rcstring &filename)

Private Member Functions

bool parse_group (const rcstring &s, entry_t &result, const source_location &glocn)
 space_netgroup ()
 space_netgroup (const space_netgroup &)
space_netgroupoperator= (const space_netgroup &)

Detailed Description

The space_netgroup class is used to represent the parse state for reading netgroup(5) formatted files.

Definition at line 33 of file netgroup.h.


Member Typedef Documentation

typedef boost::shared_ptr<space_netgroup> space_netgroup::pointer

Reimplemented in space_netgroup_slurp.

Definition at line 37 of file netgroup.h.


Constructor & Destructor Documentation

The destructor.

Definition at line 28 of file netgroup.cc.

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

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

Parameters:
filenameThe name of the file to be read.

Definition at line 33 of file netgroup.cc.

The default constructor. Do not use.

The copy constructor. Do not use.


Member Function Documentation

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

Parameters:
filenameThe name of the file to be read.

Reimplemented in space_netgroup_slurp.

Definition at line 43 of file netgroup.cc.

The get method is used to get one entry from the file. It does very little validation beyond basic syntax and name formats.

Returns:
pointer to next reocrd, or NULL pointer if at end of file.

Definition at line 179 of file netgroup.cc.

The is_ok_netgroup_name method is used to determine if a netgroup name is acceptable. A replacement is suggested. You known the name is OK if the suggestion (the return value) is the same as the input (the argument).

Definition at line 50 of file netgroup.cc.

space_netgroup& space_netgroup::operator= ( const space_netgroup ) [private]

The assignment operator. Do not use.

bool space_netgroup::parse_group ( const rcstring s,
entry_t result,
const source_location glocn 
) [private]

The parse_netgroup method is used to parse a string into its component pieces. It expects a string of the form "(user,host,domain)". Returns true if this form is found. Otherwise it assumes the string is a simple group name, and returns false.

Definition at line 89 of file netgroup.cc.


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