nis-util  1.0.D108
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
space_protocols::record Class Reference

#include <protocols.h>

Public Types

typedef boost::shared_ptr< recordpointer
typedef std::list< rcstringaliases_t

Public Member Functions

 ~record ()
rcstring representation (void) const
const source_locationget_source_location (void) const
rcstring get_name (void) const
rcstring get_number (void) const
int get_number_binary (void) const
const aliases_tget_aliases (void) const

Static Public Member Functions

static pointer create (const source_location &locn, const rcstring &name, const rcstring &number, const aliases_t &aliases)

Private Member Functions

 record (const source_location &locn, const rcstring &name, const rcstring &number, const aliases_t &aliases)
 record ()
 record (const record &rhs)
recordoperator= (const record &rhs)

Private Attributes

source_location locn
rcstring name
rcstring number
aliases_t aliases

Detailed Description

The record class is used to represent one record from the protocols file. Values of this type are returned by the get method.

Definition at line 55 of file protocols.h.


Member Typedef Documentation

Definition at line 62 of file protocols.h.

typedef boost::shared_ptr<record> space_protocols::record::pointer

Definition at line 58 of file protocols.h.


Constructor & Destructor Documentation

Definition at line 180 of file protocols.cc.

space_protocols::record::record ( const source_location locn,
const rcstring name,
const rcstring number,
const aliases_t aliases 
) [private]

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

Parameters:
locnThe source code location of this record.
nameThe name of this protocol
numberThe number of this protocol
aliasesThe (possibly empty) set of aliases for this protocol.

Definition at line 185 of file protocols.cc.

The default constructor. Do not use.

space_protocols::record::record ( const record rhs) [private]

The copy constructor. Do not use.


Member Function Documentation

space_protocols::record::pointer space_protocols::record::create ( const source_location locn,
const rcstring name,
const rcstring number,
const aliases_t aliases 
) [static]

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

Parameters:
locnThe source code location of this record.
nameThe name of this protocol
numberThe number of this protocol
aliasesThe (possibly empty) set of aliases for this protocol.

Definition at line 200 of file protocols.cc.

const aliases_t& space_protocols::record::get_aliases ( void  ) const [inline]

Definition at line 92 of file protocols.h.

rcstring space_protocols::record::get_name ( void  ) const [inline]

Definition at line 89 of file protocols.h.

rcstring space_protocols::record::get_number ( void  ) const [inline]

Definition at line 90 of file protocols.h.

Definition at line 209 of file protocols.cc.

Definition at line 88 of file protocols.h.

record& space_protocols::record::operator= ( const record rhs) [private]

The assignment operator. Do not use.

The representation method is used to generate a string which represents the ethers entry, suitable for inserting into a protocol file or protocol map. (There is no newline on the end.)

Definition at line 220 of file protocols.cc.


Field Documentation

The aliases instance variable is used to remember the (possibly empty) set of the alternative names for the protocol.

Definition at line 133 of file protocols.h.

The locn instance variable is used to remember the source file location of this record.

Definition at line 115 of file protocols.h.

The name instance variable is used to remember the of the protocol.

Definition at line 121 of file protocols.h.

The number instance variable is used to remember the number (0..255) of the protocol.

Definition at line 127 of file protocols.h.


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