hpp-corbaserver: src/hpp/constraints_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_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-9.0.2/idl/hpp/constraints_idl/constraints.idl
6 //
7
8 #include <hpp/constraints_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::constraints_idl::DifferentiableFunction
20 //
21 namespace hpp {
22
23 namespace constraints_impl {
24 template <typename _Base, typename _Storage>
25 DifferentiableFunctionServant<_Base, _Storage>::DifferentiableFunctionServant(::hpp::corbaServer::Server* server,
26 const _Storage& s)
27 : hpp::corbaServer::ServantBase<hpp::constraints::DifferentiableFunction, _Storage> (server, s)
28 {
29 // add extra constructor code here
30 }
31 template <typename _Base, typename _Storage>
32 DifferentiableFunctionServant<_Base, _Storage>::~DifferentiableFunctionServant()
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 hpp::floatSeq* DifferentiableFunctionServant<_Base, _Storage>::value (const hpp::floatSeq& arg)
41 {
42 try {
43 // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-9.0.2/idl/hpp/constraints_idl/constraints.idl:20
44 return corbaServer::vectorToFloatSeq (
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
53 template <typename _Base, typename _Storage>
54 hpp::floatSeqSeq* DifferentiableFunctionServant<_Base, _Storage>::jacobian (const hpp::floatSeq& arg)
55 {
56 try {
57 // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-9.0.2/idl/hpp/constraints_idl/constraints.idl:20
58 constraints::matrix_t J (get()->outputDerivativeSize(), get()->inputDerivativeSize());
59 get()->jacobian (J, corbaServer::floatSeqToVector(arg));
60 return corbaServer::matrixToFloatSeqSeq (J);
61
62 } catch (const std::exception& e) {
63 throw ::hpp::Error (e.what());
64 }
65 }
66
67 template <typename _Base, typename _Storage>
68 hpp::size_type DifferentiableFunctionServant<_Base, _Storage>::inputSize ()
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
81 template <typename _Base, typename _Storage>
82 hpp::size_type DifferentiableFunctionServant<_Base, _Storage>::inputDerivativeSize ()
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
95 template <typename _Base, typename _Storage>
96 hpp::size_type DifferentiableFunctionServant<_Base, _Storage>::outputSize ()
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
109 template <typename _Base, typename _Storage>
110 hpp::size_type DifferentiableFunctionServant<_Base, _Storage>::outputDerivativeSize ()
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
123 template <typename _Base, typename _Storage>
124 char* DifferentiableFunctionServant<_Base, _Storage>::name ()
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
137 template <typename _Base, typename _Storage>
138 char* DifferentiableFunctionServant<_Base, _Storage>::str ()
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 //
158 namespace hpp {
159
160 namespace constraints_impl {
161 template <typename _Base, typename _Storage>
162 ImplicitServant<_Base, _Storage>::ImplicitServant(::hpp::corbaServer::Server* server,
163 const _Storage& s)
164 : hpp::corbaServer::ServantBase<hpp::constraints::Implicit, _Storage> (server, s)
165 {
166 // add extra constructor code here
167 }
168 template <typename _Base, typename _Storage>
169 ImplicitServant<_Base, _Storage>::~ImplicitServant()
170 {
171 // add extra destructor code here
172 }
173
174 // Methods corresponding to IDL attributes and operations
175
176 template <typename _Base, typename _Storage>
177 hpp::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
190 template <typename _Base, typename _Storage>
191 hpp::size_type ImplicitServant<_Base, _Storage>::rightHandSideSize ()
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
204 template <typename _Base, typename _Storage>
205 hpp::size_type ImplicitServant<_Base, _Storage>::parameterSize ()
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
218 template <typename _Base, typename _Storage>
219 hpp::floatSeq* ImplicitServant<_Base, _Storage>::rightHandSideAt (hpp::value_type s)
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
232 template <typename _Base, typename _Storage>
233 hpp::ComparisonTypes_t* ImplicitServant<_Base, _Storage>::getComparisonType ()
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
246 template <typename _Base, typename _Storage>
247 void ImplicitServant<_Base, _Storage>::setComparisonType (const hpp::ComparisonTypes_t& compType)
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 //
268 namespace hpp {
269
270 namespace constraints_impl {
271 template <typename _Base, typename _Storage>
272 LockedJointServant<_Base, _Storage>::LockedJointServant(::hpp::corbaServer::Server* server,
273 const _Storage& s)
274 : hpp::constraints_impl::ImplicitServant<_Base, _Storage> (server, s)
275 {
276 // add extra constructor code here
277 }
278 template <typename _Base, typename _Storage>
279 LockedJointServant<_Base, _Storage>::~LockedJointServant()
280 {
281 // add extra destructor code here
282 }
283
284 // Methods corresponding to IDL attributes and operations
285
286 template <typename _Base, typename _Storage>
287 char* LockedJointServant<_Base, _Storage>::jointName ()
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 //
308 namespace hpp {
309
310 namespace constraints_impl {
311 template <typename _Base, typename _Storage>
312 ConfigurationConstraintServant<_Base, _Storage>::ConfigurationConstraintServant(::hpp::corbaServer::Server* server,
313 const _Storage& s)
314 : hpp::constraints_impl::DifferentiableFunctionServant<_Base, _Storage> (server, s)
315 {
316 // add extra constructor code here
317 }
318 template <typename _Base, typename _Storage>
319 ConfigurationConstraintServant<_Base, _Storage>::~ConfigurationConstraintServant()
320 {
321 // add extra destructor code here
322 }
323
324 // Methods corresponding to IDL attributes and operations
325
326 template <typename _Base, typename _Storage>
327 hpp::floatSeq* ConfigurationConstraintServant<_Base, _Storage>::getWeights ()
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
340 template <typename _Base, typename _Storage>
341 void ConfigurationConstraintServant<_Base, _Storage>::setWeights (const hpp::floatSeq& weights)
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
354 template <typename _Base, typename _Storage>
355 hpp::floatSeq* ConfigurationConstraintServant<_Base, _Storage>::getGoal ()
356 {
357 try {
358 // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-9.0.2/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::constraints_impl::ConfigurationConstraintServant::getGoal
hpp::floatSeq * getGoal()
Definition: constraints.hh:355
hpp::constraints_impl::ConfigurationConstraintServant::getWeights
hpp::floatSeq * getWeights()
Definition: constraints.hh:327
hpp::constraints_impl::ConfigurationConstraintServant::~ConfigurationConstraintServant
virtual ~ConfigurationConstraintServant()
Definition: constraints.hh:319
hpp::constraints_impl::ConfigurationConstraintServant::setWeights
void setWeights(const hpp::floatSeq &weights)
Definition: constraints.hh:341
hpp::constraints_impl::ConfigurationConstraintServant::ConfigurationConstraintServant
ConfigurationConstraintServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: constraints.hh:312
hpp::constraints_impl::DifferentiableFunctionServant
Definition: constraints-fwd.hh:29
hpp::constraints_impl::DifferentiableFunctionServant::jacobian
hpp::floatSeqSeq * jacobian(const hpp::floatSeq &arg)
Definition: constraints.hh:54
hpp::constraints_impl::DifferentiableFunctionServant::str
char * str()
Definition: constraints.hh:138
hpp::constraints_impl::DifferentiableFunctionServant::inputSize
hpp::size_type inputSize()
Definition: constraints.hh:68
hpp::constraints_impl::DifferentiableFunctionServant::DifferentiableFunctionServant
DifferentiableFunctionServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: constraints.hh:25
hpp::constraints_impl::DifferentiableFunctionServant::name
char * name()
Definition: constraints.hh:124
hpp::constraints_impl::DifferentiableFunctionServant::outputDerivativeSize
hpp::size_type outputDerivativeSize()
Definition: constraints.hh:110
hpp::constraints_impl::DifferentiableFunctionServant::value
hpp::floatSeq * value(const hpp::floatSeq &arg)
Definition: constraints.hh:40
hpp::constraints_impl::DifferentiableFunctionServant::outputSize
hpp::size_type outputSize()
Definition: constraints.hh:96
hpp::constraints_impl::DifferentiableFunctionServant::inputDerivativeSize
hpp::size_type inputDerivativeSize()
Definition: constraints.hh:82
hpp::constraints_impl::DifferentiableFunctionServant::~DifferentiableFunctionServant
virtual ~DifferentiableFunctionServant()
Definition: constraints.hh:32
hpp::constraints_impl::ImplicitServant
Definition: constraints-fwd.hh:89
hpp::constraints_impl::ImplicitServant::parameterSize
hpp::size_type parameterSize()
Definition: constraints.hh:205
hpp::constraints_impl::ImplicitServant::getComparisonType
hpp::ComparisonTypes_t * getComparisonType()
Definition: constraints.hh:233
hpp::constraints_impl::ImplicitServant::~ImplicitServant
virtual ~ImplicitServant()
Definition: constraints.hh:169
hpp::constraints_impl::ImplicitServant::function
hpp::constraints_idl::DifferentiableFunction_ptr function()
Definition: constraints.hh:177
hpp::constraints_impl::ImplicitServant::ImplicitServant
ImplicitServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: constraints.hh:162
hpp::constraints_impl::ImplicitServant::setComparisonType
void setComparisonType(const hpp::ComparisonTypes_t &compType)
Definition: constraints.hh:247
hpp::constraints_impl::ImplicitServant::rightHandSideSize
hpp::size_type rightHandSideSize()
Definition: constraints.hh:191
hpp::constraints_impl::ImplicitServant::rightHandSideAt
hpp::floatSeq * rightHandSideAt(hpp::value_type s)
Definition: constraints.hh:219
hpp::constraints_impl::LockedJointServant::jointName
char * jointName()
Definition: constraints.hh:287
hpp::constraints_impl::LockedJointServant::LockedJointServant
LockedJointServant(::hpp::corbaServer::Server *server, const _Storage &s)
Definition: constraints.hh:272
hpp::constraints_impl::LockedJointServant::~LockedJointServant
virtual ~LockedJointServant()
Definition: constraints.hh:279
hpp::corbaServer::Server
Implementation of Hpp module Corba server.
Definition: server.hh:78
constraints-fwd.hh
DifferentiableFunction_ptr
_objref_DifferentiableFunction * DifferentiableFunction_ptr
Definition: constraints-idl.hh:71
conversions.hh
fwd.hh
hpp::constraints::ComparisonTypes_t
std::vector< ComparisonType > ComparisonTypes_t
hpp::constraints::DifferentiableFunctionPtr_t
shared_ptr< DifferentiableFunction > DifferentiableFunctionPtr_t
hpp::constraints::matrix_t
pinocchio::matrix_t matrix_t
hpp::corbaServer::floatSeqToVector
vector_t floatSeqToVector(const floatSeq &dofArray, const size_type expectedSize=-1)
hpp::corbaServer::convertComparison
constraints::ComparisonTypes_t convertComparison(hpp::ComparisonTypes_t comp)
Convert CORBA comparison types to C++ comparison type.
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::corbaServer::matrixToFloatSeqSeq
floatSeqSeq * matrixToFloatSeqSeq(core::matrixIn_t input)
Returns a sequence of the rows of the input matrix.
hpp::core::vector_t
pinocchio::vector_t vector_t
hpp
Implement CORBA interface `‘Obstacle’'.
hpp::size_type
long long size_type
Definition: common.idl:19
hpp::floatSeq
sequence< double > floatSeq
Robot configuration is defined by a sequence of dof value.
Definition: common.idl:34
hpp::floatSeqSeq
sequence< floatSeq > floatSeqSeq
Definition: common.idl:35
hpp::value_type
double value_type
Definition: common.idl:18
hpp::ComparisonTypes_t
sequence< ComparisonType > ComparisonTypes_t
Definition: common.idl:50
servant-base.hh