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_direct Class Reference

#include <direct.h>

Inheritance diagram for space_auto_master_row_direct:
space_auto_master_row

Public Types

typedef boost::shared_ptr
< space_auto_master_row_direct
pointer

Public Member Functions

virtual ~space_auto_master_row_direct ()
keys_t get_keys (void) const

Static Public Member Functions

static pointer create (const mount_point &key, const rcstring &filename, const rcstring &options)

Protected Member Functions

void print (const output_pointer &op) const
void load_map (const rcstring &filename, const space_hosts_slurp::pointer &hosts)
rcstring get_filename (void) const
bool has_associated_file (void) const

Private Member Functions

 space_auto_master_row_direct (const mount_point &key, const rcstring &filename, const rcstring &options)
 space_auto_master_row_direct ()
 space_auto_master_row_direct (const space_auto_master_row_direct &rhs)
space_auto_master_row_directoperator= (const space_auto_master_row_direct &rhs)

Private Attributes

rcstring maptype
rcstring mapname
space_automap::pointer map

Detailed Description

The space_auto_master_row_direct class is used to represent a row associated with a direct (absolute) auto mount map.

Definition at line 29 of file direct.h.


Member Typedef Documentation

Reimplemented from space_auto_master_row.

Definition at line 33 of file direct.h.


Constructor & Destructor Documentation

The destructor.

Definition at line 26 of file direct.cc.

space_auto_master_row_direct::space_auto_master_row_direct ( const mount_point key,
const rcstring filename,
const rcstring options 
) [private]

The default constructor. It is private on purpose, use the create class method instead.

Parameters:
keywhere to mount this map in the file system (It is also the database key for this row of the NIS map.)
filenameThe name of the file containing the map.
optionsany options associated with this row

Definition at line 31 of file direct.cc.

The default constructor. Do not use.

The copy constructor. Do not use.

Parameters:
rhsThe right hand side of the initialization.

Member Function Documentation

space_auto_master_row_direct::pointer space_auto_master_row_direct::create ( const mount_point key,
const rcstring filename,
const rcstring options 
) [static]

The create class method is used to create new dynamically allocated instances of this class.

Parameters:
keywhere to mount this map in the file system (It is also the database key for this row of the NIS map.)
filenameThe name of the file containing the map.
optionsany options associated with this row

Definition at line 55 of file direct.cc.

rcstring space_auto_master_row_direct::get_filename ( void  ) const [protected, 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 from space_auto_master_row.

Definition at line 113 of file direct.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 from space_auto_master_row.

Definition at line 121 of file direct.cc.

bool space_auto_master_row_direct::has_associated_file ( void  ) const [protected, virtual]

The has_associated_file method is used to determine whether or not a row has a map file associated with it.

Reimplemented from space_auto_master_row.

Definition at line 103 of file direct.cc.

void space_auto_master_row_direct::load_map ( const rcstring filename,
const space_hosts_slurp::pointer hosts 
) [protected, 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.

Implements space_auto_master_row.

Definition at line 92 of file direct.cc.

space_auto_master_row_direct& space_auto_master_row_direct::operator= ( const space_auto_master_row_direct rhs) [private]

The assignment operator. Do not use.

Parameters:
rhsThe right hand side of the assignment.
void space_auto_master_row_direct::print ( const output_pointer op) const [protected, virtual]

The print method is used to print a representation of the etc/auto.master row on the given output stream.

Implements space_auto_master_row.

Definition at line 72 of file direct.cc.


Field Documentation

The map instance variable is used to remember the the contents of the map this etc/auto.master row is asscoiated with.

Definition at line 110 of file direct.h.

The filename instance variable is used to remember the name of the file containing the map.

Definition at line 104 of file direct.h.

The protocol instance variable is used to remember the proptocol used to obtain the map.

The second field is the map file to be consulted for this mount-point. This field is of the form maptype:mapname, where maptype is one of the supported map types (file, program, yp, nisplus, hesiod, userdir, ldap), and mapname is the name of the map.

Definition at line 98 of file direct.h.


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