ScriptingAccessProxy.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_SCRIPTING_ACCESS_PROXY_HPP
00040 #define ORO_EXECUTION_SCRIPTING_ACCESS_PROXY_HPP
00041
00042 #include "corba.h"
00043 #ifdef CORBA_IS_TAO
00044 #include <tao/corba.h>
00045 #include <tao/PortableServer/PortableServer.h>
00046 #else
00047 #include <omniORB4/CORBA.h>
00048 #include <omniORB4/poa.h>
00049 #endif
00050
00051 #include "ScriptingAccessC.h"
00052 #include "../ScriptingAccess.hpp"
00053
00054 namespace RTT
00055 {namespace Corba
00056 {
00057
00061 class RTT_CORBA_API ScriptingAccessProxy
00062 : public RTT::ScriptingAccess
00063 {
00064 protected:
00065 Corba::ScriptingAccess_var msa;
00066 public:
00067 ScriptingAccessProxy( Corba::ScriptingAccess_ptr sa )
00068 : ScriptingAccess( 0 ),
00069 msa( Corba::ScriptingAccess::_duplicate( sa ) )
00070 {}
00071
00072 virtual ~ScriptingAccessProxy();
00073
00074 using ScriptingAccess::loadPrograms;
00075 using ScriptingAccess::loadStateMachines;
00076
00077 virtual int execute( const std::string& code );
00078 virtual DispatchInterface::shared_ptr getCommand( int ticket );
00079
00080 virtual bool hasProgram( std::string name) const;
00081 virtual bool loadPrograms( std::string code, std::string filename, bool do_throw = false );
00082 virtual bool unloadProgram( std::string name, bool do_throw = false );
00083
00084 virtual std::vector<std::string> getPrograms() const;
00085 virtual int getProgramLine(std::string name) const;
00086 virtual std::string getProgramText(std::string name ) const;
00087 virtual std::string getProgramStatus(std::string name ) const;
00088
00089 virtual bool loadStateMachines( std::string code, std::string filename, bool do_throw = false );
00090 virtual bool unloadStateMachine( std::string name, bool do_throw = false );
00091
00092 virtual bool hasStateMachine( std::string name) const;
00093 virtual std::vector<std::string> getStateMachines() const;
00094 virtual std::string getStateMachineText(std::string name ) const;
00095 virtual std::string getStateMachineStatus(std::string name ) const;
00096 virtual int getStateMachineLine(std::string name ) const;
00097 virtual std::string getCurrentState(std::string name ) const;
00098 };
00099 }}
00100
00101 #endif