29 #ifndef HPP_CORBASERVER_CONVERSIONS_HH 30 #define HPP_CORBASERVER_CONVERSIONS_HH 34 #include <hpp/core/parameter.hh> 35 #include <hpp/util/exception-factory.hh> 38 namespace corbaServer {
39 typedef Eigen::Matrix<CORBA::Long, Eigen::Dynamic, Eigen::Dynamic>
IntMatrix_t;
56 if (!input)
return NULL;
73 bool throwIfNotNormalized);
77 bool throwIfNotNormalized);
88 unsigned int length = 3);
92 inline char*
c_str(
const std::string& in) {
93 char* out =
new char[in.length() + 1];
94 strcpy(out, in.c_str());
98 template <
typename InputIt>
101 char** nameList = Names_t::allocbuf((CORBA::ULong)len);
103 new Names_t((CORBA::ULong)len, (CORBA::ULong)len, nameList,
true);
106 while (begin != end) {
107 nameList[i] =
c_str(*begin);
114 template <
typename Iterable>
116 return toNames_t(iterable.begin(), iterable.end());
119 template <
typename InputIt>
123 indexes->length((CORBA::ULong)len);
126 while (begin != end) {
127 (*indexes)[i] = *begin;
134 template <
typename InputIt>
138 indexes->length((CORBA::ULong)len);
141 while (begin != end) {
142 (*indexes)[(CORBA::ULong)i] = *begin;
149 template <
typename OutputType>
152 for (CORBA::ULong i = 0; i < names.length(); ++i)
153 ret.push_back(std::string(names[i]));
163 core::Parameter
toParameter(
const CORBA::Any& any);
165 CORBA::Any
toCorbaAny(
const core::Parameter& parameter);
168 CORBA::Any* ap =
new CORBA::Any;
176 #endif // HPP_CORBASERVER_CONVERSIONS_HH CORBA::Any * toCorbaAnyPtr(const core::Parameter ¶meter)
Definition: conversions.hh:167
pinocchio::DevicePtr_t DevicePtr_t
Definition: fwd.hh:74
boolSeq * toBoolSeq(InputIt begin, InputIt end)
Definition: conversions.hh:135
core::matrix_t floatSeqSeqToMatrix(const floatSeqSeq &input, const size_type expectedRows=-1, const size_type expectedCols=-1)
ConfigurationPtr_t floatSeqToConfigPtr(const DevicePtr_t &robot, const floatSeq &dofArray, bool throwIfNotNormalized)
Definition: common-idl.hh:461
Implement CORBA interface `‘Obstacle’'.
Definition: basic-server.hh:35
constraints::ComparisonTypes_t convertComparison(hpp::ComparisonTypes_t comp)
Convert CORBA comparison types to C++ comparison type.
std::vector< bool > boolSeqToVector(const hpp::boolSeq &mask, unsigned int length=3)
vector_t floatSeqToVector(const floatSeq &dofArray, const size_type expectedSize=-1)
char * c_str(const std::string &in)
Definition: conversions.hh:92
sequence< string > Names_t
Sequence of names.
Definition: common.idl:23
sequence< long > intSeq
Definition: common.idl:31
pinocchio::vector_t vector_t
Definition: fwd.hh:112
Definition: common-idl.hh:78
Eigen::Matrix< CORBA::Long, Eigen::Dynamic, Eigen::Dynamic > IntMatrix_t
Definition: conversions.hh:39
Definition: common-idl.hh:803
core::ConfigurationPtr_t ConfigurationPtr_t
Definition: fwd.hh:67
Definition: common-idl.hh:347
stringSeqSeq * vectorToStringSeqSeq(std::vector< std::vector< std::string >> input)
sequence< boolean > boolSeq
Definition: common.idl:30
pinocchio::Configuration_t Configuration_t
Definition: fwd.hh:66
void toHppTransform(const Transform3f &in, Transform_ out)
Names_t * toNames_t(InputIt begin, InputIt end)
Definition: conversions.hh:99
intSeqSeq * matrixToIntSeqSeq(Eigen::Ref< const IntMatrix_t > input)
OutputType toStrings(const Names_t &names)
Definition: conversions.hh:150
core::Parameter toParameter(const CORBA::Any &any)
Definition: common-idl.hh:575
IntMatrix_t intSeqSeqToMatrix(const intSeqSeq &input, const size_type expectedRows=-1, const size_type expectedCols=-1)
intSeq * toIntSeq(InputIt begin, InputIt end)
Definition: conversions.hh:120
double Transform_[7]
Element of SE(3) represented by a vector and a unit quaternion.
Definition: common.idl:38
pinocchio::matrix_t matrix_t
Definition: fwd.hh:110
pinocchio::vector3_t vector3_t
Definition: fwd.hh:113
vector3_t floatSeqToVector3(const floatSeq &dofArray)
floatSeqSeq * matrixToFloatSeqSeq(core::matrixIn_t input)
Returns a sequence of the rows of the input matrix.
floatSeq * vectorToFloatSeq(core::vectorIn_t input)
_CORBA_MODULE hpp _CORBA_MODULE_BEG _CORBA_MODULE core_idl _CORBA_MODULE_BEG typedef ::CORBA::ULongLong size_t
Definition: paths-idl.hh:75
Definition: common-idl.hh:192
Definition: common-idl.hh:689
sequence< ComparisonType > ComparisonTypes_t
Definition: common.idl:50
Configuration_t floatSeqToConfig(const DevicePtr_t &robot, const floatSeq &dofArray, bool throwIfNotNormalized)
void toTransform3f(const Transform_ in, Transform3f &out)
pinocchio::Transform3f Transform3f
Definition: fwd.hh:103
::CORBA::Double Transform__slice
Definition: common-idl.hh:916
long long size_type
Definition: common.idl:19
CORBA::Any toCorbaAny(const core::Parameter ¶meter)