In file cmdline.h:

class commandline : public basic_commandline

Class to manage the command line interpreter

Inheritance:


Public Methods

commandline (int argc, char* argv[], bool Silent = false)
Constructor.
virtual bool operator () ()
Call operator.

Protected Fields

string prompt
command prompt
string lastline
last input line

Protected Methods

virtual void printline (const std::string& s)
Prints a line to the output of the command line

Documentation

Command line interpreter. Reads commands from the specified input file, executes them and writes the results to the given output file. If either the input or the output file is NULL the standard input or the standard output is taken as default.

This object should be used the following way:

    commandline		cmdline (argc, argv);
    if (!cmdline) {
       // error
       return;
    }
    while (cmdline)()) { 
       // line by line 
    }
    

commandline(int argc, char* argv[], bool Silent = false)
Constructs command line object object.
Returns:
void
Parameters:
argc - number of arguments
list - of arguments
silent - no echo to terminal if true

virtual bool operator ()()
Calls the command line interpreter.
Returns:
true if not yet finished

string prompt
command prompt

string lastline
last input line

virtual void printline(const std::string& s)
Prints a line to the output of the command line
Returns:
true if successful
Parameters:
s - message string


This class has no child classes.
Author:
DS, January 99

alphabetic index hierarchy of classes


Please send questions and comments to sigg_d@ligo-wa.caltech.edu


generated by doc++