hpp-corbaserver  4.9.0
Corba server for Humanoid Path Planner applications
paths.hh
Go to the documentation of this file.
1 #ifndef hpp_core_idl__paths_hxx__
2 #define hpp_core_idl__paths_hxx__
3 
4 //
5 // Implemention of IDL interfaces in file /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.9.0/idl/hpp/core_idl/paths.idl
6 //
7 
9 
10 #include <sstream>
11 
12 #include <hpp/corbaserver/fwd.hh>
15 
16 namespace hpp {
17 
18 namespace corbaServer {
19 
20 //
21 // Implementational code for IDL interface hpp::core_idl::Path
22 //
23 namespace core_impl {
24 template <typename _Base, typename _Storage>
26  : ServantBase<hpp::core::Path, _Storage> (server, s)
27 {
28  // add extra constructor code here
29 }
30 template <typename _Base, typename _Storage>
32 {
33  // add extra destructor code here
34 }
35 
36 // Methods corresponding to IDL attributes and operations
37 
38 template <typename _Base, typename _Storage>
40 {
41  try {
42  // automatically generated code.
43  _ServantBase::deleteThis();
44  } catch (const std::exception& e) {
45  throw ::hpp::Error (e.what());
46  }
47 }
48 
49 template <typename _Base, typename _Storage>
51 {
52  try {
53  // automatically generated code.
54 
55  hpp::size_type __return__ (getT()->outputSize ());
56 
57  return __return__;
58  } catch (const std::exception& e) {
59  throw ::hpp::Error (e.what());
60  }
61 }
62 
63 template <typename _Base, typename _Storage>
65 {
66  try {
67  // automatically generated code.
68 
69  hpp::size_type __return__ (getT()->outputDerivativeSize ());
70 
71  return __return__;
72  } catch (const std::exception& e) {
73  throw ::hpp::Error (e.what());
74  }
75 }
76 
77 template <typename _Base, typename _Storage>
79 {
80  try {
81  // automatically generated code.
82 
83  hpp::value_type __return__ (getT()->length ());
84 
85  return __return__;
86  } catch (const std::exception& e) {
87  throw ::hpp::Error (e.what());
88  }
89 }
90 
91 template <typename _Base, typename _Storage>
93 {
94  try {
95  // automatically generated code.
96 
98 
99  return __return__;
100  } catch (const std::exception& e) {
101  throw ::hpp::Error (e.what());
102  }
103 }
104 
105 template <typename _Base, typename _Storage>
107 {
108  try {
109  // automatically generated code.
110 
112 
113  return __return__;
114  } catch (const std::exception& e) {
115  throw ::hpp::Error (e.what());
116  }
117 }
118 
119 template <typename _Base, typename _Storage>
121 {
122  try {
123  // automatically generated code.
124  std::ostringstream oss; oss << *get();
125  std::string res = oss.str();
126  return CORBA::string_dup(res.c_str());
127  } catch (const std::exception& e) {
128  throw ::hpp::Error (e.what());
129  }
130 }
131 
132 template <typename _Base, typename _Storage>
134 {
135  try {
136  // automatically generated code.
137 
138  hpp::floatSeq* __return__ = hpp::corbaServer::vectorToFloatSeq (getT()->operator() (t, success));
139 
140  return __return__;
141  } catch (const std::exception& e) {
142  throw ::hpp::Error (e.what());
143  }
144 }
145 
146 template <typename _Base, typename _Storage>
148 {
149  try {
150  // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.9.0/idl/hpp/core_idl/paths.idl:22
151  vector_t res (get()->outputSize());
152  success = get()->at (t, res);
153  return vectorToFloatSeq (res);
154 
155  } catch (const std::exception& e) {
156  throw ::hpp::Error (e.what());
157  }
158 }
159 
160 template <typename _Base, typename _Storage>
162 {
163  try {
164  // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.9.0/idl/hpp/core_idl/paths.idl:22
165  vector_t res (get()->outputDerivativeSize());
166  get()->derivative (res, t, order);
167  return vectorToFloatSeq (res);
168 
169  } catch (const std::exception& e) {
170  throw ::hpp::Error (e.what());
171  }
172 }
173 
174 template <typename _Base, typename _Storage>
176 {
177  try {
178  // automatically generated code.
179 
180  hpp::core::PathPtr_t __return__ (getT()->extract (tmin, tmax));
181 
182  return makeServantDownCast<hpp::corbaServer::core_impl::Path,hpp::corbaServer::core_impl::Path>(server_, __return__)._retn();
183  } catch (const std::exception& e) {
184  throw ::hpp::Error (e.what());
185  }
186 }
187 
188 template <typename _Base, typename _Storage>
190 {
191  try {
192  // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.9.0/idl/hpp/core_idl/paths.idl:22
193  PathPtr_t p = get();
194  PathVectorPtr_t pv =
195  core::PathVector::create (p->outputSize(), p->outputDerivativeSize());
196  pv->appendPath (p);
197 
198  return makeServant<hpp::core_idl::PathVector_ptr>
199  (server_, new PathVector (server_, pv));
200 
201  } catch (const std::exception& e) {
202  throw ::hpp::Error (e.what());
203  }
204 }
205 
206 template <typename _Base, typename _Storage>
208 {
209  try {
210  // automatically generated code.
211 
212  hpp::core::PathPtr_t __return__ (getT()->reverse ());
213 
214  return makeServantDownCast<hpp::corbaServer::core_impl::Path,hpp::corbaServer::core_impl::Path>(server_, __return__)._retn();
215  } catch (const std::exception& e) {
216  throw ::hpp::Error (e.what());
217  }
218 }
219 
220 // End of implementational code
221 } // namespace core_impl
222 
223 //
224 // Implementational code for IDL interface hpp::core_idl::PathVector
225 //
226 namespace core_impl {
227 template <typename _Base, typename _Storage>
229  : hpp::corbaServer::core_impl::PathServant<_Base, _Storage> (server, s)
230 {
231  // add extra constructor code here
232 }
233 template <typename _Base, typename _Storage>
235 {
236  // add extra destructor code here
237 }
238 
239 // Methods corresponding to IDL attributes and operations
240 
241 template <typename _Base, typename _Storage>
243 {
244  try {
245  // automatically generated code.
246 
247  hpp::core_idl::size_t __return__ (getT()->numberPaths ());
248 
249  return __return__;
250  } catch (const std::exception& e) {
251  throw ::hpp::Error (e.what());
252  }
253 }
254 
255 template <typename _Base, typename _Storage>
257 {
258  try {
259  // automatically generated code.
260 
261  hpp::core::PathPtr_t __return__ (getT()->pathAtRank (rank));
262 
263  return makeServantDownCast<hpp::corbaServer::core_impl::Path,hpp::corbaServer::core_impl::Path>(server_, __return__)._retn();
264  } catch (const std::exception& e) {
265  throw ::hpp::Error (e.what());
266  }
267 }
268 
269 template <typename _Base, typename _Storage>
271 {
272  try {
273  // automatically generated code.
274  hpp::core::PathPtr_t _p = reference_to_servant_base<hpp::core::Path>(server_, p)->get();
275  (getT()->appendPath (_p));
276 
277 
278  } catch (const std::exception& e) {
279  throw ::hpp::Error (e.what());
280  }
281 }
282 
283 template <typename _Base, typename _Storage>
285 {
286  try {
287  // automatically generated code.
288  hpp::core::PathVectorPtr_t _p = reference_to_servant_base<hpp::core::PathVector>(server_, p)->get();
289  (getT()->concatenate (_p));
290 
291 
292  } catch (const std::exception& e) {
293  throw ::hpp::Error (e.what());
294  }
295 }
296 
297 // End of implementational code
298 } // namespace core_impl
299 
300 
301 
302 } // namespace hpp
303 
304 } // namespace corbaServer
305 
306 #endif // hpp_core_idl__paths_hxx__
307 
Definition: servant-base.hh:100
hpp::value_type length()
Definition: paths.hh:78
PathVectorServant< POA_hpp::core_idl::PathVector, boost::weak_ptr< hpp::core::PathVector > > PathVector
Definition: paths-fwd.hh:116
Implement CORBA interface ``Obstacle&#39;&#39;.
Definition: basic-server.hh:27
void deleteThis()
Definition: paths.hh:39
double value_type
Definition: common.idl:18
unsigned long long size_t
Definition: paths.idl:18
hpp::floatSeq * derivative(hpp::value_type t, ::CORBA::Short order)
Definition: paths.hh:161
hpp::floatSeq * initial()
Definition: paths.hh:92
hpp::core_idl::PathVector_ptr asVector()
Definition: paths.hh:189
Server * server_
Definition: servant-base.hh:97
hpp::core_idl::Path_ptr extract(hpp::value_type tmin, hpp::value_type tmax)
Definition: paths.hh:175
virtual ~PathServant()
Definition: paths.hh:31
hpp::size_type outputDerivativeSize()
Definition: paths.hh:64
hpp::floatSeq * end()
Definition: paths.hh:106
hpp::floatSeq * call(hpp::value_type t, ::CORBA::Boolean &success)
Definition: paths.hh:133
_objref_Path * Path_ptr
Definition: paths-idl.hh:100
void concatenate(hpp::core_idl::PathVector_ptr p)
Definition: paths.hh:284
pinocchio::vector_t vector_t
Definition: fwd.hh:83
char * str()
Definition: paths.hh:120
hpp::size_type outputSize()
Definition: paths.hh:50
hpp::core_idl::Path_ptr pathAtRank(hpp::core_idl::size_t rank)
Definition: paths.hh:256
virtual ~PathVectorServant()
Definition: paths.hh:234
hpp::floatSeq * at(hpp::value_type t, ::CORBA::Boolean &success)
Definition: paths.hh:147
_objref_PathVector * PathVector_ptr
Definition: paths-idl.hh:74
core::PathVectorPtr_t PathVectorPtr_t
Definition: fwd.hh:71
PathServant(Server *server, const _Storage &s)
Definition: paths.hh:25
void appendPath(hpp::core_idl::Path_ptr p)
Definition: paths.hh:270
Implementation of Hpp module Corba server.
Definition: server.hh:54
hpp::core_idl::size_t numberPaths()
Definition: paths.hh:242
Definition: paths-fwd.hh:25
hpp::core_idl::Path_ptr reverse()
Definition: paths.hh:207
PathVectorServant(Server *server, const _Storage &s)
Definition: paths.hh:228
floatSeq * vectorToFloatSeq(core::vectorIn_t input)
StorageElementShPtr_t getT() const
Definition: servant-base.hh:121
sequence< double > floatSeq
Robot configuration is defined by a sequence of dof value.
Definition: common.idl:32
core::PathPtr_t PathPtr_t
Definition: fwd.hh:68
long long size_type
Definition: common.idl:19