29#ifndef HPP_CORBASERVER_BASIC_SERVER_HH
30#define HPP_CORBASERVER_BASIC_SERVER_HH
32#include <hpp/corba/template/server.hh>
34#include <hpp/util/exception.hh>
42namespace corbaServer {
56 void startCorbaServer(
const std::string& contextId,
57 const std::string& contextKind);
59 ::CORBA::Object_ptr servant(
const std::string& name)
const;
61 std::string name()
const;
64 corba::Server<impl::Obstacle>* obstacleImpl_;
65 corba::Server<impl::Problem>* problemImpl_;
66 corba::Server<impl::Robot>* robotImpl_;
76 if (obstacleImpl_)
delete obstacleImpl_;
77 if (problemImpl_)
delete problemImpl_;
78 if (robotImpl_)
delete robotImpl_;
91 obstacleImpl_->implementation().setServer(
this);
92 problemImpl_->implementation().setServer(
this);
93 robotImpl_->implementation().setServer(
this);
97 if (
name ==
"obstacle")
return obstacleImpl_->implementation()._this();
98 if (
name ==
"problem")
return problemImpl_->implementation()._this();
99 if (
name ==
"robot")
return robotImpl_->implementation()._this();
100 throw std::invalid_argument(
"No servant " +
name);
Definition obstacle-idl.hh:94
Definition problem-idl.hh:138
Definition robot-idl.hh:98
Definition basic-server.hh:49
void startCorbaServer(const std::string &contextId, const std::string &contextKind)
Start corba server.
Definition basic-server.hh:84
std::string name() const
Definition basic-server.hh:81
~BasicServer()
Definition basic-server.hh:75
::CORBA::Object_ptr servant(const std::string &name) const
Definition basic-server.hh:96
BasicServer(Server *parent)
Definition basic-server.hh:69
Definition server-plugin.hh:50
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:82
Implementation of Hpp module Corba server.
Definition server.hh:78
#define HPP_CORBASERVER_LOCAL
Definition config.hh:92
ReturnType::Object_var makeServantDownCast(Server *server, const typename ServantBaseType::Storage &t)
Definition servant-base.hh:407
Implement CORBA interface `‘Obstacle’'.
Definition client.hh:46