nis-util
1.0.D108
|
#include <command_line.h>
Public Member Functions | |
virtual | ~arglex_source_command_line () |
Static Public Member Functions | |
static pointer | create (int argc, char **argv) |
Protected Member Functions | |
bool | next (source_location &result_locn, rcstring &result) |
Private Member Functions | |
arglex_source_command_line (int argc, char **argv) | |
arglex_source_command_line () | |
arglex_source_command_line (const arglex_source_command_line &rhs) | |
arglex_source_command_line & | operator= (const arglex_source_command_line &rhs) |
Private Attributes | |
int | count |
int | pos |
char ** | values |
The arglex_source_command_line class is used to represent the processing required to traverse and consume strings values as presented on the command line to the main() function.
Definition at line 29 of file command_line.h.
arglex_source_command_line::~arglex_source_command_line | ( | ) | [virtual] |
The destructor.
Definition at line 22 of file command_line.cc.
arglex_source_command_line::arglex_source_command_line | ( | int | argc, |
char ** | argv | ||
) | [private] |
The constructor. It is private on purpose, use the create class method instead.
argc | The number of arguments on the command line, including the command name. |
argv | The values of the command line arguments, as simple C strings, including the command name. |
Definition at line 27 of file command_line.cc.
arglex_source_command_line::arglex_source_command_line | ( | ) | [private] |
The default constructor. Do not use.
arglex_source_command_line::arglex_source_command_line | ( | const arglex_source_command_line & | rhs | ) | [private] |
The copy constructor. Do not use.
rhs | The right hand side of the initialization. |
arglex_source_command_line::pointer arglex_source_command_line::create | ( | int | argc, |
char ** | argv | ||
) | [static] |
The create class method is used to create new dynamically allocated instances of this class.
argc | The number of arguments on the command line, including the command name. |
argv | The values of the command line arguments, as simple C strings, including the command name. |
Definition at line 36 of file command_line.cc.
bool arglex_source_command_line::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 43 of file command_line.cc.
arglex_source_command_line& arglex_source_command_line::operator= | ( | const arglex_source_command_line & | rhs | ) | [private] |
The assignment operator. Do not use.
rhs | The right hand side of the assignment. |
int arglex_source_command_line::count [private] |
The count instance variable is used to remember the number of arguments on the command line, including the command name.
Definition at line 73 of file command_line.h.
int arglex_source_command_line::pos [private] |
The pos instance variable is used to remember our progress through the command line arguments.
Definition at line 79 of file command_line.h.
char** arglex_source_command_line::values [private] |
The values instance variable is used to remember the values of the command line arguments, as simple C strings, including the command name.
Definition at line 86 of file command_line.h.