nis-util
1.0.D108
|
#include <netgroup.h>
Data Structures | |
struct | entry_t |
class | record |
Public Types | |
typedef boost::shared_ptr < space_netgroup > | pointer |
Public Member Functions | |
virtual | ~space_netgroup () |
record::pointer | get (void) |
Static Public Member Functions | |
static pointer | create (const rcstring &filename) |
static rcstring | is_ok_netgroup_name (const rcstring &) |
Protected Member Functions | |
space_netgroup (const rcstring &filename) | |
Private Member Functions | |
bool | parse_group (const rcstring &s, entry_t &result, const source_location &glocn) |
space_netgroup () | |
space_netgroup (const space_netgroup &) | |
space_netgroup & | operator= (const space_netgroup &) |
The space_netgroup class is used to represent the parse state for reading netgroup(5) formatted files.
Definition at line 33 of file netgroup.h.
typedef boost::shared_ptr<space_netgroup> space_netgroup::pointer |
Reimplemented in space_netgroup_slurp.
Definition at line 37 of file netgroup.h.
space_netgroup::~space_netgroup | ( | ) | [virtual] |
The destructor.
Definition at line 28 of file netgroup.cc.
space_netgroup::space_netgroup | ( | 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 33 of file netgroup.cc.
space_netgroup::space_netgroup | ( | ) | [private] |
The default constructor. Do not use.
space_netgroup::space_netgroup | ( | const space_netgroup & | ) | [private] |
The copy constructor. Do not use.
space_netgroup::pointer space_netgroup::create | ( | const rcstring & | filename | ) | [static] |
The craete class method is sued to create new dynamically allocated instances of this class.
filename | The name of the file to be read. |
Reimplemented in space_netgroup_slurp.
Definition at line 43 of file netgroup.cc.
The get method is used to get one entry from the file. It does very little validation beyond basic syntax and name formats.
Definition at line 179 of file netgroup.cc.
rcstring space_netgroup::is_ok_netgroup_name | ( | const rcstring & | s | ) | [static] |
The is_ok_netgroup_name method is used to determine if a netgroup name is acceptable. A replacement is suggested. You known the name is OK if the suggestion (the return value) is the same as the input (the argument).
Definition at line 50 of file netgroup.cc.
space_netgroup& space_netgroup::operator= | ( | const space_netgroup & | ) | [private] |
The assignment operator. Do not use.
bool space_netgroup::parse_group | ( | const rcstring & | s, |
entry_t & | result, | ||
const source_location & | glocn | ||
) | [private] |
The parse_netgroup method is used to parse a string into its component pieces. It expects a string of the form "(user,host,domain)". Returns true if this form is found. Otherwise it assumes the string is a simple group name, and returns false.
Definition at line 89 of file netgroup.cc.