nis-util
1.0.D108
|
#include <row.h>
Public Types | |
typedef boost::shared_ptr < space_auto_master_row > | pointer |
typedef boost::shared_ptr< output > | output_pointer |
typedef std::list< mount_point > | keys_t |
Public Member Functions | |
virtual | ~space_auto_master_row () |
virtual void | print (const output_pointer &op) const =0 |
const mount_point & | get_mount_point (void) const |
virtual void | load_map (const rcstring &filename, const space_hosts_slurp::pointer &hosts)=0 |
virtual bool | has_associated_file (void) const |
virtual rcstring | get_filename (void) const |
virtual keys_t | get_keys (void) const |
Static Public Member Functions | |
static rcstring | extract_maptype (const rcstring &text) |
static rcstring | extract_mapname (const rcstring &text) |
Protected Member Functions | |
space_auto_master_row (const mount_point &mount_point, const rcstring &options) | |
rcstring | get_options (void) const |
Private Member Functions | |
space_auto_master_row () | |
space_auto_master_row (const space_auto_master_row &rhs) | |
space_auto_master_row & | operator= (const space_auto_master_row &rhs) |
Private Attributes | |
mount_point | key |
rcstring | options |
The space_auto_master_row class is used to represent a row (entry) in an auto.master file. It is abstract because there are at least two kinds of row.
typedef std::list<mount_point> space_auto_master_row::keys_t |
typedef boost::shared_ptr<output> space_auto_master_row::output_pointer |
typedef boost::shared_ptr<space_auto_master_row> space_auto_master_row::pointer |
Reimplemented in space_auto_master_row_adapter, space_auto_master_row_direct, space_auto_master_row_normal, and space_auto_master_row_hosts.
space_auto_master_row::~space_auto_master_row | ( | ) | [virtual] |
space_auto_master_row::space_auto_master_row | ( | const mount_point & | mount_point, |
const rcstring & | options | ||
) | [protected] |
space_auto_master_row::space_auto_master_row | ( | ) | [private] |
The default constructor. Do not use.
space_auto_master_row::space_auto_master_row | ( | const space_auto_master_row & | rhs | ) | [private] |
The copy constructor. Do not use.
rhs | The right hand side of the initialization. |
rcstring space_auto_master_row::extract_mapname | ( | const rcstring & | text | ) | [static] |
rcstring space_auto_master_row::extract_maptype | ( | const rcstring & | text | ) | [static] |
rcstring space_auto_master_row::get_filename | ( | void | ) | const [virtual] |
The get_filename method is used to obtain the filename of the text file containing the map.
Reimplemented in space_auto_master_row_direct, and space_auto_master_row_normal.
space_auto_master_row::keys_t space_auto_master_row::get_keys | ( | void | ) | const [virtual] |
The get_keys method is used to obtain the complete list of keys in the associated map file. You must have called load_map previously, or undefined but undesirable things will happen.
Reimplemented in space_auto_master_row_direct.
const mount_point& space_auto_master_row::get_mount_point | ( | void | ) | const [inline] |
rcstring space_auto_master_row::get_options | ( | void | ) | const [inline, protected] |
bool space_auto_master_row::has_associated_file | ( | void | ) | const [virtual] |
The has_associated_file method is used to determine whether or not a row has a map file associated with it.
Reimplemented in space_auto_master_row_direct, and space_auto_master_row_normal.
virtual void space_auto_master_row::load_map | ( | const rcstring & | filename, |
const space_hosts_slurp::pointer & | hosts | ||
) | [pure virtual] |
The load_map method is used to load the map corresponding to this row of the table.
filename | The name of the file to read from. |
hosts | If non-NULL, the hosts map to validate against. |
Implemented in space_auto_master_row_direct, space_auto_master_row_normal, space_auto_master_row_hosts, and space_auto_master_row_adapter.
space_auto_master_row& space_auto_master_row::operator= | ( | const space_auto_master_row & | rhs | ) | [private] |
The assignment operator. Do not use.
rhs | The right hand side of the assignment. |
virtual void space_auto_master_row::print | ( | const output_pointer & | op | ) | const [pure virtual] |
The print method is used to print a representation of the etc/auto.master row on the given output stream.
Implemented in space_auto_master_row_direct, space_auto_master_row_normal, space_auto_master_row_hosts, and space_auto_master_row_adapter.
mount_point space_auto_master_row::key [private] |
The mount_point instance variable is used to remember where the map is to be mounted. (It is also the database key for this row of the NIS map.)
rcstring space_auto_master_row::options [private] |