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_netmasks_slurp Class Reference

#include <slurp.h>

Inheritance diagram for space_netmasks_slurp:
space_netmasks space space_netmasks_slurp_check

Public Types

typedef boost::shared_ptr
< space_netmasks_slurp
pointer

Public Member Functions

virtual ~space_netmasks_slurp ()
virtual void read_and_process (void)
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_netmasks_slurp (const rcstring &filename)

Private Types

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

Private Member Functions

 space_netmasks_slurp ()
 space_netmasks_slurp (const space_netmasks_slurp &)
space_netmasks_slurpoperator= (const space_netmasks_slurp &)

Private Attributes

by_addr_t by_addr

Detailed Description

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

Definition at line 29 of file slurp.h.


Member Typedef Documentation

Definition at line 86 of file slurp.h.

Reimplemented from space_netmasks.

Definition at line 33 of file slurp.h.


Constructor & Destructor Documentation

The destructor.

Definition at line 23 of file slurp.cc.

space_netmasks_slurp::space_netmasks_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 of this class.

Parameters:
filenameThe name of the file to be read.

Reimplemented from space_netmasks.

Definition at line 35 of file slurp.cc.

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

The assignment operator. Do not use.

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

The process method is called by the read_and_process method to process each record in the file.

Parameters:
rpThe row to be processed.

Reimplemented in space_netmasks_slurp_check.

Definition at line 42 of file slurp.cc.

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

Parameters:
keyThe network number to search for. Assumed to be a valid netword address.

Definition at line 83 of file slurp.cc.

void space_netmasks_slurp::read_and_process ( void  ) [virtual]

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

Definition at line 69 of file slurp.cc.


Field Documentation

Records indexed by network address.

Definition at line 91 of file slurp.h.


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