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

#include <command_line.h>

Inheritance diagram for arglex_source_command_line:
arglex_source

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_lineoperator= (const arglex_source_command_line &rhs)

Private Attributes

int count
int pos
char ** values

Detailed Description

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.


Constructor & Destructor Documentation

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.

Parameters:
argcThe number of arguments on the command line, including the command name.
argvThe values of the command line arguments, as simple C strings, including the command name.

Definition at line 27 of file command_line.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:
argcThe number of arguments on the command line, including the command name.
argvThe 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.

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 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.

Parameters:
rhsThe right hand side of the assignment.

Field Documentation

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.

The pos instance variable is used to remember our progress through the command line arguments.

Definition at line 79 of file command_line.h.

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.


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