GCC Code Coverage Report


Directory: ./
File: src/hpp/core_idl/path_planners.hh
Date: 2025-05-11 11:10:19
Exec Total Coverage
Lines: 0 195 0.0%
Branches: 0 424 0.0%

Line Branch Exec Source
1 #ifndef hpp_core_idl__path__planners_hxx__
2 #define hpp_core_idl__path__planners_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/path_planners.idl
6 //
7
8 #include <hpp/core_idl/path_planners-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::ConnectedComponent
20 //
21 namespace hpp {
22
23 namespace core_impl {
24 template <typename _Base, typename _Storage>
25 ✗ ConnectedComponentServant<_Base, _Storage>::ConnectedComponentServant(::hpp::corbaServer::Server* server,
26 const _Storage& s)
27 ✗ : hpp::corbaServer::ServantBase<hpp::core::ConnectedComponent, _Storage> (server, s)
28 {
29 // add extra constructor code here
30 }
31 template <typename _Base, typename _Storage>
32 ✗ ConnectedComponentServant<_Base, _Storage>::~ConnectedComponentServant()
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 ConnectedComponentServant<_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 ConnectedComponentServant<_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 ConnectedComponentServant<_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::floatSeqSeq* ConnectedComponentServant<_Base, _Storage>::nodes ()
74 {
75 try {
76 // generated from /root/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-6.0.0/idl/hpp/core_idl/path_planners.idl:22
77 ✗ hpp::core::NodeVector_t nodes = getT()->nodes();
78 ✗ hpp::core::matrix_t configs (nodes.size(),
79 ✗ nodes[0]->configuration().size());
80 ✗ size_type i = 0;
81 ✗ for (hpp::core::NodeVector_t::const_iterator _node = nodes.begin();
82 ✗ _node != nodes.end(); ++_node)
83 ✗ configs.row(i++) = (*_node)->configuration();
84 ✗ return corbaServer::matrixToFloatSeqSeq(configs);
85
86 ✗ } catch (const std::exception& e) {
87 ✗ throw ::hpp::Error (e.what());
88 }
89 }
90
91 // End of implementational code
92 } // namespace core_impl
93
94 } // namespace hpp
95
96 //
97 // Implementational code for IDL interface hpp::core_idl::Roadmap
98 //
99 namespace hpp {
100
101 namespace core_impl {
102 template <typename _Base, typename _Storage>
103 ✗ RoadmapServant<_Base, _Storage>::RoadmapServant(::hpp::corbaServer::Server* server,
104 const _Storage& s)
105 ✗ : hpp::corbaServer::ServantBase<hpp::core::Roadmap, _Storage> (server, s)
106 {
107 // add extra constructor code here
108 }
109 template <typename _Base, typename _Storage>
110 ✗ RoadmapServant<_Base, _Storage>::~RoadmapServant()
111 {
112 // add extra destructor code here
113 }
114
115 // Methods corresponding to IDL attributes and operations
116
117 template <typename _Base, typename _Storage>
118 ✗ void RoadmapServant<_Base, _Storage>::deleteThis ()
119 {
120 try {
121 // automatically generated code.
122 ✗ _ServantBase::deleteThis();
123 ✗ } catch (const std::exception& e) {
124 ✗ throw ::hpp::Error (e.what());
125 }
126 }
127
128 template <typename _Base, typename _Storage>
129 ✗ ::CORBA::Boolean RoadmapServant<_Base, _Storage>::deleteIfExpired ()
130 {
131 try {
132 // automatically generated code.
133 ✗ return _ServantBase::deleteIfExpired();
134 ✗ } catch (const std::exception& e) {
135 ✗ throw ::hpp::Error (e.what());
136 }
137 }
138
139 template <typename _Base, typename _Storage>
140 ✗ void RoadmapServant<_Base, _Storage>::persistantStorage (::CORBA::Boolean persistant)
141 {
142 try {
143 // automatically generated code.
144 ✗ _ServantBase::persistantStorage(persistant);
145 ✗ } catch (const std::exception& e) {
146 ✗ throw ::hpp::Error (e.what());
147 }
148 }
149
150 template <typename _Base, typename _Storage>
151 ✗ void RoadmapServant<_Base, _Storage>::clear ()
152 {
153 try {
154 // automatically generated code.
155
156 ✗ (getT()->clear ());
157
158
159 ✗ } catch (const std::exception& e) {
160 ✗ throw ::hpp::Error (e.what());
161 }
162 }
163
164 template <typename _Base, typename _Storage>
165 ✗ void RoadmapServant<_Base, _Storage>::addNode (const hpp::floatSeq& config)
166 {
167 try {
168 // automatically generated code.
169 ✗ hpp::core::vector_t _config = hpp::corbaServer::floatSeqToVector (config);
170 ✗ (getT()->addNode (_config));
171
172
173 ✗ } catch (const std::exception& e) {
174 ✗ throw ::hpp::Error (e.what());
175 }
176 }
177
178 template <typename _Base, typename _Storage>
179 ✗ void RoadmapServant<_Base, _Storage>::addNodeAndEdge (const hpp::floatSeq& cfgfrom, const hpp::floatSeq& cfgto, hpp::core_idl::Path_ptr path_)
180 {
181 try {
182 // generated from /root/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-6.0.0/idl/hpp/core_idl/path_planners.idl:37
183 ✗ core::PathPtr_t path (corbaServer::reference_to_servant_base<core::Path>(server_, path_)->get());
184 ✗ getT()->addEdge(getT()->addNode(corbaServer::floatSeqToVector(cfgfrom)),
185 ✗ getT()->addNode(corbaServer::floatSeqToVector(cfgto )), path);
186
187 ✗ } catch (const std::exception& e) {
188 ✗ throw ::hpp::Error (e.what());
189 }
190 }
191
192 template <typename _Base, typename _Storage>
193 ✗ void RoadmapServant<_Base, _Storage>::addNodeAndEdges (const hpp::floatSeq& cfgfrom, const hpp::floatSeq& cfgto, hpp::core_idl::Path_ptr path_)
194 {
195 try {
196 // generated from /root/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-6.0.0/idl/hpp/core_idl/path_planners.idl:37
197 ✗ core::PathPtr_t path (corbaServer::reference_to_servant_base<core::Path>(server_, path_)->get());
198 ✗ getT()->addEdges(getT()->addNode(corbaServer::floatSeqToVector(cfgfrom)),
199 ✗ getT()->addNode(corbaServer::floatSeqToVector(cfgto )), path);
200
201 ✗ } catch (const std::exception& e) {
202 ✗ throw ::hpp::Error (e.what());
203 }
204 }
205
206 template <typename _Base, typename _Storage>
207 ✗ hpp::floatSeq* RoadmapServant<_Base, _Storage>::nearestNode (const hpp::floatSeq& config, hpp::value_type& distance, ::CORBA::Boolean reverse)
208 {
209 try {
210 // generated from /root/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-6.0.0/idl/hpp/core_idl/path_planners.idl:37
211 ✗ return corbaServer::vectorToFloatSeq(getT()->nearestNode(
212 ✗ corbaServer::floatSeqToVector(config), distance, reverse)->configuration());
213
214 ✗ } catch (const std::exception& e) {
215 ✗ throw ::hpp::Error (e.what());
216 }
217 }
218
219 template <typename _Base, typename _Storage>
220 ✗ hpp::floatSeqSeq* RoadmapServant<_Base, _Storage>::nearestNodes (const hpp::floatSeq& config, hpp::size_type& k)
221 {
222 try {
223 // generated from /root/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-6.0.0/idl/hpp/core_idl/path_planners.idl:37
224 ✗ hpp::core::Nodes_t nodes = getT()->nearestNodes(
225 corbaServer::floatSeqToVector(config), k);
226 ✗ hpp::core::matrix_t configs (nodes.size(), config.length());
227 ✗ size_type i = 0;
228 ✗ for (hpp::core::Nodes_t::const_iterator _node = nodes.begin(); _node != nodes.end(); ++_node)
229 ✗ configs.row(i++) = (*_node)->configuration();
230 ✗ return corbaServer::matrixToFloatSeqSeq(configs);
231
232 ✗ } catch (const std::exception& e) {
233 ✗ throw ::hpp::Error (e.what());
234 }
235 }
236
237 template <typename _Base, typename _Storage>
238 ✗ hpp::size_type RoadmapServant<_Base, _Storage>::getNbNodes ()
239 {
240 try {
241 // generated from /root/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-6.0.0/idl/hpp/core_idl/path_planners.idl:37
242 ✗ return getT()->nodes().size();
243
244 ✗ } catch (const std::exception& e) {
245 ✗ throw ::hpp::Error (e.what());
246 }
247 }
248
249 template <typename _Base, typename _Storage>
250 ✗ hpp::floatSeq* RoadmapServant<_Base, _Storage>::getNode (hpp::size_type i)
251 {
252 try {
253 // generated from /root/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-6.0.0/idl/hpp/core_idl/path_planners.idl:37
254 ✗ return corbaServer::vectorToFloatSeq((*std::next(getT()->nodes().begin(), i))->configuration());
255
256 ✗ } catch (const std::exception& e) {
257 ✗ throw ::hpp::Error (e.what());
258 }
259 }
260
261 template <typename _Base, typename _Storage>
262 ✗ hpp::size_type RoadmapServant<_Base, _Storage>::getNbEdges ()
263 {
264 try {
265 // generated from /root/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-6.0.0/idl/hpp/core_idl/path_planners.idl:37
266 ✗ return getT()->edges().size();
267
268 ✗ } catch (const std::exception& e) {
269 ✗ throw ::hpp::Error (e.what());
270 }
271 }
272
273 template <typename _Base, typename _Storage>
274 ✗ hpp::core_idl::Path_ptr RoadmapServant<_Base, _Storage>::getEdge (hpp::size_type i)
275 {
276 try {
277 // generated from /root/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-6.0.0/idl/hpp/core_idl/path_planners.idl:37
278 ✗ return corbaServer::makeServant<hpp::core_idl::Path_ptr> (server_,
279 ✗ new Path (server_, (*std::next(getT()->edges().begin(),i))->path()));
280
281 ✗ } catch (const std::exception& e) {
282 ✗ throw ::hpp::Error (e.what());
283 }
284 }
285
286 template <typename _Base, typename _Storage>
287 ✗ hpp::core_idl::ConnectedComponentSeq* RoadmapServant<_Base, _Storage>::getConnectedComponents ()
288 {
289 try {
290 // automatically generated code.
291
292 ✗ hpp::core_idl::ConnectedComponentSeq* __return__ = hpp::corbaServer::vectorToSeqServant<hpp::core_idl::ConnectedComponentSeq,hpp::core_impl::ConnectedComponent,hpp::core_impl::ConnectedComponent>(server_) (getT()->connectedComponents ());
293
294 ✗ return __return__;
295 ✗ } catch (const std::exception& e) {
296 ✗ throw ::hpp::Error (e.what());
297 }
298 }
299
300 // End of implementational code
301 } // namespace core_impl
302
303 } // namespace hpp
304
305 //
306 // Implementational code for IDL interface hpp::core_idl::PathPlanner
307 //
308 namespace hpp {
309
310 namespace core_impl {
311 template <typename _Base, typename _Storage>
312 ✗ PathPlannerServant<_Base, _Storage>::PathPlannerServant(::hpp::corbaServer::Server* server,
313 const _Storage& s)
314 ✗ : hpp::corbaServer::ServantBase<hpp::core::PathPlanner, _Storage> (server, s)
315 {
316 // add extra constructor code here
317 }
318 template <typename _Base, typename _Storage>
319 ✗ PathPlannerServant<_Base, _Storage>::~PathPlannerServant()
320 {
321 // add extra destructor code here
322 }
323
324 // Methods corresponding to IDL attributes and operations
325
326 template <typename _Base, typename _Storage>
327 ✗ void PathPlannerServant<_Base, _Storage>::deleteThis ()
328 {
329 try {
330 // automatically generated code.
331 ✗ _ServantBase::deleteThis();
332 ✗ } catch (const std::exception& e) {
333 ✗ throw ::hpp::Error (e.what());
334 }
335 }
336
337 template <typename _Base, typename _Storage>
338 ✗ ::CORBA::Boolean PathPlannerServant<_Base, _Storage>::deleteIfExpired ()
339 {
340 try {
341 // automatically generated code.
342 ✗ return _ServantBase::deleteIfExpired();
343 ✗ } catch (const std::exception& e) {
344 ✗ throw ::hpp::Error (e.what());
345 }
346 }
347
348 template <typename _Base, typename _Storage>
349 ✗ void PathPlannerServant<_Base, _Storage>::persistantStorage (::CORBA::Boolean persistant)
350 {
351 try {
352 // automatically generated code.
353 ✗ _ServantBase::persistantStorage(persistant);
354 ✗ } catch (const std::exception& e) {
355 ✗ throw ::hpp::Error (e.what());
356 }
357 }
358
359 template <typename _Base, typename _Storage>
360 ✗ hpp::core_idl::PathVector_ptr PathPlannerServant<_Base, _Storage>::solve ()
361 {
362 try {
363 // automatically generated code.
364
365 ✗ hpp::core::PathVectorPtr_t __return__ (getT()->solve ());
366
367 ✗ return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Path,hpp::core_impl::PathVector>(server_, __return__)._retn();
368 ✗ } catch (const std::exception& e) {
369 ✗ throw ::hpp::Error (e.what());
370 }
371 }
372
373 template <typename _Base, typename _Storage>
374 ✗ void PathPlannerServant<_Base, _Storage>::startSolve ()
375 {
376 try {
377 // automatically generated code.
378
379 ✗ (getT()->startSolve ());
380
381
382 ✗ } catch (const std::exception& e) {
383 ✗ throw ::hpp::Error (e.what());
384 }
385 }
386
387 template <typename _Base, typename _Storage>
388 ✗ void PathPlannerServant<_Base, _Storage>::tryConnectInitAndGoals ()
389 {
390 try {
391 // automatically generated code.
392
393 ✗ (getT()->tryConnectInitAndGoals ());
394
395
396 ✗ } catch (const std::exception& e) {
397 ✗ throw ::hpp::Error (e.what());
398 }
399 }
400
401 template <typename _Base, typename _Storage>
402 ✗ void PathPlannerServant<_Base, _Storage>::oneStep ()
403 {
404 try {
405 // automatically generated code.
406
407 ✗ (getT()->oneStep ());
408
409
410 ✗ } catch (const std::exception& e) {
411 ✗ throw ::hpp::Error (e.what());
412 }
413 }
414
415 template <typename _Base, typename _Storage>
416 ✗ hpp::core_idl::PathVector_ptr PathPlannerServant<_Base, _Storage>::computePath ()
417 {
418 try {
419 // automatically generated code.
420
421 ✗ hpp::core::PathVectorPtr_t __return__ (getT()->computePath ());
422
423 ✗ return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Path,hpp::core_impl::PathVector>(server_, __return__)._retn();
424 ✗ } catch (const std::exception& e) {
425 ✗ throw ::hpp::Error (e.what());
426 }
427 }
428
429 template <typename _Base, typename _Storage>
430 ✗ hpp::core_idl::PathVector_ptr PathPlannerServant<_Base, _Storage>::finishSolve (hpp::core_idl::PathVector_ptr path)
431 {
432 try {
433 // automatically generated code.
434 ✗ hpp::core::PathVectorPtr_t _path = ::hpp::corbaServer::reference_to_object<hpp::core::PathVector>(server_, path);
435 ✗ hpp::core::PathVectorPtr_t __return__ (getT()->finishSolve (_path));
436
437 ✗ return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Path,hpp::core_impl::PathVector>(server_, __return__)._retn();
438 ✗ } catch (const std::exception& e) {
439 ✗ throw ::hpp::Error (e.what());
440 }
441 }
442
443 template <typename _Base, typename _Storage>
444 ✗ void PathPlannerServant<_Base, _Storage>::interrupt ()
445 {
446 try {
447 // automatically generated code.
448
449 ✗ (getT()->interrupt ());
450
451
452 ✗ } catch (const std::exception& e) {
453 ✗ throw ::hpp::Error (e.what());
454 }
455 }
456
457 template <typename _Base, typename _Storage>
458 ✗ void PathPlannerServant<_Base, _Storage>::maxIterations (hpp::size_type n)
459 {
460 try {
461 // automatically generated code.
462
463 ✗ (getT()->maxIterations (n));
464
465
466 ✗ } catch (const std::exception& e) {
467 ✗ throw ::hpp::Error (e.what());
468 }
469 }
470
471 template <typename _Base, typename _Storage>
472 ✗ void PathPlannerServant<_Base, _Storage>::timeOut (hpp::value_type seconds)
473 {
474 try {
475 // automatically generated code.
476
477 ✗ (getT()->timeOut (seconds));
478
479
480 ✗ } catch (const std::exception& e) {
481 ✗ throw ::hpp::Error (e.what());
482 }
483 }
484
485 template <typename _Base, typename _Storage>
486 ✗ hpp::core_idl::Roadmap_ptr PathPlannerServant<_Base, _Storage>::getRoadmap ()
487 {
488 try {
489 // automatically generated code.
490
491 ✗ hpp::core::RoadmapPtr_t __return__ (getT()->roadmap ());
492
493 ✗ return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Roadmap,hpp::core_impl::Roadmap>(server_, __return__)._retn();
494 ✗ } catch (const std::exception& e) {
495 ✗ throw ::hpp::Error (e.what());
496 }
497 }
498
499 template <typename _Base, typename _Storage>
500 ✗ void PathPlannerServant<_Base, _Storage>::stopWhenProblemIsSolved (::CORBA::Boolean enable)
501 {
502 try {
503 // automatically generated code.
504
505 ✗ (getT()->stopWhenProblemIsSolved (enable));
506
507
508 ✗ } catch (const std::exception& e) {
509 ✗ throw ::hpp::Error (e.what());
510 }
511 }
512
513 // End of implementational code
514 } // namespace core_impl
515
516 } // namespace hpp
517
518 //
519 // Implementational code for IDL interface hpp::core_idl::PathOptimizer
520 //
521 namespace hpp {
522
523 namespace core_impl {
524 template <typename _Base, typename _Storage>
525 ✗ PathOptimizerServant<_Base, _Storage>::PathOptimizerServant(::hpp::corbaServer::Server* server,
526 const _Storage& s)
527 ✗ : hpp::corbaServer::ServantBase<hpp::core::PathOptimizer, _Storage> (server, s)
528 {
529 // add extra constructor code here
530 }
531 template <typename _Base, typename _Storage>
532 ✗ PathOptimizerServant<_Base, _Storage>::~PathOptimizerServant()
533 {
534 // add extra destructor code here
535 }
536
537 // Methods corresponding to IDL attributes and operations
538
539 template <typename _Base, typename _Storage>
540 ✗ void PathOptimizerServant<_Base, _Storage>::deleteThis ()
541 {
542 try {
543 // automatically generated code.
544 ✗ _ServantBase::deleteThis();
545 ✗ } catch (const std::exception& e) {
546 ✗ throw ::hpp::Error (e.what());
547 }
548 }
549
550 template <typename _Base, typename _Storage>
551 ✗ ::CORBA::Boolean PathOptimizerServant<_Base, _Storage>::deleteIfExpired ()
552 {
553 try {
554 // automatically generated code.
555 ✗ return _ServantBase::deleteIfExpired();
556 ✗ } catch (const std::exception& e) {
557 ✗ throw ::hpp::Error (e.what());
558 }
559 }
560
561 template <typename _Base, typename _Storage>
562 ✗ void PathOptimizerServant<_Base, _Storage>::persistantStorage (::CORBA::Boolean persistant)
563 {
564 try {
565 // automatically generated code.
566 ✗ _ServantBase::persistantStorage(persistant);
567 ✗ } catch (const std::exception& e) {
568 ✗ throw ::hpp::Error (e.what());
569 }
570 }
571
572 template <typename _Base, typename _Storage>
573 ✗ hpp::core_idl::PathVector_ptr PathOptimizerServant<_Base, _Storage>::optimize (hpp::core_idl::PathVector_ptr path)
574 {
575 try {
576 // automatically generated code.
577 ✗ hpp::core::PathVectorPtr_t _path = ::hpp::corbaServer::reference_to_object<hpp::core::PathVector>(server_, path);
578 ✗ hpp::core::PathVectorPtr_t __return__ (getT()->optimize (_path));
579
580 ✗ return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Path,hpp::core_impl::PathVector>(server_, __return__)._retn();
581 ✗ } catch (const std::exception& e) {
582 ✗ throw ::hpp::Error (e.what());
583 }
584 }
585
586 template <typename _Base, typename _Storage>
587 ✗ void PathOptimizerServant<_Base, _Storage>::interrupt ()
588 {
589 try {
590 // automatically generated code.
591
592 ✗ (getT()->interrupt ());
593
594
595 ✗ } catch (const std::exception& e) {
596 ✗ throw ::hpp::Error (e.what());
597 }
598 }
599
600 template <typename _Base, typename _Storage>
601 ✗ void PathOptimizerServant<_Base, _Storage>::maxIterations (hpp::size_type n)
602 {
603 try {
604 // automatically generated code.
605
606 ✗ (getT()->maxIterations (n));
607
608
609 ✗ } catch (const std::exception& e) {
610 ✗ throw ::hpp::Error (e.what());
611 }
612 }
613
614 template <typename _Base, typename _Storage>
615 ✗ void PathOptimizerServant<_Base, _Storage>::timeOut (hpp::value_type seconds)
616 {
617 try {
618 // automatically generated code.
619
620 ✗ (getT()->timeOut (seconds));
621
622
623 ✗ } catch (const std::exception& e) {
624 ✗ throw ::hpp::Error (e.what());
625 }
626 }
627
628 // End of implementational code
629 } // namespace core_impl
630
631 } // namespace hpp
632
633
634
635
636
637 #endif // hpp_core_idl__path__planners_hxx__
638
639