hpp-corbaserver: src/hpp/core_idl/paths.hh Source File

hpp-corbaserver 9.0.2 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-9.0.2/idl/hpp/core_idl/paths.idl
6 //
7
8 #include <hpp/core_idl/paths-fwd.hh>
9
10 #include <sstream>
11
12 #include <hpp/corbaserver/fwd.hh>
13 #include <hpp/corbaserver/conversions.hh>
14 #include "hpp/corbaserver/servant-base.hh"
15
16
17
18 //
19 // Implementational code for IDL interface hpp::core_idl::Path
20 //
21 namespace hpp {
22
23 namespace core_impl {
24 template <typename _Base, typename _Storage>
25 PathServant<_Base, _Storage>::PathServant(::hpp::corbaServer::Server* server,
26 const _Storage& s)
27 : hpp::corbaServer::ServantBase<hpp::core::Path, _Storage> (server, s)
28 {
29 // add extra constructor code here
30 }
31 template <typename _Base, typename _Storage>
32 PathServant<_Base, _Storage>::~PathServant()
33 {
34 // add extra destructor code here
35 }
36
37 // Methods corresponding to IDL attributes and operations
38
39 template <typename _Base, typename _Storage>
40 void PathServant<_Base, _Storage>::deleteThis ()
41 {
42 try {
43 // automatically generated code.
44 _ServantBase::deleteThis();
45 } catch (const std::exception& e) {
46 throw ::hpp::Error (e.what());
47 }
48 }
49
50 template <typename _Base, typename _Storage>
51 ::CORBA::Boolean PathServant<_Base, _Storage>::deleteIfExpired ()
52 {
53 try {
54 // automatically generated code.
55 return _ServantBase::deleteIfExpired();
56 } catch (const std::exception& e) {
57 throw ::hpp::Error (e.what());
58 }
59 }
60
61 template <typename _Base, typename _Storage>
62 void PathServant<_Base, _Storage>::persistantStorage (::CORBA::Boolean persistant)
63 {
64 try {
65 // automatically generated code.
66 _ServantBase::persistantStorage(persistant);
67 } catch (const std::exception& e) {
68 throw ::hpp::Error (e.what());
69 }
70 }
71
72 template <typename _Base, typename _Storage>
73 hpp::size_type PathServant<_Base, _Storage>::outputSize ()
74 {
75 try {
76 // automatically generated code.
77
78 hpp::size_type __return__ (getT()->outputSize ());
79
80 return __return__;
81 } catch (const std::exception& e) {
82 throw ::hpp::Error (e.what());
83 }
84 }
85
86 template <typename _Base, typename _Storage>
87 hpp::size_type PathServant<_Base, _Storage>::outputDerivativeSize ()
88 {
89 try {
90 // automatically generated code.
91
92 hpp::size_type __return__ (getT()->outputDerivativeSize ());
93
94 return __return__;
95 } catch (const std::exception& e) {
96 throw ::hpp::Error (e.what());
97 }
98 }
99
100 template <typename _Base, typename _Storage>
101 hpp::value_type PathServant<_Base, _Storage>::length ()
102 {
103 try {
104 // automatically generated code.
105
106 hpp::value_type __return__ (getT()->length ());
107
108 return __return__;
109 } catch (const std::exception& e) {
110 throw ::hpp::Error (e.what());
111 }
112 }
113
114 template <typename _Base, typename _Storage>
115 hpp::floatSeq* PathServant<_Base, _Storage>::initial ()
116 {
117 try {
118 // automatically generated code.
119
120 hpp::floatSeq* __return__ = hpp::corbaServer::vectorToFloatSeq (getT()->initial ());
121
122 return __return__;
123 } catch (const std::exception& e) {
124 throw ::hpp::Error (e.what());
125 }
126 }
127
128 template <typename _Base, typename _Storage>
129 hpp::floatSeq* PathServant<_Base, _Storage>::end ()
130 {
131 try {
132 // automatically generated code.
133
134 hpp::floatSeq* __return__ = hpp::corbaServer::vectorToFloatSeq (getT()->end ());
135
136 return __return__;
137 } catch (const std::exception& e) {
138 throw ::hpp::Error (e.what());
139 }
140 }
141
142 template <typename _Base, typename _Storage>
143 hpp::core_idl::ConstraintSet_ptr PathServant<_Base, _Storage>::constraints ()
144 {
145 try {
146 // automatically generated code.
147
148 hpp::core::ConstraintSetPtr_t __return__ (getT()->constraints ());
149
150 return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Constraint,hpp::core_impl::ConstraintSet>(server_, __return__)._retn();
151 } catch (const std::exception& e) {
152 throw ::hpp::Error (e.what());
153 }
154 }
155
156 template <typename _Base, typename _Storage>
157 char* PathServant<_Base, _Storage>::str ()
158 {
159 try {
160 // automatically generated code.
161 std::ostringstream oss; oss << *get();
162 std::string res = oss.str();
163 return CORBA::string_dup(res.c_str());
164 } catch (const std::exception& e) {
165 throw ::hpp::Error (e.what());
166 }
167 }
168
169 template <typename _Base, typename _Storage>
170 hpp::floatSeq* PathServant<_Base, _Storage>::call (hpp::value_type t, ::CORBA::Boolean& success)
171 {
172 try {
173 // automatically generated code.
174
175 hpp::floatSeq* __return__ = hpp::corbaServer::vectorToFloatSeq (getT()->eval (t, success));
176
177 return __return__;
178 } catch (const std::exception& e) {
179 throw ::hpp::Error (e.what());
180 }
181 }
182
183 template <typename _Base, typename _Storage>
184 hpp::floatSeq* PathServant<_Base, _Storage>::at (hpp::value_type t, ::CORBA::Boolean& success)
185 {
186 try {
187 // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-9.0.2/idl/hpp/core_idl/paths.idl:23
188 hpp::core::vector_t res (get()->outputSize());
189 success = get()->at (t, res);
190 return hpp::corbaServer::vectorToFloatSeq (res);
191
192 } catch (const std::exception& e) {
193 throw ::hpp::Error (e.what());
194 }
195 }
196
197 template <typename _Base, typename _Storage>
198 hpp::floatSeq* PathServant<_Base, _Storage>::derivative (hpp::value_type t, ::CORBA::Short order)
199 {
200 try {
201 // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-9.0.2/idl/hpp/core_idl/paths.idl:23
202 hpp::core::vector_t res (get()->outputDerivativeSize());
203 get()->derivative (res, t, order);
204 return hpp::corbaServer::vectorToFloatSeq (res);
205
206 } catch (const std::exception& e) {
207 throw ::hpp::Error (e.what());
208 }
209 }
210
211 template <typename _Base, typename _Storage>
212 hpp::core_idl::Path_ptr PathServant<_Base, _Storage>::extract (hpp::value_type tmin, hpp::value_type tmax)
213 {
214 try {
215 // automatically generated code.
216
217 hpp::core::PathPtr_t __return__ (getT()->extract (tmin, tmax));
218
219 return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Path,hpp::core_impl::Path>(server_, __return__)._retn();
220 } catch (const std::exception& e) {
221 throw ::hpp::Error (e.what());
222 }
223 }
224
225 template <typename _Base, typename _Storage>
226 hpp::core_idl::PathVector_ptr PathServant<_Base, _Storage>::asVector ()
227 {
228 try {
229 // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-9.0.2/idl/hpp/core_idl/paths.idl:23
230 hpp::core::PathPtr_t p = get();
231 hpp::core::PathVectorPtr_t pv =
232 hpp::core::PathVector::create (p->outputSize(), p->outputDerivativeSize());
233 pv->appendPath (p);
234
235 return hpp::corbaServer::makeServant<hpp::core_idl::PathVector_ptr>
236 (server_, new PathVector (server_, pv));
237
238 } catch (const std::exception& e) {
239 throw ::hpp::Error (e.what());
240 }
241 }
242
243 template <typename _Base, typename _Storage>
244 hpp::core_idl::Path_ptr PathServant<_Base, _Storage>::reverse ()
245 {
246 try {
247 // automatically generated code.
248
249 hpp::core::PathPtr_t __return__ (getT()->reverse ());
250
251 return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Path,hpp::core_impl::Path>(server_, __return__)._retn();
252 } catch (const std::exception& e) {
253 throw ::hpp::Error (e.what());
254 }
255 }
256
257 // End of implementational code
258 } // namespace core_impl
259
260 } // namespace hpp
261
262 //
263 // Implementational code for IDL interface hpp::core_idl::PathVector
264 //
265 namespace hpp {
266
267 namespace core_impl {
268 template <typename _Base, typename _Storage>
269 PathVectorServant<_Base, _Storage>::PathVectorServant(::hpp::corbaServer::Server* server,
270 const _Storage& s)
271 : hpp::core_impl::PathServant<_Base, _Storage> (server, s)
272 {
273 // add extra constructor code here
274 }
275 template <typename _Base, typename _Storage>
276 PathVectorServant<_Base, _Storage>::~PathVectorServant()
277 {
278 // add extra destructor code here
279 }
280
281 // Methods corresponding to IDL attributes and operations
282
283 template <typename _Base, typename _Storage>
284 hpp::core_idl::size_t PathVectorServant<_Base, _Storage>::numberPaths ()
285 {
286 try {
287 // automatically generated code.
288
289 hpp::core_idl::size_t __return__ (getT()->numberPaths ());
290
291 return __return__;
292 } catch (const std::exception& e) {
293 throw ::hpp::Error (e.what());
294 }
295 }
296
297 template <typename _Base, typename _Storage>
298 hpp::core_idl::size_t PathVectorServant<_Base, _Storage>::rankAtParam (hpp::value_type param, hpp::value_type& localParam)
299 {
300 try {
301 // automatically generated code.
302
303 hpp::core_idl::size_t __return__ (getT()->rankAtParam (param, localParam));
304
305 return __return__;
306 } catch (const std::exception& e) {
307 throw ::hpp::Error (e.what());
308 }
309 }
310
311 template <typename _Base, typename _Storage>
312 hpp::core_idl::Path_ptr PathVectorServant<_Base, _Storage>::pathAtRank (hpp::core_idl::size_t rank)
313 {
314 try {
315 // automatically generated code.
316
317 hpp::core::PathPtr_t __return__ (getT()->pathAtRank (rank));
318
319 return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Path,hpp::core_impl::Path>(server_, __return__)._retn();
320 } catch (const std::exception& e) {
321 throw ::hpp::Error (e.what());
322 }
323 }
324
325 template <typename _Base, typename _Storage>
326 void PathVectorServant<_Base, _Storage>::appendPath (hpp::core_idl::Path_ptr p)
327 {
328 try {
329 // automatically generated code.
330 hpp::core::PathPtr_t _p = ::hpp::corbaServer::reference_to_object<hpp::core::Path>(server_, p);
331 (getT()->appendPath (_p));
332
333
334 } catch (const std::exception& e) {
335 throw ::hpp::Error (e.what());
336 }
337 }
338
339 template <typename _Base, typename _Storage>
340 void PathVectorServant<_Base, _Storage>::concatenate (hpp::core_idl::PathVector_ptr p)
341 {
342 try {
343 // automatically generated code.
344 hpp::core::PathVectorPtr_t _p = ::hpp::corbaServer::reference_to_object<hpp::core::PathVector>(server_, p);
345 (getT()->concatenate (_p));
346
347
348 } catch (const std::exception& e) {
349 throw ::hpp::Error (e.what());
350 }
351 }
352
353 template <typename _Base, typename _Storage>
354 hpp::core_idl::PathVector_ptr PathVectorServant<_Base, _Storage>::flatten ()
355 {
356 try {
357 // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-9.0.2/idl/hpp/core_idl/paths.idl:67
358 hpp::core::PathPtr_t p = get();
359 hpp::core::PathVectorPtr_t pv =
360 HPP_DYNAMIC_PTR_CAST(hpp::core::PathVector, p);
361 hpp::core::PathVectorPtr_t out =
362 hpp::core::PathVector::create (p->outputSize(), p->outputDerivativeSize());
363 pv->flatten (out);
364
365 return hpp::corbaServer::makeServant<hpp::core_idl::PathVector_ptr>
366 (server_, new PathVector (server_, out));
367
368 } catch (const std::exception& e) {
369 throw ::hpp::Error (e.what());
370 }
371 }
372
373 // End of implementational code
374 } // namespace core_impl
375
376 } // namespace hpp
377
378 //
379 // Implementational code for IDL interface hpp::core_idl::path_idl::Hermite
380 //
381 namespace hpp {
382
383 namespace core_impl {
384
385 namespace path_impl {
386 template <typename _Base, typename _Storage>
387 HermiteServant<_Base, _Storage>::HermiteServant(::hpp::corbaServer::Server* server,
388 const _Storage& s)
389 : hpp::core_impl::PathServant<_Base, _Storage> (server, s)
390 {
391 // add extra constructor code here
392 }
393 template <typename _Base, typename _Storage>
394 HermiteServant<_Base, _Storage>::~HermiteServant()
395 {
396 // add extra destructor code here
397 }
398
399 // Methods corresponding to IDL attributes and operations
400
401 // End of implementational code
402 } // namespace path_impl
403
404 } // namespace core_impl
405
406 } // namespace hpp
407
408
409
410
411
412 #endif // hpp_core_idl__paths_hxx__
413
ConstraintSet_ptr
_objref_ConstraintSet * ConstraintSet_ptr
Definition: _constraints-idl.hh:486
hpp::corbaServer::ServantBase< hpp::core::Path, _Storage >::persistantStorage
bool persistantStorage() const
See persistantStorage(bool)
Definition: servant-base.hh:166
hpp::corbaServer::Server
Implementation of Hpp module Corba server.
Definition: server.hh:78
hpp::core::PathVector
hpp::core::PathVector::create
static PathVectorPtr_t create(size_type outputSize, size_type outputDerivativeSize)
hpp::core_impl::PathServant
Definition: paths-fwd.hh:29
hpp::core_impl::PathServant::outputSize
hpp::size_type outputSize()
Definition: paths.hh:73
hpp::core_impl::PathServant::at
hpp::floatSeq * at(hpp::value_type t, ::CORBA::Boolean &success)
Definition: paths.hh:184
hpp::core_impl::PathServant::deleteIfExpired
::CORBA::Boolean deleteIfExpired()
Definition: paths.hh:51
hpp::core_impl::PathServant::str
char * str()
Definition: paths.hh:157
hpp::core_impl::PathServant::derivative
hpp::floatSeq * derivative(hpp::value_type t, ::CORBA::Short order)
Definition: paths.hh:198
hpp::core_impl::PathServant::~PathServant
virtual ~PathServant()
Definition: paths.hh:32
hpp::core_impl::PathServant::outputDerivativeSize
hpp::size_type outputDerivativeSize()
Definition: paths.hh:87
hpp::core_impl::PathServant::length
hpp::value_type length()
Definition: paths.hh:101
hpp::core_impl::PathServant::PathServant
PathServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: paths.hh:25
hpp::core_impl::PathServant::initial
hpp::floatSeq * initial()
Definition: paths.hh:115
hpp::core_impl::PathServant::asVector
hpp::core_idl::PathVector_ptr asVector()
Definition: paths.hh:226
hpp::core_impl::PathServant::end
hpp::floatSeq * end()
Definition: paths.hh:129
hpp::core_impl::PathServant::reverse
hpp::core_idl::Path_ptr reverse()
Definition: paths.hh:244
hpp::core_impl::PathServant::call
hpp::floatSeq * call(hpp::value_type t, ::CORBA::Boolean &success)
Definition: paths.hh:170
hpp::core_impl::PathServant::extract
hpp::core_idl::Path_ptr extract(hpp::value_type tmin, hpp::value_type tmax)
Definition: paths.hh:212
hpp::core_impl::PathServant::deleteThis
void deleteThis()
Definition: paths.hh:40
hpp::core_impl::PathServant::constraints
hpp::core_idl::ConstraintSet_ptr constraints()
Definition: paths.hh:143
hpp::core_impl::PathVectorServant
Definition: paths-fwd.hh:111
hpp::core_impl::PathVectorServant::concatenate
void concatenate(hpp::core_idl::PathVector_ptr p)
Definition: paths.hh:340
hpp::core_impl::PathVectorServant::numberPaths
hpp::core_idl::size_t numberPaths()
Definition: paths.hh:284
hpp::core_impl::PathVectorServant::pathAtRank
hpp::core_idl::Path_ptr pathAtRank(hpp::core_idl::size_t rank)
Definition: paths.hh:312
hpp::core_impl::PathVectorServant::PathVectorServant
PathVectorServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: paths.hh:269
hpp::core_impl::PathVectorServant::~PathVectorServant
virtual ~PathVectorServant()
Definition: paths.hh:276
hpp::core_impl::PathVectorServant::rankAtParam
hpp::core_idl::size_t rankAtParam(hpp::value_type param, hpp::value_type &localParam)
Definition: paths.hh:298
hpp::core_impl::PathVectorServant::flatten
hpp::core_idl::PathVector_ptr flatten()
Definition: paths.hh:354
hpp::core_impl::PathVectorServant::appendPath
void appendPath(hpp::core_idl::Path_ptr p)
Definition: paths.hh:326
hpp::core_impl::path_impl::HermiteServant::HermiteServant
HermiteServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: paths.hh:387
hpp::core_impl::path_impl::HermiteServant::~HermiteServant
virtual ~HermiteServant()
Definition: paths.hh:394
conversions.hh
fwd.hh
hpp::corbaServer::vectorToFloatSeq
floatSeq * vectorToFloatSeq(core::vectorIn_t input)
hpp::core_idl::size_t
unsigned long long size_t
Definition: paths.idl:18
hpp::core::PathVectorPtr_t
shared_ptr< PathVector > PathVectorPtr_t
hpp::core::vector_t
pinocchio::vector_t vector_t
hpp::core::ConstraintSetPtr_t
shared_ptr< ConstraintSet > ConstraintSetPtr_t
hpp::core::PathPtr_t
shared_ptr< Path > PathPtr_t
hpp
Implement CORBA interface `‘Obstacle’'.
hpp::size_type
long long size_type
Definition: common.idl:19
hpp::floatSeq
sequence< double > floatSeq
Robot configuration is defined by a sequence of dof value.
Definition: common.idl:34
hpp::value_type
double value_type
Definition: common.idl:18
Path_ptr
_objref_Path * Path_ptr
Definition: path_planners-idl.hh:83
paths-fwd.hh
PathVector_ptr
_objref_PathVector * PathVector_ptr
Definition: paths-idl.hh:82
HPP_DYNAMIC_PTR_CAST
#define HPP_DYNAMIC_PTR_CAST(t, x)
servant-base.hh