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

command.h

Go to the documentation of this file.
00001 
00009 #if !defined(COMMAND_H)
00010 #define COMMAND_H
00011 
00012 #include "haio.h"
00013 #include "haconst.h"
00014 #include "hastl.h"
00015 #include "hastring.h"
00016 
00017 const int MAXBUFFLEN = 2560;
00018 
00019 /* Format values are related to Tokens */
00020 #define Tok2Format(x) ((x)-359)
00021 #define Format2Tok(x) ((x)+359)
00022 
00023 const int FormatPDB      = 1;
00024 const int FormatMacroMod = 2;
00025 const int FormatGaussian = 3;
00026 const int FormatAlchemy  = 4;
00027 const int FormatNMRPDB   = 5;
00028 const int FormatCharmm   = 6;
00029 const int FormatBiosym   = 7;
00030 const int FormatMOPAC    = 8;
00031 const int FormatSHELX    = 9;
00032 const int FormatMol2     = 10;
00033 const int FormatFDAT     = 11;
00034 const int FormatMMDB     = 12;
00035 const int FormatMDL      = 13;
00036 const int FormatXYZ      = 14;
00037 const int FormatCIF      = 15;
00038 const int FormatCEX      = 16;
00039 const int FormatRWF      = 17;
00040 const int FormatHarlem    = 18;
00041 const int FormatAmberPrep = 19;
00042 
00043 class Expr;
00044 class HaMolSet;
00045 
00046 class CmdParser
00048 {
00049 public:
00050         CmdParser();
00051         virtual ~CmdParser();
00052         
00053         int CurToken;                
00054 
00055         char CurLine[MAXBUFFLEN];    
00056 
00057         deque<HaString> cmd_history;  
00058         static int max_history_save;
00059         int cur_history_cmd;
00060         
00061         static map<HaString,int, less<HaString> > Keywords;        
00062         static int keys_init;                                      
00063         static int InitKeywords();                                 
00064         static int RegisterKeyword(HaString keyw, const int itok); 
00065 
00066         Long TokenValue;         
00067         double TokenValueFloat;  
00068         HaString TokenIdent;     
00069         char *TokenStart;        
00070         char *TokenPtr;          
00071                                                                 
00072         HaString RollHistory(int step);   
00073 
00074         void CommandError(const char* error );                        
00075         int LookUpKeyword();                             
00076         int FetchToken();                                
00077         int NextIf(int token, const char* error );
00078         int ParseColour(int& RVal, int& GVal, int& BVal); 
00079         Expr* ParseRange(int neg );
00080         Expr* ParseExpression(int level,HaMolSet* pmset); 
00081 };
00082 
00083 
00084 #ifdef _WIN32
00085 #define DirChar  '\\'
00086 #else
00087 #define DirChar  '/'
00088 #endif
00089 
00090 
00091 #endif /* !defined(COMMAND_H) */

Generated on Tue Feb 17 02:03:02 2004 for harlem by doxygen 1.3.6