1 #ifndef hpp_core_idl____constraints_hxx__
2 #define hpp_core_idl____constraints_hxx__
24 template <
typename _Base,
typename _Storage>
31 template <
typename _Base,
typename _Storage>
39 template <
typename _Base,
typename _Storage>
44 _ServantBase::deleteThis();
45 }
catch (
const std::exception& e) {
46 throw ::hpp::Error (e.what());
50 template <
typename _Base,
typename _Storage>
55 return _ServantBase::deleteIfExpired();
56 }
catch (
const std::exception& e) {
57 throw ::hpp::Error (e.what());
61 template <
typename _Base,
typename _Storage>
66 _ServantBase::persistantStorage(persistant);
67 }
catch (
const std::exception& e) {
68 throw ::hpp::Error (e.what());
72 template <
typename _Base,
typename _Storage>
78 ::CORBA::Boolean __return__ (getT()->apply (_config));
81 }
catch (
const std::exception& e) {
82 throw ::hpp::Error (e.what());
86 template <
typename _Base,
typename _Storage>
95 }
catch (
const std::exception& e) {
96 throw ::hpp::Error (e.what());
100 template <
typename _Base,
typename _Storage>
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());
113 template <
typename _Base,
typename _Storage>
119 ::CORBA::Boolean __return__ (getT()->isSatisfied (_config));
122 }
catch (
const std::exception& e) {
123 throw ::hpp::Error (e.what());
127 template <
typename _Base,
typename _Storage>
133 hpp::core::ConstraintPtr_t __return__ (getT()->copy ());
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());
151 namespace core_impl {
152 template <
typename _Base,
typename _Storage>
159 template <
typename _Base,
typename _Storage>
167 template <
typename _Base,
typename _Storage>
173 (getT()->rightHandSideFromConfig (_config));
176 }
catch (
const std::exception& e) {
177 throw ::hpp::Error (e.what());
181 template <
typename _Base,
typename _Storage>
186 hpp::constraints::ImplicitPtr_t _nm = ::hpp::corbaServer::reference_to_object<hpp::constraints::Implicit>(server_, nm);
188 (getT()->rightHandSideFromConfig (_nm, _config));
191 }
catch (
const std::exception& e) {
192 throw ::hpp::Error (e.what());
196 template <
typename _Base,
typename _Storage>
202 (getT()->rightHandSide (_param));
205 }
catch (
const std::exception& e) {
206 throw ::hpp::Error (e.what());
210 template <
typename _Base,
typename _Storage>
215 hpp::constraints::ImplicitPtr_t _nm = ::hpp::corbaServer::reference_to_object<hpp::constraints::Implicit>(server_, nm);
217 (getT()->rightHandSide (_nm, _rhs));
220 }
catch (
const std::exception& e) {
221 throw ::hpp::Error (e.what());
225 template <
typename _Base,
typename _Storage>
234 }
catch (
const std::exception& e) {
235 throw ::hpp::Error (e.what());
239 template <
typename _Base,
typename _Storage>
245 (getT()->rightHandSideAt (s));
248 }
catch (
const std::exception& e) {
249 throw ::hpp::Error (e.what());
253 template <
typename _Base,
typename _Storage>
259 hpp::constraints::ImplicitPtr_t _nm = hpp::corbaServer::reference_to_servant_base<hpp::constraints::Implicit>(server_, nm)->get();
261 bool res = getT ()->solver ().isConstraintSatisfied
262 (_nm, _arg,errorOut, constraintFound);
266 }
catch (
const std::exception& e) {
267 throw ::hpp::Error (e.what());
271 template <
typename _Base,
typename _Storage>
280 }
catch (
const std::exception& e) {
281 throw ::hpp::Error (e.what());
285 template <
typename _Base,
typename _Storage>
290 hpp::constraints::ImplicitPtr_t _numconstraint = ::hpp::corbaServer::reference_to_object<hpp::constraints::Implicit>(server_, numconstraint);
291 ::CORBA::Boolean __return__ (getT()->add (_numconstraint, priority));
294 }
catch (
const std::exception& e) {
295 throw ::hpp::Error (e.what());
299 template <
typename _Base,
typename _Storage>
305 (getT()->lastIsOptional (optional));
308 }
catch (
const std::exception& e) {
309 throw ::hpp::Error (e.what());
313 template <
typename _Base,
typename _Storage>
319 ::CORBA::Boolean __return__ (getT()->lastIsOptional ());
322 }
catch (
const std::exception& e) {
323 throw ::hpp::Error (e.what());
327 template <
typename _Base,
typename _Storage>
333 (getT()->errorThreshold (threshold));
336 }
catch (
const std::exception& e) {
337 throw ::hpp::Error (e.what());
341 template <
typename _Base,
typename _Storage>
350 }
catch (
const std::exception& e) {
351 throw ::hpp::Error (e.what());
365 namespace core_impl {
366 template <
typename _Base,
typename _Storage>
373 template <
typename _Base,
typename _Storage>
381 template <
typename _Base,
typename _Storage>
387 hpp::core::ConstraintPtr_t __return__ (getT()->configProjector ());
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());
395 template <
typename _Base,
typename _Storage>
400 hpp::core::ConstraintPtr_t _a_constraint = ::hpp::corbaServer::reference_to_object<hpp::core::Constraint>(server_, a_constraint);
401 (getT()->addConstraint (_a_constraint));
404 }
catch (
const std::exception& e) {
405 throw ::hpp::Error (e.what());
_objref_Constraint * Constraint_ptr
Definition: _constraints-idl.hh:219
bool persistantStorage() const
See persistantStorage(bool)
Definition: servant-base.hh:166
Implementation of Hpp module Corba server.
Definition: server.hh:78
virtual ~ConfigProjectorServant()
Definition: _constraints.hh:160
void setRightHandSideOfConstraintFromConfig(hpp::constraints_idl::Implicit_ptr nm, const hpp::floatSeq &config)
Definition: _constraints.hh:182
hpp::value_type getErrorThreshold()
Definition: _constraints.hh:342
hpp::constraints_idl::Implicits * numericalConstraints()
Definition: _constraints.hh:272
::CORBA::Boolean add(hpp::constraints_idl::Implicit_ptr numconstraint, ::CORBA::ULong priority)
Definition: _constraints.hh:286
::CORBA::Boolean isConstraintSatisfied(hpp::constraints_idl::Implicit_ptr nm, const hpp::floatSeq &arg, hpp::floatSeq_out err, ::CORBA::Boolean &constraintFound)
Definition: _constraints.hh:254
void setRightHandSideFromConfig(const hpp::floatSeq &config)
Definition: _constraints.hh:168
void setRightHandSideAt(hpp::value_type s)
Definition: _constraints.hh:240
ConfigProjectorServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: _constraints.hh:153
hpp::floatSeq * getRightHandSide()
Definition: _constraints.hh:226
void setRightHandSide(const hpp::floatSeq ¶m)
Definition: _constraints.hh:197
void setLastIsOptional(::CORBA::Boolean optional)
Definition: _constraints.hh:300
void setRightHandSideOfConstraint(hpp::constraints_idl::Implicit_ptr nm, const hpp::floatSeq &rhs)
Definition: _constraints.hh:211
void setErrorThreshold(hpp::value_type threshold)
Definition: _constraints.hh:328
::CORBA::Boolean getLastIsOptional()
Definition: _constraints.hh:314
Definition: _constraints-fwd.hh:30
char * name()
Definition: _constraints.hh:87
::CORBA::Boolean deleteIfExpired()
Definition: _constraints.hh:51
void deleteThis()
Definition: _constraints.hh:40
virtual ~ConstraintServant()
Definition: _constraints.hh:32
::CORBA::Boolean apply(hpp::floatSeq &config)
Definition: _constraints.hh:73
hpp::core_idl::Constraint_ptr copy()
Definition: _constraints.hh:128
char * str()
Definition: _constraints.hh:101
::CORBA::Boolean isSatisfied(const hpp::floatSeq &config)
Definition: _constraints.hh:114
ConstraintServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: _constraints.hh:25
void addConstraint(hpp::core_idl::Constraint_ptr a_constraint)
Definition: _constraints.hh:396
virtual ~ConstraintSetServant()
Definition: _constraints.hh:374
ConstraintSetServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: _constraints.hh:367
hpp::core_idl::Constraint_ptr getConfigProjector()
Definition: _constraints.hh:382
_objref_Implicit * Implicit_ptr
Definition: constraints-idl.hh:200
sequence< Implicit > Implicits
Definition: _constraints.idl:20
pinocchio::vector_t vector_t
Definition: fwd.hh:108
vector_t floatSeqToVector(const floatSeq &dofArray, const size_type expectedSize=-1)
char * c_str(const std::string &in)
Definition: conversions.hh:87
floatSeq * vectorToFloatSeq(core::vectorIn_t input)
Implement CORBA interface `‘Obstacle’'.
Definition: client.hh:46
sequence< double > floatSeq
Robot configuration is defined by a sequence of dof value.
Definition: common.idl:34
double value_type
Definition: common.idl:18
Definition: servant-base.hh:451