20 #ifndef HPP_CORBASERVER_SERVER_PLUGIN_HH 21 # define HPP_CORBASERVER_SERVER_PLUGIN_HH 25 # include <hpp/util/exception.hh> 27 # include <hpp/corbaserver/config.hh> 34 #define HPP_CORBASERVER_DEFINE_PLUGIN(PluginClassName) \ 36 ::hpp::corbaServer::ServerPlugin* createServerPlugin (::hpp::corbaServer::Server* server) \ 38 return new PluginClassName (server); \ 43 namespace corbaServer {
50 virtual void startCorbaServer (
const std::string& contextId,
51 const std::string& contextKind) = 0;
53 virtual std::string name()
const = 0;
55 virtual ::CORBA::Object_ptr servant (
const std::string& name)
const = 0;
64 return problemSolverMap_->selected();
69 return problemSolverMap_;
75 problemSolverMap_ = psMap;
86 const std::string& contextId,
87 const std::string& contextKind,
88 const std::string& objectId,
89 const std::string& objectKind)
94 int ret = parent()->nameService()
99 throw std::runtime_error (
"Failed to start corba " 100 + contextId +
'.' + contextKind +
'/' 101 + objectId +
'.' + objectKind
109 #endif // HPP_CORBASERVER_SERVER_PLUGIN_HH Server * parent()
Definition: server-plugin.hh:57
Definition: server-plugin.hh:44
Implement CORBA interface ``Obstacle''.
ProblemSolverMapPtr_t problemSolverMap_
Definition: server-plugin.hh:83
virtual ~ServerPlugin()
Definition: server-plugin.hh:47
ServerPlugin(Server *parent)
Definition: server-plugin.hh:79
boost::shared_ptr< ProblemSolverMap > ProblemSolverMapPtr_t
Definition: fwd.hh:34
Server * parent_
Definition: server-plugin.hh:82
int startCorbaServer(const std::string &contextId, const std::string &contextKind, const std::string &objectId, const std::string &objectKind)
void setProblemSolverMap(ProblemSolverMapPtr_t psMap)
Set planner that will be controlled by server.
Definition: server-plugin.hh:73
Implementation of Hpp module Corba server.
Definition: server.hh:54
void initializeTplServer(corba::Server< T > *&server, const std::string &contextId, const std::string &contextKind, const std::string &objectId, const std::string &objectKind)
Definition: server-plugin.hh:85
core::ProblemSolverPtr_t problemSolver() const
Definition: server-plugin.hh:62
bool initRootPOA(bool inMultiThread)
ProblemSolverMapPtr_t problemSolverMap() const
Definition: server-plugin.hh:67