nis-util
1.0.D108
|
#include <pushback.h>
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_pushback & | operator= (const arglex_source_pushback &rhs) |
Private Attributes | |
source_location | locn |
rcstring | text |
bool | used_up |
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.
arglex_source_pushback::~arglex_source_pushback | ( | ) | [virtual] |
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.
locn | The original source of the command line option. |
text | The original text of the command line option. |
Definition at line 27 of file pushback.cc.
arglex_source_pushback::arglex_source_pushback | ( | ) | [private] |
The default constructor. Do not use.
arglex_source_pushback::arglex_source_pushback | ( | const arglex_source_pushback & | rhs | ) | [private] |
The copy constructor. Do not use.
rhs | The right hand side of the initialization. |
arglex_source_pushback::pointer arglex_source_pushback::create | ( | const source_location & | locn, |
const rcstring & | text | ||
) | [static] |
The create class method is used to create new dynamically allocated instances of this class.
locn | The original source of the command line option. |
text | The 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.
result_locn | the read position immidately before the result. |
result | where to put the command line argument |
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.
rhs | The right hand side of the assignment. |
source_location arglex_source_pushback::locn [private] |
The locn instance variable is used to remember the original source of the command line option.
Definition at line 71 of file pushback.h.
rcstring arglex_source_pushback::text [private] |
The text instance variable is used to remember the original text of the command line option.
Definition at line 77 of file pushback.h.
bool arglex_source_pushback::used_up [private] |
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.