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

#include <pushback.h>

Inheritance diagram for arglex_source_pushback:
arglex_source

Public Member Functions

virtual ~arglex_source_pushback ()

Static Public Member Functions

static pointer create (const source_location &locn, const rcstring &text)

Protected Member Functions

bool next (source_location &result_locn, rcstring &result)

Private Member Functions

 arglex_source_pushback (const source_location &locn, const rcstring &text)
 arglex_source_pushback ()
 arglex_source_pushback (const arglex_source_pushback &rhs)
arglex_source_pushbackoperator= (const arglex_source_pushback &rhs)

Private Attributes

source_location locn
rcstring text
bool used_up

Detailed Description

The arglex_source_pushback class is used to represent a single command line argument temporarily "pushed back" into the input.

If you want to push back multiple command line arguments, create multiple instances of this class.

Definition at line 31 of file pushback.h.


Constructor & Destructor Documentation

The destructor.

Definition at line 22 of file pushback.cc.

arglex_source_pushback::arglex_source_pushback ( const source_location locn,
const rcstring text 
) [private]

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

Parameters:
locnThe original source of the command line option.
textThe original text of the command line option.

Definition at line 27 of file pushback.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 create class method is used to create new dynamically allocated instances of this class.

Parameters:
locnThe original source of the command line option.
textThe original text of the command line option.

Definition at line 39 of file pushback.cc.

bool arglex_source_pushback::next ( source_location result_locn,
rcstring result 
) [protected, virtual]

The next method is used to obtain the next command line argument from the command line source.

Parameters:
result_locnthe read position immidately before the result.
resultwhere to put the command line argument
Returns:
true if argument was available, false if end of line (or end of file, etc).

Implements arglex_source.

Definition at line 47 of file pushback.cc.

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

The assignment operator. Do not use.

Parameters:
rhsThe right hand side of the assignment.

Field Documentation

The locn instance variable is used to remember the original source of the command line option.

Definition at line 71 of file pushback.h.

The text instance variable is used to remember the original text of the command line option.

Definition at line 77 of file pushback.h.

The used_up instance variable is used to remember whether or not we have returned the argument, yet.

Definition at line 83 of file pushback.h.


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