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

hpp-corbaserver 9.0.2 Corba server for Humanoid Path Planner applications

_constraints.hh
Go to the documentation of this file.
1 #ifndef hpp_core_idl____constraints_hxx__
2 #define hpp_core_idl____constraints_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/_constraints.idl
6 //
7
8 #include <hpp/core_idl/_constraints-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::Constraint
20 //
21 namespace hpp {
22
23 namespace core_impl {
24 template <typename _Base, typename _Storage>
25 ConstraintServant<_Base, _Storage>::ConstraintServant(::hpp::corbaServer::Server* server,
26 const _Storage& s)
27 : hpp::corbaServer::ServantBase<hpp::core::Constraint, _Storage> (server, s)
28 {
29 // add extra constructor code here
30 }
31 template <typename _Base, typename _Storage>
32 ConstraintServant<_Base, _Storage>::~ConstraintServant()
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 ConstraintServant<_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 ConstraintServant<_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 ConstraintServant<_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 ::CORBA::Boolean ConstraintServant<_Base, _Storage>::apply (hpp::floatSeq& config)
74 {
75 try {
76 // automatically generated code.
77 hpp::core::vector_t _config = hpp::corbaServer::floatSeqToVector (config);
78 ::CORBA::Boolean __return__ (getT()->apply (_config));
79 hpp::corbaServer::vectorToFloatSeq (_config, config);
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 char* ConstraintServant<_Base, _Storage>::name ()
88 {
89 try {
90 // automatically generated code.
91
92 char* __return__ = ::hpp::corbaServer::c_str (getT()->name ());
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 char* ConstraintServant<_Base, _Storage>::str ()
102 {
103 try {
104 // automatically generated code.
105 std::ostringstream oss; oss << *get();
106 std::string res = oss.str();
107 return CORBA::string_dup(res.c_str());
108 } catch (const std::exception& e) {
109 throw ::hpp::Error (e.what());
110 }
111 }
112
113 template <typename _Base, typename _Storage>
114 ::CORBA::Boolean ConstraintServant<_Base, _Storage>::isSatisfied (const hpp::floatSeq& config)
115 {
116 try {
117 // automatically generated code.
118 hpp::core::vector_t _config = hpp::corbaServer::floatSeqToVector (config);
119 ::CORBA::Boolean __return__ (getT()->isSatisfied (_config));
120
121 return __return__;
122 } catch (const std::exception& e) {
123 throw ::hpp::Error (e.what());
124 }
125 }
126
127 template <typename _Base, typename _Storage>
128 hpp::core_idl::Constraint_ptr ConstraintServant<_Base, _Storage>::copy ()
129 {
130 try {
131 // automatically generated code.
132
133 hpp::core::ConstraintPtr_t __return__ (getT()->copy ());
134
135 return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Constraint,hpp::core_impl::Constraint>(server_, __return__)._retn();
136 } catch (const std::exception& e) {
137 throw ::hpp::Error (e.what());
138 }
139 }
140
141 // End of implementational code
142 } // namespace core_impl
143
144 } // namespace hpp
145
146 //
147 // Implementational code for IDL interface hpp::core_idl::ConfigProjector
148 //
149 namespace hpp {
150
151 namespace core_impl {
152 template <typename _Base, typename _Storage>
153 ConfigProjectorServant<_Base, _Storage>::ConfigProjectorServant(::hpp::corbaServer::Server* server,
154 const _Storage& s)
155 : hpp::core_impl::ConstraintServant<_Base, _Storage> (server, s)
156 {
157 // add extra constructor code here
158 }
159 template <typename _Base, typename _Storage>
160 ConfigProjectorServant<_Base, _Storage>::~ConfigProjectorServant()
161 {
162 // add extra destructor code here
163 }
164
165 // Methods corresponding to IDL attributes and operations
166
167 template <typename _Base, typename _Storage>
168 void ConfigProjectorServant<_Base, _Storage>::setRightHandSideFromConfig (const hpp::floatSeq& config)
169 {
170 try {
171 // automatically generated code.
172 hpp::core::vector_t _config = hpp::corbaServer::floatSeqToVector (config);
173 (getT()->rightHandSideFromConfig (_config));
174
175
176 } catch (const std::exception& e) {
177 throw ::hpp::Error (e.what());
178 }
179 }
180
181 template <typename _Base, typename _Storage>
182 void ConfigProjectorServant<_Base, _Storage>::setRightHandSideOfConstraintFromConfig (hpp::constraints_idl::Implicit_ptr nm, const hpp::floatSeq& config)
183 {
184 try {
185 // automatically generated code.
186 hpp::constraints::ImplicitPtr_t _nm = ::hpp::corbaServer::reference_to_object<hpp::constraints::Implicit>(server_, nm);
187 hpp::core::vector_t _config = hpp::corbaServer::floatSeqToVector (config);
188 (getT()->rightHandSideFromConfig (_nm, _config));
189
190
191 } catch (const std::exception& e) {
192 throw ::hpp::Error (e.what());
193 }
194 }
195
196 template <typename _Base, typename _Storage>
197 void ConfigProjectorServant<_Base, _Storage>::setRightHandSide (const hpp::floatSeq& param)
198 {
199 try {
200 // automatically generated code.
201 hpp::core::vector_t _param = hpp::corbaServer::floatSeqToVector (param);
202 (getT()->rightHandSide (_param));
203
204
205 } catch (const std::exception& e) {
206 throw ::hpp::Error (e.what());
207 }
208 }
209
210 template <typename _Base, typename _Storage>
211 void ConfigProjectorServant<_Base, _Storage>::setRightHandSideOfConstraint (hpp::constraints_idl::Implicit_ptr nm, const hpp::floatSeq& rhs)
212 {
213 try {
214 // automatically generated code.
215 hpp::constraints::ImplicitPtr_t _nm = ::hpp::corbaServer::reference_to_object<hpp::constraints::Implicit>(server_, nm);
216 hpp::core::vector_t _rhs = hpp::corbaServer::floatSeqToVector (rhs);
217 (getT()->rightHandSide (_nm, _rhs));
218
219
220 } catch (const std::exception& e) {
221 throw ::hpp::Error (e.what());
222 }
223 }
224
225 template <typename _Base, typename _Storage>
226 hpp::floatSeq* ConfigProjectorServant<_Base, _Storage>::getRightHandSide ()
227 {
228 try {
229 // automatically generated code.
230
231 hpp::floatSeq* __return__ = hpp::corbaServer::vectorToFloatSeq (getT()->rightHandSide ());
232
233 return __return__;
234 } catch (const std::exception& e) {
235 throw ::hpp::Error (e.what());
236 }
237 }
238
239 template <typename _Base, typename _Storage>
240 void ConfigProjectorServant<_Base, _Storage>::setRightHandSideAt (hpp::value_type s)
241 {
242 try {
243 // automatically generated code.
244
245 (getT()->rightHandSideAt (s));
246
247
248 } catch (const std::exception& e) {
249 throw ::hpp::Error (e.what());
250 }
251 }
252
253 template <typename _Base, typename _Storage>
254 ::CORBA::Boolean ConfigProjectorServant<_Base, _Storage>::isConstraintSatisfied (hpp::constraints_idl::Implicit_ptr nm, const hpp::floatSeq& arg, hpp::floatSeq_out err, ::CORBA::Boolean& constraintFound)
255 {
256 try {
257 // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-9.0.2/idl/hpp/core_idl/_constraints.idl:40
258 hpp::core::vector_t _arg = hpp::corbaServer::floatSeqToVector (arg);
259 hpp::constraints::ImplicitPtr_t _nm = hpp::corbaServer::reference_to_servant_base<hpp::constraints::Implicit>(server_, nm)->get();
260 hpp::core::vector_t errorOut (_nm->function ().outputSpace ()->nv ());
261 bool res = getT ()->solver ().isConstraintSatisfied
262 (_nm, _arg,errorOut, constraintFound);
263 err = hpp::corbaServer::vectorToFloatSeq (errorOut);
264 return res;
265
266 } catch (const std::exception& e) {
267 throw ::hpp::Error (e.what());
268 }
269 }
270
271 template <typename _Base, typename _Storage>
272 hpp::constraints_idl::Implicits* ConfigProjectorServant<_Base, _Storage>::numericalConstraints ()
273 {
274 try {
275 // automatically generated code.
276
277 hpp::constraints_idl::Implicits* __return__ = hpp::corbaServer::vectorToSeqServant<hpp::constraints_idl::Implicits,hpp::constraints_impl::Implicit,hpp::constraints_impl::Implicit>(server_) (getT()->numericalConstraints ());
278
279 return __return__;
280 } catch (const std::exception& e) {
281 throw ::hpp::Error (e.what());
282 }
283 }
284
285 template <typename _Base, typename _Storage>
286 ::CORBA::Boolean ConfigProjectorServant<_Base, _Storage>::add (hpp::constraints_idl::Implicit_ptr numconstraint, ::CORBA::ULong priority)
287 {
288 try {
289 // automatically generated code.
290 hpp::constraints::ImplicitPtr_t _numconstraint = ::hpp::corbaServer::reference_to_object<hpp::constraints::Implicit>(server_, numconstraint);
291 ::CORBA::Boolean __return__ (getT()->add (_numconstraint, priority));
292
293 return __return__;
294 } catch (const std::exception& e) {
295 throw ::hpp::Error (e.what());
296 }
297 }
298
299 template <typename _Base, typename _Storage>
300 void ConfigProjectorServant<_Base, _Storage>::setLastIsOptional (::CORBA::Boolean optional)
301 {
302 try {
303 // automatically generated code.
304
305 (getT()->lastIsOptional (optional));
306
307
308 } catch (const std::exception& e) {
309 throw ::hpp::Error (e.what());
310 }
311 }
312
313 template <typename _Base, typename _Storage>
314 ::CORBA::Boolean ConfigProjectorServant<_Base, _Storage>::getLastIsOptional ()
315 {
316 try {
317 // automatically generated code.
318
319 ::CORBA::Boolean __return__ (getT()->lastIsOptional ());
320
321 return __return__;
322 } catch (const std::exception& e) {
323 throw ::hpp::Error (e.what());
324 }
325 }
326
327 template <typename _Base, typename _Storage>
328 void ConfigProjectorServant<_Base, _Storage>::setErrorThreshold (hpp::value_type threshold)
329 {
330 try {
331 // automatically generated code.
332
333 (getT()->errorThreshold (threshold));
334
335
336 } catch (const std::exception& e) {
337 throw ::hpp::Error (e.what());
338 }
339 }
340
341 template <typename _Base, typename _Storage>
342 hpp::value_type ConfigProjectorServant<_Base, _Storage>::getErrorThreshold ()
343 {
344 try {
345 // automatically generated code.
346
347 hpp::value_type __return__ (getT()->errorThreshold ());
348
349 return __return__;
350 } catch (const std::exception& e) {
351 throw ::hpp::Error (e.what());
352 }
353 }
354
355 // End of implementational code
356 } // namespace core_impl
357
358 } // namespace hpp
359
360 //
361 // Implementational code for IDL interface hpp::core_idl::ConstraintSet
362 //
363 namespace hpp {
364
365 namespace core_impl {
366 template <typename _Base, typename _Storage>
367 ConstraintSetServant<_Base, _Storage>::ConstraintSetServant(::hpp::corbaServer::Server* server,
368 const _Storage& s)
369 : hpp::core_impl::ConstraintServant<_Base, _Storage> (server, s)
370 {
371 // add extra constructor code here
372 }
373 template <typename _Base, typename _Storage>
374 ConstraintSetServant<_Base, _Storage>::~ConstraintSetServant()
375 {
376 // add extra destructor code here
377 }
378
379 // Methods corresponding to IDL attributes and operations
380
381 template <typename _Base, typename _Storage>
382 hpp::core_idl::Constraint_ptr ConstraintSetServant<_Base, _Storage>::getConfigProjector ()
383 {
384 try {
385 // automatically generated code.
386
387 hpp::core::ConstraintPtr_t __return__ (getT()->configProjector ());
388
389 return ::hpp::corbaServer::makeServantDownCast<hpp::core_impl::Constraint,hpp::core_impl::Constraint>(server_, __return__)._retn();
390 } catch (const std::exception& e) {
391 throw ::hpp::Error (e.what());
392 }
393 }
394
395 template <typename _Base, typename _Storage>
396 void ConstraintSetServant<_Base, _Storage>::addConstraint (hpp::core_idl::Constraint_ptr a_constraint)
397 {
398 try {
399 // automatically generated code.
400 hpp::core::ConstraintPtr_t _a_constraint = ::hpp::corbaServer::reference_to_object<hpp::core::Constraint>(server_, a_constraint);
401 (getT()->addConstraint (_a_constraint));
402
403
404 } catch (const std::exception& e) {
405 throw ::hpp::Error (e.what());
406 }
407 }
408
409 // End of implementational code
410 } // namespace core_impl
411
412 } // namespace hpp
413
414
415
416
417
418 #endif // hpp_core_idl____constraints_hxx__
419
_constraints-fwd.hh
Constraint_ptr
_objref_Constraint * Constraint_ptr
Definition: _constraints-idl.hh:219
hpp::corbaServer::ServantBase< hpp::core::Constraint, _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_impl::ConfigProjectorServant::~ConfigProjectorServant
virtual ~ConfigProjectorServant()
Definition: _constraints.hh:160
hpp::core_impl::ConfigProjectorServant::setRightHandSideOfConstraintFromConfig
void setRightHandSideOfConstraintFromConfig(hpp::constraints_idl::Implicit_ptr nm, const hpp::floatSeq &config)
Definition: _constraints.hh:182
hpp::core_impl::ConfigProjectorServant::getErrorThreshold
hpp::value_type getErrorThreshold()
Definition: _constraints.hh:342
hpp::core_impl::ConfigProjectorServant::numericalConstraints
hpp::constraints_idl::Implicits * numericalConstraints()
Definition: _constraints.hh:272
hpp::core_impl::ConfigProjectorServant::add
::CORBA::Boolean add(hpp::constraints_idl::Implicit_ptr numconstraint, ::CORBA::ULong priority)
Definition: _constraints.hh:286
hpp::core_impl::ConfigProjectorServant::isConstraintSatisfied
::CORBA::Boolean isConstraintSatisfied(hpp::constraints_idl::Implicit_ptr nm, const hpp::floatSeq &arg, hpp::floatSeq_out err, ::CORBA::Boolean &constraintFound)
Definition: _constraints.hh:254
hpp::core_impl::ConfigProjectorServant::setRightHandSideFromConfig
void setRightHandSideFromConfig(const hpp::floatSeq &config)
Definition: _constraints.hh:168
hpp::core_impl::ConfigProjectorServant::setRightHandSideAt
void setRightHandSideAt(hpp::value_type s)
Definition: _constraints.hh:240
hpp::core_impl::ConfigProjectorServant::ConfigProjectorServant
ConfigProjectorServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: _constraints.hh:153
hpp::core_impl::ConfigProjectorServant::getRightHandSide
hpp::floatSeq * getRightHandSide()
Definition: _constraints.hh:226
hpp::core_impl::ConfigProjectorServant::setRightHandSide
void setRightHandSide(const hpp::floatSeq &param)
Definition: _constraints.hh:197
hpp::core_impl::ConfigProjectorServant::setLastIsOptional
void setLastIsOptional(::CORBA::Boolean optional)
Definition: _constraints.hh:300
hpp::core_impl::ConfigProjectorServant::setRightHandSideOfConstraint
void setRightHandSideOfConstraint(hpp::constraints_idl::Implicit_ptr nm, const hpp::floatSeq &rhs)
Definition: _constraints.hh:211
hpp::core_impl::ConfigProjectorServant::setErrorThreshold
void setErrorThreshold(hpp::value_type threshold)
Definition: _constraints.hh:328
hpp::core_impl::ConfigProjectorServant::getLastIsOptional
::CORBA::Boolean getLastIsOptional()
Definition: _constraints.hh:314
hpp::core_impl::ConstraintServant
Definition: _constraints-fwd.hh:30
hpp::core_impl::ConstraintServant::name
char * name()
Definition: _constraints.hh:87
hpp::core_impl::ConstraintServant::deleteIfExpired
::CORBA::Boolean deleteIfExpired()
Definition: _constraints.hh:51
hpp::core_impl::ConstraintServant::deleteThis
void deleteThis()
Definition: _constraints.hh:40
hpp::core_impl::ConstraintServant::~ConstraintServant
virtual ~ConstraintServant()
Definition: _constraints.hh:32
hpp::core_impl::ConstraintServant::apply
::CORBA::Boolean apply(hpp::floatSeq &config)
Definition: _constraints.hh:73
hpp::core_impl::ConstraintServant::copy
hpp::core_idl::Constraint_ptr copy()
Definition: _constraints.hh:128
hpp::core_impl::ConstraintServant::str
char * str()
Definition: _constraints.hh:101
hpp::core_impl::ConstraintServant::isSatisfied
::CORBA::Boolean isSatisfied(const hpp::floatSeq &config)
Definition: _constraints.hh:114
hpp::core_impl::ConstraintServant::ConstraintServant
ConstraintServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: _constraints.hh:25
hpp::core_impl::ConstraintSetServant::addConstraint
void addConstraint(hpp::core_idl::Constraint_ptr a_constraint)
Definition: _constraints.hh:396
hpp::core_impl::ConstraintSetServant::~ConstraintSetServant
virtual ~ConstraintSetServant()
Definition: _constraints.hh:374
hpp::core_impl::ConstraintSetServant::ConstraintSetServant
ConstraintSetServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: _constraints.hh:367
hpp::core_impl::ConstraintSetServant::getConfigProjector
hpp::core_idl::Constraint_ptr getConfigProjector()
Definition: _constraints.hh:382
Implicit_ptr
_objref_Implicit * Implicit_ptr
Definition: constraints-idl.hh:200
conversions.hh
fwd.hh
copy
virtual SteeringMethodPtr_t copy() const
hpp::constraints_idl::Implicits
sequence< Implicit > Implicits
Definition: _constraints.idl:20
hpp::constraints::ImplicitPtr_t
shared_ptr< Implicit > ImplicitPtr_t
hpp::corbaServer::floatSeqToVector
vector_t floatSeqToVector(const floatSeq &dofArray, const size_type expectedSize=-1)
hpp::corbaServer::c_str
char * c_str(const std::string &in)
Definition: conversions.hh:87
hpp::corbaServer::vectorToFloatSeq
floatSeq * vectorToFloatSeq(core::vectorIn_t input)
hpp::core::ConstraintPtr_t
shared_ptr< Constraint > ConstraintPtr_t
hpp::core::vector_t
pinocchio::vector_t vector_t
hpp
Implement CORBA interface `‘Obstacle’'.
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
servant-base.hh
hpp::corbaServer::vectorToSeqServant
Definition: servant-base.hh:451