hpp-corbaserver 5.0.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-5.0.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-5.0.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-5.0.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
196 hpp::size_type __return__ (getT()->rightHandSideSize ());
197
198 return __return__;
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
210 hpp::size_type __return__ (getT()->parameterSize ());
211
212 return __return__;
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()->rightHandSideAt (s));
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::constraints::ComparisonTypes_t __return__ (getT()->comparisonType ());
239
240 return hpp::corbaServer::convertComparison (__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 hpp::constraints::ComparisonTypes_t _compType = hpp::corbaServer::convertComparison (compType);
252 (getT()->comparisonType (_compType));
253
254
255 } catch (const std::exception& e) {
256 throw ::hpp::Error (e.what());
257 }
258}
259
260// End of implementational code
261} // namespace constraints_impl
262
263} // namespace hpp
264
265//
266// Implementational code for IDL interface hpp::constraints_idl::LockedJoint
267//
268namespace hpp {
269
270namespace constraints_impl {
271template <typename _Base, typename _Storage>
273 const _Storage& s)
274 : hpp::constraints_impl::ImplicitServant<_Base, _Storage> (server, s)
275{
276 // add extra constructor code here
277}
278template <typename _Base, typename _Storage>
280{
281 // add extra destructor code here
282}
283
284// Methods corresponding to IDL attributes and operations
285
286template <typename _Base, typename _Storage>
288{
289 try {
290 // automatically generated code.
291
292 char* __return__ = ::hpp::corbaServer::c_str (getT()->jointName ());
293
294 return __return__;
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::ConfigurationConstraint
307//
308namespace hpp {
309
310namespace constraints_impl {
311template <typename _Base, typename _Storage>
313 const _Storage& s)
314 : hpp::constraints_impl::DifferentiableFunctionServant<_Base, _Storage> (server, s)
315{
316 // add extra constructor code here
317}
318template <typename _Base, typename _Storage>
320{
321 // add extra destructor code here
322}
323
324// Methods corresponding to IDL attributes and operations
325
326template <typename _Base, typename _Storage>
328{
329 try {
330 // automatically generated code.
331
332 hpp::floatSeq* __return__ = hpp::corbaServer::vectorToFloatSeq (getT()->weights ());
333
334 return __return__;
335 } catch (const std::exception& e) {
336 throw ::hpp::Error (e.what());
337 }
338}
339
340template <typename _Base, typename _Storage>
342{
343 try {
344 // automatically generated code.
345 hpp::core::vector_t _weights = hpp::corbaServer::floatSeqToVector (weights);
346 (getT()->weights (_weights));
347
348
349 } catch (const std::exception& e) {
350 throw ::hpp::Error (e.what());
351 }
352}
353
354template <typename _Base, typename _Storage>
356{
357 try {
358 // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-5.0.0/idl/hpp/constraints_idl/constraints.idl:64
359 return corbaServer::vectorToFloatSeq(getT()->goal().vector());
360
361 } catch (const std::exception& e) {
362 throw ::hpp::Error (e.what());
363 }
364}
365
366// End of implementational code
367} // namespace constraints_impl
368
369} // namespace hpp
370
371
372
373
374
375#endif // hpp_constraints_idl__constraints_hxx__
376
hpp::floatSeq * getGoal()
Definition: constraints.hh:355
hpp::floatSeq * getWeights()
Definition: constraints.hh:327
virtual ~ConfigurationConstraintServant()
Definition: constraints.hh:319
void setWeights(const hpp::floatSeq &weights)
Definition: constraints.hh:341
ConfigurationConstraintServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: constraints.hh:312
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:205
hpp::ComparisonTypes_t * getComparisonType()
Definition: constraints.hh:233
virtual ~ImplicitServant()
Definition: constraints.hh:169
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:247
hpp::size_type rightHandSideSize()
Definition: constraints.hh:191
hpp::floatSeq * rightHandSideAt(hpp::value_type s)
Definition: constraints.hh:219
char * jointName()
Definition: constraints.hh:287
LockedJointServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: constraints.hh:272
virtual ~LockedJointServant()
Definition: constraints.hh:279
Implementation of Hpp module Corba server.
Definition: server.hh:78
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:87
Implement CORBA interface `‘Obstacle’'.
Definition: client.hh:46
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