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

#include <row.h>

Inheritance diagram for space_auto_master_row:
space_auto_master_row_adapter space_auto_master_row_direct space_auto_master_row_hosts space_auto_master_row_normal

Public Types

typedef boost::shared_ptr
< space_auto_master_row
pointer
typedef boost::shared_ptr< outputoutput_pointer
typedef std::list< mount_pointkeys_t

Public Member Functions

virtual ~space_auto_master_row ()
virtual void print (const output_pointer &op) const =0
const mount_pointget_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_rowoperator= (const space_auto_master_row &rhs)

Private Attributes

mount_point key
rcstring options

Detailed Description

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.

Definition at line 35 of file row.h.


Member Typedef Documentation

Definition at line 85 of file row.h.

typedef boost::shared_ptr<output> space_auto_master_row::output_pointer

Definition at line 39 of file row.h.


Constructor & Destructor Documentation

The destructor.

Definition at line 24 of file row.cc.

space_auto_master_row::space_auto_master_row ( const mount_point mount_point,
const rcstring options 
) [protected]

The constructor. For use by derived classes only.

Definition at line 29 of file row.cc.

The default constructor. Do not use.

The copy constructor. Do not use.

Parameters:
rhsThe right hand side of the initialization.

Member Function Documentation

The extract_mapname class method is used extract the mapname from a maptype:mapname pair.

Definition at line 75 of file row.cc.

The extract_maptype class method is used extract the maptype from a maptype:mapname pair.

Definition at line 65 of file row.cc.

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.

Note:
Do not call this method if has_associated_file returns false.

Reimplemented in space_auto_master_row_direct, and space_auto_master_row_normal.

Definition at line 49 of file row.cc.

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.

Definition at line 57 of file row.cc.

const mount_point& space_auto_master_row::get_mount_point ( void  ) const [inline]

The get_mount_point method is used to obtain the mount point of this row.

Definition at line 56 of file row.h.

rcstring space_auto_master_row::get_options ( void  ) const [inline, protected]

The get_options method is used to obtain the options, if any, associated with this row.

Definition at line 118 of file row.h.

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.

Definition at line 41 of file row.cc.

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.

Parameters:
filenameThe name of the file to read from.
hostsIf 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.

Parameters:
rhsThe 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.


Field Documentation

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

Definition at line 126 of file row.h.

The options instance variable is used to remember the mount options, if any, associated with a row of an etc/auto.master file.

Definition at line 132 of file row.h.


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