nis-util
1.0.D108
|
#include <networks.h>
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_networks & | operator= (const space_networks &) |
Private Attributes | |
unsigned long | last_addr |
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.
typedef boost::shared_ptr<space_networks> space_networks::pointer |
Reimplemented in space_networks_slurp.
Definition at line 35 of file networks.h.
space_networks::~space_networks | ( | ) | [virtual] |
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.
filename | The file to be read. |
Definition at line 34 of file networks.cc.
space_networks::space_networks | ( | ) | [private] |
The default constructor. Do not use.
space_networks::space_networks | ( | const space_networks & | ) | [private] |
The copy constructor. Do not use.
space_networks::pointer space_networks::create | ( | const rcstring & | filename | ) | [static] |
The create class method is used to create new dynamically allocated instances of this class.
filename | The 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.
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.
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.