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

#include <slurp.h>

Inheritance diagram for space_networks_slurp:
space_networks space space_networks_slurp_check

Public Types

typedef boost::shared_ptr
< space_networks_slurp
pointer

Public Member Functions

virtual ~space_networks_slurp ()
virtual void read_and_process (void)
record::pointer query_by_name (const rcstring &key) const
record::pointer query_by_address (const rcstring &key) const

Static Public Member Functions

static pointer create (const rcstring &filename)

Protected Member Functions

virtual void process (const record::pointer &rp)
 space_networks_slurp (const rcstring &filename)

Private Types

typedef std::map< rcstring,
record::pointer
by_name_t
typedef std::map< rcstring,
record::pointer
by_addr_t

Private Member Functions

 space_networks_slurp ()
 space_networks_slurp (const space_networks_slurp &)
space_networks_slurpoperator= (const space_networks_slurp &)

Private Attributes

by_name_t by_name
by_addr_t by_addr

Detailed Description

The space_networks_slurp class is used to represent the parse state, and the results of the file scan after parsing.

Definition at line 30 of file slurp.h.


Member Typedef Documentation

Definition at line 94 of file slurp.h.

Definition at line 87 of file slurp.h.

Reimplemented from space_networks.

Definition at line 34 of file slurp.h.


Constructor & Destructor Documentation

The destructor.

Definition at line 23 of file slurp.cc.

space_networks_slurp::space_networks_slurp ( 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 28 of file slurp.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 if this class.

Parameters:
filenameThe name of the file to be read.

Reimplemented from space_networks.

Definition at line 35 of file slurp.cc.

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

The assignment operator. Do not use.

void space_networks_slurp::process ( const record::pointer rp) [protected, virtual]

The process method is used by the read_and_process method to process each record.

Reimplemented in space_networks_slurp_check.

Definition at line 42 of file slurp.cc.

The query_by_address method is used to locate a record by network number. Only valid after the read_and_process method has been called.

Definition at line 167 of file slurp.cc.

The query_by_name method is used to locate a record by network name. Only valid after the read_and_process method has been called.

Definition at line 156 of file slurp.cc.

void space_networks_slurp::read_and_process ( void  ) [virtual]

The read_and_process method is used to read the file and index the records.

Definition at line 142 of file slurp.cc.


Field Documentation

Records indexed by IP address.

Definition at line 99 of file slurp.h.

Records indexed by name.

Definition at line 92 of file slurp.h.


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