hpp-corbaserver  4.13.0
Corba server for Humanoid Path Planner applications
basic-server.hh
Go to the documentation of this file.
1 // Copyright (C) 2019 CNRS-LAAS
2 // Author: Joseph Mirabel
3 //
4 
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // 1. Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 //
12 // 2. Redistributions in binary form must reproduce the above copyright
13 // notice, this list of conditions and the following disclaimer in the
14 // documentation and/or other materials provided with the distribution.
15 //
16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
27 // DAMAGE.
28 
29 #ifndef HPP_CORBASERVER_BASIC_SERVER_HH
30 #define HPP_CORBASERVER_BASIC_SERVER_HH
31 
33 #include <stdexcept>
34 
35 namespace hpp {
36 namespace corbaServer {
38  public:
39  virtual ~ServerPlugin() {}
40 
42  virtual void startCorbaServer(const std::string& contextId,
43  const std::string& contextKind) = 0;
44 
45  virtual std::string name() const = 0;
46 
47  core::ProblemSolverPtr_t problemSolver() const {
48  return problemSolverMap_->selected();
49  }
50 
51  ProblemSolverMapPtr_t problemSolverMap() const { return problemSolverMap_; }
52 
55  problemSolverMap_ = psMap;
56  }
57 
58  protected:
59  ServerPlugin(bool multithread) : multithread_(multithread) {}
60 
63 }; // class ServerPlugin
64 } // namespace corbaServer
65 } // namespace hpp
66 
67 #endif // HPP_CORBASERVER_SERVER_PLUGIN_HH
shared_ptr< ProblemSolverMap > ProblemSolverMapPtr_t
Definition: fwd.hh:57
Definition: server-plugin.hh:50
void setProblemSolverMap(ProblemSolverMapPtr_t psMap)
Set planner that will be controlled by server.
Definition: basic-server.hh:54
ProblemSolverMapPtr_t problemSolverMap_
Definition: basic-server.hh:62
Implement CORBA interface ``Obstacle&#39;&#39;.
Definition: basic-server.hh:35
virtual ~ServerPlugin()
Definition: basic-server.hh:39
ProblemSolverMapPtr_t problemSolverMap() const
Definition: basic-server.hh:51
bool multithread_
Definition: basic-server.hh:61
ServerPlugin(bool multithread)
Definition: basic-server.hh:59
#define HPP_CORBASERVER_DLLAPI
Definition: config.hh:64
core::ProblemSolverPtr_t problemSolver() const
Definition: basic-server.hh:47
Definition: basic-server.hh:37