Commit b317b755 authored by Guilhem Saurel's avatar Guilhem Saurel

Format

parent 05e12ede
Pipeline #6465 failed with stage
in 1 minute and 3 seconds
......@@ -18,37 +18,35 @@
// <http://www.gnu.org/licenses/>.
#ifndef HPP_RBPRM_CORBA_SERVER_HH
# define HPP_RBPRM_CORBA_SERVER_HH
#define HPP_RBPRM_CORBA_SERVER_HH
# include <hpp/corba/template/server.hh>
#include <hpp/corba/template/server.hh>
# include <hpp/corbaserver/problem-solver-map.hh>
# include <hpp/corbaserver/rbprm/config.hh>
# include <hpp/corbaserver/server-plugin.hh>
#include <hpp/corbaserver/problem-solver-map.hh>
#include <hpp/corbaserver/rbprm/config.hh>
#include <hpp/corbaserver/server-plugin.hh>
namespace hpp {
namespace rbprm {
namespace impl {
class RbprmBuilder;
}
class HPP_RBPRM_CORBA_DLLAPI Server : public corbaServer::ServerPlugin
{
public:
Server (corbaServer::Server* parent);
~Server ();
/// Start corba server
/// Call hpp::corba::Server <impl::Problem>::startCorbaServer
void startCorbaServer(const std::string& contextId,
const std::string& contextKind);
std::string name () const;
public:
corba::Server <impl::RbprmBuilder>* rbprmBuilder_;
}; // class Server
} // namespace rbprm
} // namespace hpp
#endif // HPP_RBPRM_CORBA_SERVER_HH
namespace rbprm {
namespace impl {
class RbprmBuilder;
}
class HPP_RBPRM_CORBA_DLLAPI Server : public corbaServer::ServerPlugin {
public:
Server(corbaServer::Server* parent);
~Server();
/// Start corba server
/// Call hpp::corba::Server <impl::Problem>::startCorbaServer
void startCorbaServer(const std::string& contextId, const std::string& contextKind);
std::string name() const;
public:
corba::Server<impl::RbprmBuilder>* rbprmBuilder_;
}; // class Server
} // namespace rbprm
} // namespace hpp
#endif // HPP_RBPRM_CORBA_SERVER_HH
......@@ -16,12 +16,11 @@
// <http://www.gnu.org/licenses/>.
#ifndef HPP_MANIPULATION_CORBA_FWD_HH
# define HPP_MANIPULATION_CORBA_FWD_HH
#define HPP_MANIPULATION_CORBA_FWD_HH
namespace hpp {
namespace manipulation {
namespace corba {
}
}
}
#endif // HPP_MANIPULATION_CORBA_FWD_HH
namespace manipulation {
namespace corba {}
} // namespace manipulation
} // namespace hpp
#endif // HPP_MANIPULATION_CORBA_FWD_HH
......@@ -19,15 +19,13 @@
#include <hpp/core/problem-solver.hh>
typedef hpp::corbaServer::Server CorbaServer;
int main (int argc, char* argv [])
{
hpp::core::ProblemSolverPtr_t problemSolver (hpp::core::ProblemSolver::create());
int main(int argc, char* argv[]) {
hpp::core::ProblemSolverPtr_t problemSolver(hpp::core::ProblemSolver::create());
CorbaServer corbaServer (problemSolver, argc,
const_cast<const char**> (argv), true);
CorbaServer corbaServer(problemSolver, argc, const_cast<const char**>(argv), true);
corbaServer.startCorbaServer ();
corbaServer.loadPlugin (corbaServer.mainContextId (), "rbprm-corba.so");
corbaServer.loadPlugin (corbaServer.mainContextId (), "affordance-corba.so");
corbaServer.processRequest(true);
corbaServer.startCorbaServer();
corbaServer.loadPlugin(corbaServer.mainContextId(), "rbprm-corba.so");
corbaServer.loadPlugin(corbaServer.mainContextId(), "affordance-corba.so");
corbaServer.processRequest(true);
}
This diff is collapsed.
This diff is collapsed.
......@@ -24,37 +24,26 @@
#include <hpp/corbaserver/server.hh>
namespace hpp {
namespace rbprm {
Server::Server (corbaServer::Server* server)
: corbaServer::ServerPlugin (server),
rbprmBuilder_ (NULL)
{}
Server::~Server ()
{
if (rbprmBuilder_) delete rbprmBuilder_;
}
std::string Server::name () const
{
return "rbprm";
}
/// Start corba server
void Server::startCorbaServer(const std::string& contextId,
const std::string& contextKind)
{
bool mThd = parent()->multiThread();
rbprmBuilder_ = new corba::Server <impl::RbprmBuilder> (0, NULL, mThd, "child");
rbprmBuilder_->implementation ().setServer (this);
if (rbprmBuilder_->startCorbaServer(contextId, contextKind,
"rbprm", "rbprmbuilder") != 0) {
HPP_THROW_EXCEPTION (hpp::Exception,
"Failed to start corba rbprm server.");
}
}
} // namespace rbprm
} // namespace hpp
namespace rbprm {
Server::Server(corbaServer::Server* server) : corbaServer::ServerPlugin(server), rbprmBuilder_(NULL) {}
Server::~Server() {
if (rbprmBuilder_) delete rbprmBuilder_;
}
std::string Server::name() const { return "rbprm"; }
/// Start corba server
void Server::startCorbaServer(const std::string& contextId, const std::string& contextKind) {
bool mThd = parent()->multiThread();
rbprmBuilder_ = new corba::Server<impl::RbprmBuilder>(0, NULL, mThd, "child");
rbprmBuilder_->implementation().setServer(this);
if (rbprmBuilder_->startCorbaServer(contextId, contextKind, "rbprm", "rbprmbuilder") != 0) {
HPP_THROW_EXCEPTION(hpp::Exception, "Failed to start corba rbprm server.");
}
}
} // namespace rbprm
} // namespace hpp
HPP_CORBASERVER_DEFINE_PLUGIN(hpp::rbprm::Server)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment