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