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

#include <slurp.h>

Inheritance diagram for space_hosts_slurp:
space_hosts space

Public Types

typedef boost::shared_ptr
< space_hosts_slurp
pointer

Public Member Functions

virtual ~space_hosts_slurp ()
void read_and_process (void)
record::pointer query_by_name (const rcstring &name) const
record::pointer query_by_address (const rcstring &address) 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< rcstring,
record::pointer
by_addr_t

Private Member Functions

 space_hosts_slurp (const rcstring &filename)
 space_hosts_slurp ()
 space_hosts_slurp (const space_hosts_slurp &)
space_hosts_slurpoperator= (const space_hosts_slurp &)

Private Attributes

by_name_t by_name
by_addr_t by_addr

Detailed Description

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

Definition at line 31 of file slurp.h.


Member Typedef Documentation

Definition at line 88 of file slurp.h.

Definition at line 81 of file slurp.h.

typedef boost::shared_ptr<space_hosts_slurp> space_hosts_slurp::pointer

Reimplemented from space_hosts.

Definition at line 35 of file slurp.h.


Constructor & Destructor Documentation

The destructor.

Definition at line 23 of file slurp.cc.

space_hosts_slurp::space_hosts_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 28 of file slurp.cc.

The default constructor.

The copy constructor.


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_hosts.

Definition at line 35 of file slurp.cc.

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

The assignment operator.

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

Definition at line 135 of file slurp.cc.

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

Definition at line 124 of file slurp.cc.

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

Definition at line 42 of file slurp.cc.


Field Documentation

Records indexed by IP address.

Definition at line 93 of file slurp.h.

Records indexed by name.

Definition at line 86 of file slurp.h.


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