hpp-corbaserver  4.9.0
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-4.9.0/idl/hpp/constraints_idl/constraints.idl
6 //
7 
9 
10 #include <sstream>
11 
12 #include <hpp/corbaserver/fwd.hh>
15 
16 namespace hpp {
17 
18 namespace corbaServer {
19 
20 //
21 // Implementational code for IDL interface hpp::constraints_idl::DifferentiableFunction
22 //
23 namespace constraints_impl {
24 template <typename _Base, typename _Storage>
26  : ServantBase<hpp::constraints::DifferentiableFunction, _Storage> (server, s)
27 {
28  // add extra constructor code here
29 }
30 template <typename _Base, typename _Storage>
32 {
33  // add extra destructor code here
34 }
35 
36 // Methods corresponding to IDL attributes and operations
37 
38 template <typename _Base, typename _Storage>
40 {
41  try {
42  // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.9.0/idl/hpp/constraints_idl/constraints.idl:20
43  return vectorToFloatSeq (
44  (*get()) (floatSeqToVector(arg, get()->inputSize())).vector()
45  );
46 
47  } catch (const std::exception& e) {
48  throw ::hpp::Error (e.what());
49  }
50 }
51 
52 template <typename _Base, typename _Storage>
54 {
55  try {
56  // generated from /local/robotpkg/var/tmp/robotpkg/path/py-hpp-corbaserver/work/hpp-corbaserver-4.9.0/idl/hpp/constraints_idl/constraints.idl:20
57  matrix_t J (get()->outputDerivativeSize(), get()->inputDerivativeSize());
58  get()->jacobian (J, floatSeqToVector(arg));
59  return matrixToFloatSeqSeq (J);
60 
61  } catch (const std::exception& e) {
62  throw ::hpp::Error (e.what());
63  }
64 }
65 
66 template <typename _Base, typename _Storage>
68 {
69  try {
70  // automatically generated code.
71 
72  hpp::size_type __return__ (getT()->inputSize ());
73 
74  return __return__;
75  } catch (const std::exception& e) {
76  throw ::hpp::Error (e.what());
77  }
78 }
79 
80 template <typename _Base, typename _Storage>
82 {
83  try {
84  // automatically generated code.
85 
86  hpp::size_type __return__ (getT()->inputDerivativeSize ());
87 
88  return __return__;
89  } catch (const std::exception& e) {
90  throw ::hpp::Error (e.what());
91  }
92 }
93 
94 template <typename _Base, typename _Storage>
96 {
97  try {
98  // automatically generated code.
99 
100  hpp::size_type __return__ (getT()->outputSize ());
101 
102  return __return__;
103  } catch (const std::exception& e) {
104  throw ::hpp::Error (e.what());
105  }
106 }
107 
108 template <typename _Base, typename _Storage>
110 {
111  try {
112  // automatically generated code.
113 
114  hpp::size_type __return__ (getT()->outputDerivativeSize ());
115 
116  return __return__;
117  } catch (const std::exception& e) {
118  throw ::hpp::Error (e.what());
119  }
120 }
121 
122 template <typename _Base, typename _Storage>
124 {
125  try {
126  // automatically generated code.
127 
128  char* __return__ = ::hpp::corbaServer::c_str (getT()->name ());
129 
130  return __return__;
131  } catch (const std::exception& e) {
132  throw ::hpp::Error (e.what());
133  }
134 }
135 
136 template <typename _Base, typename _Storage>
138 {
139  try {
140  // automatically generated code.
141  std::ostringstream oss; oss << *get();
142  std::string res = oss.str();
143  return CORBA::string_dup(res.c_str());
144  } catch (const std::exception& e) {
145  throw ::hpp::Error (e.what());
146  }
147 }
148 
149 // End of implementational code
150 } // namespace constraints_impl
151 
152 //
153 // Implementational code for IDL interface hpp::constraints_idl::Implicit
154 //
155 namespace constraints_impl {
156 template <typename _Base, typename _Storage>
158  : ServantBase<hpp::constraints::Implicit, _Storage> (server, s)
159 {
160  // add extra constructor code here
161 }
162 template <typename _Base, typename _Storage>
164 {
165  // add extra destructor code here
166 }
167 
168 // Methods corresponding to IDL attributes and operations
169 
170 template <typename _Base, typename _Storage>
172 {
173  try {
174  // automatically generated code.
175 
176  hpp::constraints::DifferentiableFunctionPtr_t __return__ (getT()->functionPtr ());
177 
178  return makeServantDownCast<hpp::corbaServer::constraints_impl::DifferentiableFunction,hpp::corbaServer::constraints_impl::DifferentiableFunction>(server_, __return__)._retn();
179  } catch (const std::exception& e) {
180  throw ::hpp::Error (e.what());
181  }
182 }
183 
184 template <typename _Base, typename _Storage>
186 {
187  try {
188  // automatically generated code.
190  (getT()->rightHandSideFromConfig (_config));
191 
192 
193  } catch (const std::exception& e) {
194  throw ::hpp::Error (e.what());
195  }
196 }
197 
198 template <typename _Base, typename _Storage>
200 {
201  try {
202  // automatically generated code.
204  (getT()->rightHandSide (_rhs));
205 
206 
207  } catch (const std::exception& e) {
208  throw ::hpp::Error (e.what());
209  }
210 }
211 
212 template <typename _Base, typename _Storage>
214 {
215  try {
216  // automatically generated code.
217 
218  hpp::floatSeq* __return__ = hpp::corbaServer::vectorToFloatSeq (getT()->rightHandSide ());
219 
220  return __return__;
221  } catch (const std::exception& e) {
222  throw ::hpp::Error (e.what());
223  }
224 }
225 
226 template <typename _Base, typename _Storage>
228 {
229  try {
230  // automatically generated code.
231 
232  hpp::size_type __return__ (getT()->rightHandSideSize ());
233 
234  return __return__;
235  } catch (const std::exception& e) {
236  throw ::hpp::Error (e.what());
237  }
238 }
239 
240 template <typename _Base, typename _Storage>
242 {
243  try {
244  // automatically generated code.
245 
246  hpp::size_type __return__ (getT()->parameterSize ());
247 
248  return __return__;
249  } catch (const std::exception& e) {
250  throw ::hpp::Error (e.what());
251  }
252 }
253 
254 template <typename _Base, typename _Storage>
256 {
257  try {
258  // automatically generated code.
259 
261 
262  return __return__;
263  } catch (const std::exception& e) {
264  throw ::hpp::Error (e.what());
265  }
266 }
267 
268 // End of implementational code
269 } // namespace constraints_impl
270 
271 //
272 // Implementational code for IDL interface hpp::constraints_idl::LockedJoint
273 //
274 namespace constraints_impl {
275 template <typename _Base, typename _Storage>
277  : hpp::corbaServer::constraints_impl::ImplicitServant<_Base, _Storage> (server, s)
278 {
279  // add extra constructor code here
280 }
281 template <typename _Base, typename _Storage>
283 {
284  // add extra destructor code here
285 }
286 
287 // Methods corresponding to IDL attributes and operations
288 
289 template <typename _Base, typename _Storage>
291 {
292  try {
293  // automatically generated code.
294 
295  char* __return__ = ::hpp::corbaServer::c_str (getT()->jointName ());
296 
297  return __return__;
298  } catch (const std::exception& e) {
299  throw ::hpp::Error (e.what());
300  }
301 }
302 
303 // End of implementational code
304 } // namespace constraints_impl
305 
306 
307 
308 } // namespace hpp
309 
310 } // namespace corbaServer
311 
312 #endif // hpp_constraints_idl__constraints_hxx__
313 
Definition: servant-base.hh:100
virtual ~LockedJointServant()
Definition: constraints.hh:282
void setRightHandSide(const hpp::floatSeq &rhs)
Definition: constraints.hh:199
Implement CORBA interface ``Obstacle&#39;&#39;.
Definition: basic-server.hh:27
double value_type
Definition: common.idl:18
virtual ~DifferentiableFunctionServant()
Definition: constraints.hh:31
sequence< floatSeq > floatSeqSeq
Definition: common.idl:33
hpp::floatSeq * getRightHandSide()
Definition: constraints.hh:213
DifferentiableFunctionServant(Server *server, const _Storage &s)
Definition: constraints.hh:25
vector_t floatSeqToVector(const floatSeq &dofArray, const size_type expectedSize=-1)
char * c_str(const std::string &in)
Definition: conversions.hh:68
hpp::floatSeqSeq * jacobian(const hpp::floatSeq &arg)
Definition: constraints.hh:53
pinocchio::vector_t vector_t
Definition: fwd.hh:83
hpp::constraints_idl::DifferentiableFunction_ptr function()
Definition: constraints.hh:171
LockedJointServant(Server *server, const _Storage &s)
Definition: constraints.hh:276
_objref_DifferentiableFunction * DifferentiableFunction_ptr
Definition: constraints-idl.hh:71
hpp::size_type rightHandSideSize()
Definition: constraints.hh:227
char * jointName()
Definition: constraints.hh:290
Implementation of Hpp module Corba server.
Definition: server.hh:54
ImplicitServant(Server *server, const _Storage &s)
Definition: constraints.hh:157
hpp::floatSeq * value(const hpp::floatSeq &arg)
Definition: constraints.hh:39
hpp::size_type outputDerivativeSize()
Definition: constraints.hh:109
pinocchio::matrix_t matrix_t
Definition: fwd.hh:81
floatSeqSeq * matrixToFloatSeqSeq(core::matrixIn_t input)
Returns a sequence of the rows of the input matrix.
hpp::floatSeq * rightHandSideAt(hpp::value_type s)
Definition: constraints.hh:255
hpp::size_type outputSize()
Definition: constraints.hh:95
floatSeq * vectorToFloatSeq(core::vectorIn_t input)
StorageElementShPtr_t getT() const
Definition: servant-base.hh:121
sequence< double > floatSeq
Robot configuration is defined by a sequence of dof value.
Definition: common.idl:32
hpp::size_type inputSize()
Definition: constraints.hh:67
void setRightHandSideFromConfig(const hpp::floatSeq &config)
Definition: constraints.hh:185
hpp::size_type inputDerivativeSize()
Definition: constraints.hh:81
hpp::size_type parameterSize()
Definition: constraints.hh:241
long long size_type
Definition: common.idl:19
virtual ~ImplicitServant()
Definition: constraints.hh:163