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

#include <networks.h>

Inheritance diagram for space_networks:
space space_networks_slurp space_networks_slurp_check

Data Structures

class  record

Public Types

typedef boost::shared_ptr
< space_networks
pointer

Public Member Functions

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

Static Public Member Functions

static pointer create (const rcstring &filename)
static bool is_ok_name (const rcstring &input, rcstring &output)
static bool is_ok_name (const rcstring &)

Protected Member Functions

 space_networks (const rcstring &filename)

Private Member Functions

 space_networks ()
 space_networks (const space_networks &)
space_networksoperator= (const space_networks &)

Private Attributes

unsigned long last_addr

Detailed Description

The space_networks class is used to represent the parse state of a networks file (see networks(5) for file format information).

Definition at line 31 of file networks.h.


Member Typedef Documentation

typedef boost::shared_ptr<space_networks> space_networks::pointer

Reimplemented in space_networks_slurp.

Definition at line 35 of file networks.h.


Constructor & Destructor Documentation

The destructor.

Definition at line 29 of file networks.cc.

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

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

Parameters:
filenameThe file to be read.

Definition at line 34 of file networks.cc.

The default constructor. Do not use.

The copy constructor. Do not use.


Member Function Documentation

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

Parameters:
filenameThe file to be read.

Reimplemented in space_networks_slurp.

Definition at line 44 of file networks.cc.

The get method is used to get another record from the file. It returns false at end-of-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 95 of file networks.cc.

bool space_networks::is_ok_name ( const rcstring input,
rcstring output 
) [static]

The valid_host_name method is used to determine if s atring is a valid host name. If it is, `output' is set to the canonical form of the host name.

Definition at line 59 of file networks.cc.

bool space_networks::is_ok_name ( const rcstring input) [static]

The is_ok_name method is used to determine if a network name is acceptable.

Definition at line 51 of file networks.cc.

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

The assignment operator. Do not use.


Field Documentation

unsigned long space_networks::last_addr [private]

The last_addr instance variable is used by the get method to check record sequencing.

Definition at line 147 of file networks.h.


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