Directory: | ./ |
---|---|
File: | src/hpp/core_idl/paths.hh |
Date: | 2024-12-13 15:50:05 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 14 | 126 | 11.1% |
Branches: | 10 | 248 | 4.0% |
Line | Branch | Exec | Source |
---|---|---|---|
1 | #ifndef hpp_core_idl__paths_hxx__ | ||
2 | #define hpp_core_idl__paths_hxx__ | ||
3 | |||
4 | // | ||
5 | // Implemention of IDL interfaces in file /root/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-6.0.0/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 | 4 | PathServant<_Base, _Storage>::PathServant(::hpp::corbaServer::Server* server, | |
26 | const _Storage& s) | ||
27 |
0/4✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 7 not taken.
✗ Branch 8 not taken.
|
4 | : hpp::corbaServer::ServantBase<hpp::core::Path, _Storage> (server, s) |
28 | { | ||
29 | // add extra constructor code here | ||
30 | } | ||
31 | template <typename _Base, typename _Storage> | ||
32 | 4 | 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 | 2 | hpp::floatSeq* PathServant<_Base, _Storage>::initial () | |
116 | { | ||
117 | try { | ||
118 | // automatically generated code. | ||
119 | |||
120 |
4/8✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 1 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
|
2 | hpp::floatSeq* __return__ = hpp::corbaServer::vectorToFloatSeq (getT()->initial ()); |
121 | |||
122 | 2 | return __return__; | |
123 | ✗ | } catch (const std::exception& e) { | |
124 | ✗ | throw ::hpp::Error (e.what()); | |
125 | } | ||
126 | } | ||
127 | |||
128 | template <typename _Base, typename _Storage> | ||
129 | 2 | hpp::floatSeq* PathServant<_Base, _Storage>::end () | |
130 | { | ||
131 | try { | ||
132 | // automatically generated code. | ||
133 | |||
134 |
4/8✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 1 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
|
2 | hpp::floatSeq* __return__ = hpp::corbaServer::vectorToFloatSeq (getT()->end ()); |
135 | |||
136 | 2 | 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 /root/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-6.0.0/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 /root/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-6.0.0/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 /root/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-6.0.0/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 | 2 | PathVectorServant<_Base, _Storage>::PathVectorServant(::hpp::corbaServer::Server* server, | |
270 | const _Storage& s) | ||
271 |
2/4✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
✓ Branch 9 taken 2 times.
✗ Branch 10 not taken.
|
2 | : hpp::core_impl::PathServant<_Base, _Storage> (server, s) |
272 | { | ||
273 | // add extra constructor code here | ||
274 | 2 | } | |
275 | template <typename _Base, typename _Storage> | ||
276 | 8 | PathVectorServant<_Base, _Storage>::~PathVectorServant() | |
277 | { | ||
278 | // add extra destructor code here | ||
279 | 8 | } | |
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 /root/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-6.0.0/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 | |||
414 |