Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

CmdParser Class Reference

Class to process RASMOL-like text commands. More...

#include <command.h>

List of all members.

Public Member Functions

HaString RollHistory (int step)
 Retrieve a command from the history.

void CommandError (const char *error)
int LookUpKeyword ()
 Get an integer value for a current token(TokenIdent) return IdentTok if keyword is not registered in Keywords map.

int FetchToken ()
 Get Next token in the line after TokenPtr.

int NextIf (int token, const char *error)
int ParseColour (int &RVal, int &GVal, int &BVal)
 Set RGB value corresponging to the colour.

ExprParseRange (int neg)
ExprParseExpression (int level, HaMolSet *pmset)
 Parse str_parse and form a logical expression in QParse.


Static Public Member Functions

int InitKeywords ()
 function to initiate map of keywords

int RegisterKeyword (HaString keyw, const int itok)
 Register(add) keyword to the Keywords map.


Public Attributes

int CurToken
 the integer value of the token in Keywords map

char CurLine [MAXBUFFLEN]
 Line with the command to process.

deque< HaStringcmd_history
 History of commands entered.

int cur_history_cmd
Long TokenValue
 Integer value of the current token.

double TokenValueFloat
 Float value of the current token.

HaString TokenIdent
 String value of the current token (if in "" quotes).

char * TokenStart
 Starting position of the string token (if without "" quotes).

char * TokenPtr
 Current pointer in the line to read the command.


Static Public Attributes

int max_history_save = 1000
map< HaString, int, less<
HaString > > 
Keywords
 Map of Keywords.

int keys_init = FALSE
 flag to indicate that keywords map was initiated


Detailed Description

Class to process RASMOL-like text commands.


The documentation for this class was generated from the following files:
Generated on Tue Feb 17 02:03:14 2004 for harlem by doxygen 1.3.6