Command Class Reference

#include <Command.h>


Public Member Functions

 Command (const DString &)
 Creates a new Command with the specified words.
DString getCommandWord ()
DString getSecondWord ()
 Returns the second word of this command.
bool isUnknown ()
 Return true if this command was not a known command.
bool hasSecondWord ()
 Determines whether or not a command has a second word, which is usually the expression or parameter of the command.
utils::DArray< DString > & getWords () const
 Returns an ArrayList of the words of the supplied command (including the command itself).
DString getWholeCommandString () const

Static Public Member Functions

static DString getVersion ()
static utils::DArray< DString > * load (DString fileName)
 Loads a file as a variable in the LinAl object.
static void save (const Command &command, DString &fileName, utils::DArray< DString > *output)
static DString print (const Command &command, double *parameters, int numberOfParameters, DHashMap< Plane< Double > > *storedStuff, DString *currentDirectory)
 Prints a variable in the LinAl object.

Private Attributes

DString * words
DString * commandWord
DString * secondWord
utils::DArray< DString > * args


Constructor & Destructor Documentation

Command::Command ( const DString &  _words  ) 

Creates a new Command with the specified words.

Parameters:
words String command supplied.

References args, commandWord, secondWord, and words.


Member Function Documentation

DString Command::getCommandWord (  ) 

DString Command::getSecondWord (  ) 

Returns the second word of this command.

References secondWord.

Referenced by Parser::processCommand().

static DString Command::getVersion (  )  [inline, static]

DString Command::getWholeCommandString (  )  const [inline]

References words.

Referenced by Parser::getSwapValue(), and Parser::start().

utils::DArray< DString > & Command::getWords (  )  const

Returns an ArrayList of the words of the supplied command (including the command itself).

References args.

Referenced by Parser::getHistoryValue(), print(), and Parser::processCommand().

bool Command::hasSecondWord (  ) 

Determines whether or not a command has a second word, which is usually the expression or parameter of the command.

References secondWord.

Referenced by Parser::processCommand().

bool Command::isUnknown (  ) 

Return true if this command was not a known command.

References commandWord.

Referenced by Parser::processCommand().

utils::DArray< DString > * Command::load ( DString  fileName  )  [static]

Loads a file as a variable in the LinAl object.

Parameters:
command Command Command to be Processed
la LinAl Stores variables

Referenced by Parser::main(), and Parser::processCommand().

DString Command::print ( const Command command,
double *  parameters,
int  numberOfParameters,
DHashMap< Plane< Double > > *  storedStuff,
DString *  currentDirectory 
) [static]

Prints a variable in the LinAl object.

Parameters:
command Command Command to be Processed
la LinAl Stores variables

References args, Functions::doFunction(), getWords(), and Functions::isFunction().

Referenced by Parser::processCommand().

void Command::save ( const Command command,
DString &  fileName,
utils::DArray< DString > *  output 
) [static]

References DEBUG_PRINT.

Referenced by Parser::processCommand().


Field Documentation

utils::DArray<DString>* Command::args [private]

Referenced by Command(), getWords(), and print().

DString* Command::commandWord [private]

Referenced by Command(), getCommandWord(), and isUnknown().

DString* Command::secondWord [private]

DString* Command::words [private]

Referenced by Command(), and getWholeCommandString().


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

Generated on Sat Feb 6 13:04:50 2010 by  doxygen 1.5.7.1