35 #ifndef HPP_CORBASERVER_SERVER_HH 36 #define HPP_CORBASERVER_SERVER_HH 38 #include <omniORB4/CORBA.h> 40 #include <hpp/corba/template/server.hh> 46 namespace corbaServer {
90 Server(core::ProblemSolverPtr_t problemSolver,
int argc,
const char* argv[],
91 bool multiThread =
false);
105 bool multiThread =
false);
110 PortableServer::POA_var
poa() {
return tools_->main_poa(); }
112 CORBA::ORB_var
orb() {
return tools_->orb(); }
116 void startCorbaServer();
129 int processRequest(
bool loop);
135 void requestShutdown(
bool wait);
137 bool createContext(
const std::string& contextName);
139 CORBA::Object_ptr getServer(
const std::string& contextName,
140 const std::string& pluginName,
141 const std::string& objectName);
146 bool loadPlugin(
const std::string& contextName,
147 const std::string& libFilename);
151 core::ProblemSolverPtr_t problemSolver();
155 PortableServer::Servant getServant(
ServantKey servantKey)
const;
157 void addServantKeyAndServant(
ServantKey servantKey,
158 PortableServer::Servant servant);
160 void removeServant(PortableServer::Servant servant);
162 void clearServantsMap();
169 void parseArguments(
int argc,
const char* argv[]);
173 corba::Server<Tools>* tools_;
175 std::string ORBendPoint;
176 std::string mainContextId_;
178 bool multiThread_, nameService_;
189 typedef shared_ptr<ServerPlugin> ServerPluginPtr_t;
190 typedef std::map<std::string, ServerPluginPtr_t> ServerPluginMap_t;
192 ServerPluginPtr_t main;
193 ServerPluginMap_t plugins;
195 std::map<std::string, Context> contexts_;
197 Context& getContext(
const std::string& name);
199 typedef std::map<ServantKey, PortableServer::Servant>
200 ServantKeyToServantMap_t;
201 typedef std::map<PortableServer::Servant, ServantKey>
202 ServantToServantKeyMap_t;
203 ServantKeyToServantMap_t servantKeyToServantMap_;
204 ServantToServantKeyMap_t servantToServantKeyMap_;
shared_ptr< ProblemSolverMap > ProblemSolverMapPtr_t
Definition: fwd.hh:57
Implement CORBA interface `‘Obstacle’'.
Definition: basic-server.hh:35
CORBA::ORB_var orb()
Definition: server.hh:112
PortableServer::POA_var poa()
Definition: server.hh:110
#define HPP_CORBASERVER_DLLAPI
Definition: config.hh:64
const std::string & mainContextId() const
Get main context ID.
Definition: server.hh:119
Implementation of Hpp module Corba server.
Definition: server.hh:77
const bool & multiThread() const
Definition: server.hh:121
void * ServantKey
Definition: server.hh:153
const bool & nameService() const
Definition: server.hh:123