hpp-corbaserver  4.11.0
Corba server for Humanoid Path Planner applications
constraints.hh
Go to the documentation of this file.
1 #ifndef hpp_constraints_idl__constraints_hxx__
2 #define hpp_constraints_idl__constraints_hxx__
3 
4 //
5 // Implemention of IDL interfaces in file /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.11.0/idl/hpp/constraints_idl/constraints.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::constraints_idl::DifferentiableFunction
20 //
21 namespace hpp {
22 
23 namespace constraints_impl {
24 template <typename _Base, typename _Storage>
26  : hpp::corbaServer::ServantBase<hpp::constraints::DifferentiableFunction, _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  // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.11.0/idl/hpp/constraints_idl/constraints.idl:20
44  (*get()) (corbaServer::floatSeqToVector(arg, get()->inputSize())).vector()
45  );
46 
47  } catch (const std::exception& e) {
48  throw ::hpp::Error (e.what());
49  }
50 }
51 
52 template <typename _Base, typename _Storage>
54 {
55  try {
56  // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.11.0/idl/hpp/constraints_idl/constraints.idl:20
58  get()->jacobian (J, corbaServer::floatSeqToVector(arg));
60 
61  } catch (const std::exception& e) {
62  throw ::hpp::Error (e.what());
63  }
64 }
65 
66 template <typename _Base, typename _Storage>
68 {
69  try {
70  // automatically generated code.
71 
72  hpp::size_type __return__ (getT()->inputSize ());
73 
74  return __return__;
75  } catch (const std::exception& e) {
76  throw ::hpp::Error (e.what());
77  }
78 }
79 
80 template <typename _Base, typename _Storage>
82 {
83  try {
84  // automatically generated code.
85 
86  hpp::size_type __return__ (getT()->inputDerivativeSize ());
87 
88  return __return__;
89  } catch (const std::exception& e) {
90  throw ::hpp::Error (e.what());
91  }
92 }
93 
94 template <typename _Base, typename _Storage>
96 {
97  try {
98  // automatically generated code.
99 
100  hpp::size_type __return__ (getT()->outputSize ());
101 
102  return __return__;
103  } catch (const std::exception& e) {
104  throw ::hpp::Error (e.what());
105  }
106 }
107 
108 template <typename _Base, typename _Storage>
110 {
111  try {
112  // automatically generated code.
113 
114  hpp::size_type __return__ (getT()->outputDerivativeSize ());
115 
116  return __return__;
117  } catch (const std::exception& e) {
118  throw ::hpp::Error (e.what());
119  }
120 }
121 
122 template <typename _Base, typename _Storage>
124 {
125  try {
126  // automatically generated code.
127 
128  char* __return__ = ::hpp::corbaServer::c_str (getT()->name ());
129 
130  return __return__;
131  } catch (const std::exception& e) {
132  throw ::hpp::Error (e.what());
133  }
134 }
135 
136 template <typename _Base, typename _Storage>
138 {
139  try {
140  // automatically generated code.
141  std::ostringstream oss; oss << *get();
142  std::string res = oss.str();
143  return CORBA::string_dup(res.c_str());
144  } catch (const std::exception& e) {
145  throw ::hpp::Error (e.what());
146  }
147 }
148 
149 // End of implementational code
150 } // namespace constraints_impl
151 
152 } // namespace hpp
153 
154 //
155 // Implementational code for IDL interface hpp::constraints_idl::Implicit
156 //
157 namespace hpp {
158 
159 namespace constraints_impl {
160 template <typename _Base, typename _Storage>
162  : hpp::corbaServer::ServantBase<hpp::constraints::Implicit, _Storage> (server, s)
163 {
164  // add extra constructor code here
165 }
166 template <typename _Base, typename _Storage>
168 {
169  // add extra destructor code here
170 }
171 
172 // Methods corresponding to IDL attributes and operations
173 
174 template <typename _Base, typename _Storage>
176 {
177  try {
178  // automatically generated code.
179 
180  hpp::constraints::DifferentiableFunctionPtr_t __return__ (getT()->functionPtr ());
181 
182  return ::hpp::corbaServer::makeServantDownCast<hpp::constraints_impl::DifferentiableFunction,hpp::constraints_impl::DifferentiableFunction>(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  // automatically generated code.
194  (getT()->rightHandSideFromConfig (_config));
195 
196 
197  } catch (const std::exception& e) {
198  throw ::hpp::Error (e.what());
199  }
200 }
201 
202 template <typename _Base, typename _Storage>
204 {
205  try {
206  // automatically generated code.
208  (getT()->rightHandSide (_rhs));
209 
210 
211  } catch (const std::exception& e) {
212  throw ::hpp::Error (e.what());
213  }
214 }
215 
216 template <typename _Base, typename _Storage>
218 {
219  try {
220  // automatically generated code.
221 
222  hpp::floatSeq* __return__ = hpp::corbaServer::vectorToFloatSeq (getT()->rightHandSide ());
223 
224  return __return__;
225  } catch (const std::exception& e) {
226  throw ::hpp::Error (e.what());
227  }
228 }
229 
230 template <typename _Base, typename _Storage>
232 {
233  try {
234  // automatically generated code.
235 
236  hpp::size_type __return__ (getT()->rightHandSideSize ());
237 
238  return __return__;
239  } catch (const std::exception& e) {
240  throw ::hpp::Error (e.what());
241  }
242 }
243 
244 template <typename _Base, typename _Storage>
246 {
247  try {
248  // automatically generated code.
249 
250  hpp::size_type __return__ (getT()->parameterSize ());
251 
252  return __return__;
253  } catch (const std::exception& e) {
254  throw ::hpp::Error (e.what());
255  }
256 }
257 
258 template <typename _Base, typename _Storage>
260 {
261  try {
262  // automatically generated code.
263 
265 
266  return __return__;
267  } catch (const std::exception& e) {
268  throw ::hpp::Error (e.what());
269  }
270 }
271 
272 template <typename _Base, typename _Storage>
274 {
275  try {
276  // automatically generated code.
277 
278  hpp::constraints::ComparisonTypes_t __return__ (getT()->comparisonType ());
279 
280  return hpp::corbaServer::convertComparison (__return__);
281  } catch (const std::exception& e) {
282  throw ::hpp::Error (e.what());
283  }
284 }
285 
286 template <typename _Base, typename _Storage>
288 {
289  try {
290  // automatically generated code.
292  (getT()->comparisonType (_compType));
293 
294 
295  } catch (const std::exception& e) {
296  throw ::hpp::Error (e.what());
297  }
298 }
299 
300 // End of implementational code
301 } // namespace constraints_impl
302 
303 } // namespace hpp
304 
305 //
306 // Implementational code for IDL interface hpp::constraints_idl::LockedJoint
307 //
308 namespace hpp {
309 
310 namespace constraints_impl {
311 template <typename _Base, typename _Storage>
313  : hpp::constraints_impl::ImplicitServant<_Base, _Storage> (server, s)
314 {
315  // add extra constructor code here
316 }
317 template <typename _Base, typename _Storage>
319 {
320  // add extra destructor code here
321 }
322 
323 // Methods corresponding to IDL attributes and operations
324 
325 template <typename _Base, typename _Storage>
327 {
328  try {
329  // automatically generated code.
330 
331  char* __return__ = ::hpp::corbaServer::c_str (getT()->jointName ());
332 
333  return __return__;
334  } catch (const std::exception& e) {
335  throw ::hpp::Error (e.what());
336  }
337 }
338 
339 // End of implementational code
340 } // namespace constraints_impl
341 
342 } // namespace hpp
343 
344 //
345 // Implementational code for IDL interface hpp::constraints_idl::ConfigurationConstraint
346 //
347 namespace hpp {
348 
349 namespace constraints_impl {
350 template <typename _Base, typename _Storage>
352  : hpp::constraints_impl::DifferentiableFunctionServant<_Base, _Storage> (server, s)
353 {
354  // add extra constructor code here
355 }
356 template <typename _Base, typename _Storage>
358 {
359  // add extra destructor code here
360 }
361 
362 // Methods corresponding to IDL attributes and operations
363 
364 template <typename _Base, typename _Storage>
366 {
367  try {
368  // automatically generated code.
369 
370  hpp::floatSeq* __return__ = hpp::corbaServer::vectorToFloatSeq (getT()->weights ());
371 
372  return __return__;
373  } catch (const std::exception& e) {
374  throw ::hpp::Error (e.what());
375  }
376 }
377 
378 template <typename _Base, typename _Storage>
380 {
381  try {
382  // automatically generated code.
384  (getT()->weights (_weights));
385 
386 
387  } catch (const std::exception& e) {
388  throw ::hpp::Error (e.what());
389  }
390 }
391 
392 template <typename _Base, typename _Storage>
394 {
395  try {
396  // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.11.0/idl/hpp/constraints_idl/constraints.idl:73
397  return corbaServer::vectorToFloatSeq(getT()->goal().vector());
398 
399  } catch (const std::exception& e) {
400  throw ::hpp::Error (e.what());
401  }
402 }
403 
404 // End of implementational code
405 } // namespace constraints_impl
406 
407 } // namespace hpp
408 
409 
410 
411 
412 
413 #endif // hpp_constraints_idl__constraints_hxx__
414 
void setRightHandSide(const hpp::floatSeq &rhs)
Definition: constraints.hh:203
hpp::size_type inputSize()
Definition: constraints.hh:67
ImplicitServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: constraints.hh:161
Implement CORBA interface ``Obstacle&#39;&#39;.
Definition: basic-server.hh:27
hpp::size_type outputDerivativeSize()
Definition: constraints.hh:109
double value_type
Definition: common.idl:18
LockedJointServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: constraints.hh:312
sequence< floatSeq > floatSeqSeq
Definition: common.idl:34
hpp::floatSeq * getGoal()
Definition: constraints.hh:393
virtual ~ImplicitServant()
Definition: constraints.hh:167
hpp::size_type inputDerivativeSize()
Definition: constraints.hh:81
char * str()
Definition: constraints.hh:137
vector_t floatSeqToVector(const floatSeq &dofArray, const size_type expectedSize=-1)
char * c_str(const std::string &in)
Definition: conversions.hh:71
hpp::floatSeq * rightHandSideAt(hpp::value_type s)
Definition: constraints.hh:259
hpp::floatSeqSeq * jacobian(const hpp::floatSeq &arg)
Definition: constraints.hh:53
constraints::ComparisonTypes_t convertComparison(ComparisonTypes_t comp)
Convert CORBA comparison types to C++ comparison type.
pinocchio::vector_t vector_t
Definition: fwd.hh:89
ServantBase(Server *server, const Storage &_s)
Definition: servant-base.hh:165
char * name()
Definition: constraints.hh:123
void setComparisonType(const hpp::ComparisonTypes_t &compType)
Definition: constraints.hh:287
void setRightHandSideFromConfig(const hpp::floatSeq &config)
Definition: constraints.hh:189
_objref_DifferentiableFunction * DifferentiableFunction_ptr
Definition: constraints-idl.hh:71
hpp::constraints_idl::DifferentiableFunction_ptr function()
Definition: constraints.hh:175
virtual ~ConfigurationConstraintServant()
Definition: constraints.hh:357
ConfigurationConstraintServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: constraints.hh:351
hpp::floatSeq * getWeights()
Definition: constraints.hh:365
virtual ~DifferentiableFunctionServant()
Definition: constraints.hh:31
Implementation of Hpp module Corba server.
Definition: server.hh:54
hpp::size_type rightHandSideSize()
Definition: constraints.hh:231
hpp::ComparisonTypes_t * getComparisonType()
Definition: constraints.hh:273
hpp::floatSeq * getRightHandSide()
Definition: constraints.hh:217
hpp::floatSeq * value(const hpp::floatSeq &arg)
Definition: constraints.hh:39
pinocchio::matrix_t matrix_t
Definition: fwd.hh:87
hpp::size_type parameterSize()
Definition: constraints.hh:245
Definition: constraints-fwd.hh:86
floatSeqSeq * matrixToFloatSeqSeq(core::matrixIn_t input)
Returns a sequence of the rows of the input matrix.
hpp::size_type outputSize()
Definition: constraints.hh:95
floatSeq * vectorToFloatSeq(core::vectorIn_t input)
StorageElementShPtr_t getT() const
Definition: servant-base.hh:121
sequence< ComparisonType > ComparisonTypes_t
Definition: common.idl:49
DifferentiableFunctionServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: constraints.hh:25
sequence< double > floatSeq
Robot configuration is defined by a sequence of dof value.
Definition: common.idl:33
char * jointName()
Definition: constraints.hh:326
virtual ~LockedJointServant()
Definition: constraints.hh:318
void setWeights(const hpp::floatSeq &weights)
Definition: constraints.hh:379
long long size_type
Definition: common.idl:19