35#ifndef HPP_CORBASERVER_SERVER_HH
36#define HPP_CORBASERVER_SERVER_HH
38#include <omniORB4/CORBA.h>
40#include <hpp/corba/template/server.hh>
46namespace 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(); }
143 CORBA::Object_ptr
getServer(
const std::string& contextName,
144 const std::string& pluginName,
145 const std::string& objectName);
151 const std::string& libFilename);
162 PortableServer::Servant servant);
173 void parseArguments(
int argc,
const char* argv[]);
177 corba::Server<Tools>* tools_;
179 std::string ORBendPoint;
180 std::string mainContextId_;
182 bool multiThread_, nameService_;
193 typedef shared_ptr<ServerPlugin> ServerPluginPtr_t;
194 typedef std::map<std::string, ServerPluginPtr_t> ServerPluginMap_t;
196 ServerPluginPtr_t main;
197 ServerPluginMap_t plugins;
199 std::map<std::string, Context> contexts_;
201 Context& getContext(
const std::string& name);
203 typedef std::map<ServantKey, PortableServer::Servant>
204 ServantKeyToServantMap_t;
205 typedef std::map<PortableServer::Servant, ServantKey>
206 ServantToServantKeyMap_t;
207 ServantKeyToServantMap_t servantKeyToServantMap_;
208 ServantToServantKeyMap_t servantToServantKeyMap_;
Implementation of Hpp module Corba server.
Definition: server.hh:77
void requestShutdown(bool wait)
std::vector< std::string > getContexts() const
CORBA::Object_ptr getServer(const std::string &contextName, const std::string &pluginName, const std::string &objectName)
PortableServer::Servant getServant(ServantKey servantKey) const
bool createContext(const std::string &contextName)
CORBA::ORB_var orb()
Definition: server.hh:112
const bool & nameService() const
Definition: server.hh:123
ProblemSolverMapPtr_t problemSolverMap()
const std::string & mainContextId() const
Get main context ID.
Definition: server.hh:119
void addServantKeyAndServant(ServantKey servantKey, PortableServer::Servant servant)
~Server()
Shutdown CORBA server.
const bool & multiThread() const
Definition: server.hh:121
Server(core::ProblemSolverPtr_t problemSolver, int argc, const char *argv[], bool multiThread=false)
void removeServant(PortableServer::Servant servant)
bool loadPlugin(const std::string &contextName, const std::string &libFilename)
int processRequest(bool loop)
If ORB work is pending, process it.
void startCorbaServer()
Initialize CORBA server to process requests from clients.
PortableServer::POA_var poa()
Definition: server.hh:110
void * ServantKey
Definition: server.hh:157
Server(ProblemSolverMapPtr_t problemSolverMap, int argc, const char *argv[], bool multiThread=false)
core::ProblemSolverPtr_t problemSolver()
bool deleteContext(const std::string &contextName)
#define HPP_CORBASERVER_DLLAPI
Definition: config.hh:64
shared_ptr< ProblemSolverMap > ProblemSolverMapPtr_t
Definition: fwd.hh:58
Implement CORBA interface `‘Obstacle’'.
Definition: basic-server.hh:35