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

#include <slurp.h>

Inheritance diagram for space_protocols_slurp:
space_protocols space

Public Types

typedef boost::shared_ptr
< space_protocols_slurp
pointer

Public Member Functions

virtual ~space_protocols_slurp ()
void read_and_process (void)
record::pointer query_by_name (const rcstring &name_or_alias) const
record::pointer query_by_number (int number) const
record::pointer query_by_number (const rcstring &number) const

Static Public Member Functions

static pointer create (const rcstring &filename)

Private Types

typedef std::map< rcstring,
record::pointer
by_name_t
typedef std::map< int,
record::pointer
by_number_t

Private Member Functions

 space_protocols_slurp (const rcstring &filename)
void process (const record::pointer &rp)
 space_protocols_slurp ()
 space_protocols_slurp (const space_protocols_slurp &)
space_protocols_slurpoperator= (const space_protocols_slurp &)

Private Attributes

by_name_t by_name
by_number_t by_number

Detailed Description

The space_protocols_slurp class is used to process the protocols file records, filing each away for later checks. This checks the file for inter-row validity.

Definition at line 30 of file slurp.h.


Member Typedef Documentation

Definition at line 94 of file slurp.h.

Definition at line 102 of file slurp.h.

Reimplemented from space_protocols.

Definition at line 34 of file slurp.h.


Constructor & Destructor Documentation

The destructor.

Definition at line 25 of file slurp.cc.

space_protocols_slurp::space_protocols_slurp ( const rcstring filename) [private]

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 30 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_protocols.

Definition at line 37 of file slurp.cc.

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

The assignment operator. Do not use.

void space_protocols_slurp::process ( const record::pointer rp) [private]

The process method use used to process each record.

Definition at line 44 of file slurp.cc.

The query_by_name method is used to retrieve a protocols record by protocol name. Returns NULL if no such record.

Definition at line 145 of file slurp.cc.

The query_by_number method is used to retrieve a protocols record by protocol number. Returns NULL if no such record.

Definition at line 169 of file slurp.cc.

The query_by_number method is used to retrieve a protocols record by protocol number. Returns NULL if no such record.

Definition at line 156 of file slurp.cc.

The read_and_process method is used to read the file and process all of the records.

Definition at line 131 of file slurp.cc.


Field Documentation

The by_name instance variable is used to index protocols records by name.

Definition at line 100 of file slurp.h.

The by_number instance variable is used to index protocols records by number.

Definition at line 108 of file slurp.h.


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