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