#ifndef GAME_BUILDER_H #define GAME_BUILDER_H #include #include "variable.h" #include "astnode.h" class GameBuilder { public: GameBuilder(); virtual ~GameBuilder(); void setLiteral( const Variable &v ); void setGameParam( const Bu::String &sName ); void beginFunction( const Bu::String &sName ); void addFunctionParam( const Bu::String &sName ); void endFunction(); void beginSituation( const Bu::String &sName ); void endSituation(); void addNode( AstNode::Type iType ); void closeNode(); void addLiteral( const Variable &v ); void addVarRef( const Bu::String &sName ); void addFuncCall( const Bu::String &sName ); void beginGlobal(); void closeGlobal(); void beginCommand( const Bu::String &sValue ); void addCommandLiteral( const Bu::String &sValue ); void addCommandParam( const Bu::String &sValue ); void closeCommand(); private: class Game *pGame; bool bGlobal; Variable vLiteral; class AstBranch *pCurNode; class AstBranch *pCurRoot; class Command *pCurCmd; class AstFunction *pCurFnc; }; #endif