#ifndef COMMAND_H #define COMMAND_H #include class Command { public: Command(); virtual ~Command(); void addLiteral( const Bu::String &sValue ); void addParam( const Bu::String &sValue ); /** * Get the list of parameters IN REVERSE ORDER. */ Bu::StringList getParamList() const; void setAst( class AstBranch *pAst ); void print(); bool matches( const Bu::StringList &lCmd ); void exec( class GameState &gState, const Bu::StringList &lCmd ); private: class Chunk { public: Chunk( bool bLiteral, const Bu::String &sValue ) : bLiteral( bLiteral ), sValue( sValue ) { } bool bLiteral; Bu::String sValue; }; typedef Bu::List ChunkList; ChunkList lChunks; class AstBranch *pAst; }; #endif