nis-util
1.0.D108
|
#include <services.h>
Data Structures | |
class | record |
Public Types | |
typedef boost::shared_ptr < space_services > | pointer |
Public Member Functions | |
virtual | ~space_services () |
record::pointer | get (void) |
Static Public Member Functions | |
static pointer | create (const rcstring &filename) |
static bool | is_ok_name (const rcstring &name, rcstring &suggest) |
Protected Member Functions | |
space_services (const rcstring &filename) | |
Private Member Functions | |
space_services () | |
space_services (const space_services &) | |
space_services & | operator= (const space_services &) |
Private Attributes | |
int | last_num |
The space_services class is used to represent the parse state of a services file (see services(5) for file format information).
Definition at line 29 of file services.h.
typedef boost::shared_ptr<space_services> space_services::pointer |
Reimplemented in space_services_slurp.
Definition at line 33 of file services.h.
space_services::~space_services | ( | ) | [virtual] |
The destructor.
Definition at line 24 of file services.cc.
space_services::space_services | ( | const rcstring & | filename | ) | [protected] |
The constructor. It is private on purpose, use the create class method instead.
filename | The name of the file to be read. |
Definition at line 31 of file services.cc.
space_services::space_services | ( | ) | [private] |
The default constructor. Do not use.
space_services::space_services | ( | const space_services & | ) | [private] |
The copy constructor. Do not use.
space_services::pointer space_services::create | ( | const rcstring & | filename | ) | [static] |
The create class method is used to create new dynaically allocated instance of this class.
filename | The name of the file to be read. |
Definition at line 41 of file services.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 48 of file services.cc.
bool space_services::is_ok_name | ( | const rcstring & | name, |
rcstring & | suggest | ||
) | [static] |
The is_ok_name method is used to determine if a service name is acceptable. It doesn't strictly follow IANA's rules (http://www.iana.org/assignments/service-names) because IANA itself does not.
name | The name to be checked |
suggest | If the name is not ok, this is a suggested valid alternative |
Definition at line 288 of file services.cc.
space_services& space_services::operator= | ( | const space_services & | ) | [private] |
The assignment operator. Do not use.
int space_services::last_num [private] |
The last_num instance variable is used to remember the previous service number. This is to allow diagnosis of sequencing errors.
Definition at line 171 of file services.h.