ParserScriptingAccess.hpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef ORO_EXECUTION_PARSER_SCRIPTING_ACCESS_HPP
00040 #define ORO_EXECUTION_PARSER_SCRIPTING_ACCESS_HPP
00041
00042 #include "../ScriptingAccess.hpp"
00043 #include "../OperationInterface.hpp"
00044 #include "../rtt-config.h"
00045
00046 namespace RTT
00047 {
00048 class StatementProcessor;
00049
00055 class RTT_API ParserScriptingAccess
00056 : public ScriptingAccess
00057 {
00058 protected:
00059 StatementProcessor* sproc;
00060 bool doExecute(const std::string& code);
00061
00062 bool doLoadPrograms( std::string filename );
00063 bool doLoadProgramText( std::string code );
00064 bool doUnloadProgram( std::string name );
00065
00066 bool doLoadStateMachines( std::string filename );
00067 bool doLoadStateMachineText( std::string code );
00068 bool doUnloadStateMachine( std::string name );
00069
00070 OperationInterface* createTaskObject(OperationInterface* obj);
00071 public:
00072 ParserScriptingAccess( TaskContext* parent );
00073
00074 virtual ~ParserScriptingAccess();
00075
00076 virtual int execute( const std::string& code );
00077
00078 virtual DispatchInterface::shared_ptr getCommand( int ticket );
00079
00080 virtual Functions loadFunctions(std::string filename, bool do_throw = false );
00081 virtual Functions loadFunctions(std::string code, std::string filename, bool do_throw = false );
00082
00083 virtual bool loadPrograms( std::string filename, bool do_throw = false );
00084 virtual bool loadPrograms( std::string code, std::string filename, bool do_throw = false );
00085 virtual bool unloadProgram( std::string name, bool do_throw = false );
00086
00087 virtual bool loadStateMachines( std::string filename, bool do_throw = false );
00088 virtual bool loadStateMachines( std::string code, std::string filename, bool do_throw = false );
00089 virtual bool unloadStateMachine( std::string name, bool do_throw = false );
00090
00091 };
00092 }
00093
00094 #endif