Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Humanoid Path Planner
hpp-rbprm-corba
Commits
b317b755
Commit
b317b755
authored
Oct 22, 2019
by
Guilhem Saurel
Browse files
Format
parent
05e12ede
Pipeline
#6468
failed with stage
in 3 minutes and 20 seconds
Changes
6
Pipelines
4
Expand all
Hide whitespace changes
Inline
Side-by-side
include/hpp/corbaserver/rbprm/server.hh
View file @
b317b755
...
...
@@ -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
src/fwd.hh
View file @
b317b755
...
...
@@ -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
src/hpp-rbprm-corba.cc
View file @
b317b755
...
...
@@ -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
);
}
src/rbprmbuilder.impl.cc
View file @
b317b755
This diff is collapsed.
Click to expand it.
src/rbprmbuilder.impl.hh
View file @
b317b755
This diff is collapsed.
Click to expand it.
src/server.cc
View file @
b317b755
...
...
@@ -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
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment