1 #ifndef ORO_EIGEN_CORBAEIGENCONVERSION_HPP 2 #define ORO_EIGEN_CORBAEIGENCONVERSION_HPP 1 5 #include <eigen_typekit/transports/corba/EigenTypesC.h> 17 static CorbaType*
toAny(
const StdType& tp) {
23 static bool update(
const CORBA::Any& any, StdType& _value) {
25 if ( any >>= result ) {
37 static bool updateAny( StdType
const& t, CORBA::Any& any ) {
46 cb.length( (CORBA::ULong)(tp.size()) );
47 Eigen::Map<Eigen::VectorXd>(cb.get_buffer() , cb.length()) = tp;
51 static bool toStdType(StdType& tp,
const CorbaType& cb){
55 tp.resize( cb.length() );
56 tp = Eigen::VectorXd::Map(cb.get_buffer() , cb.length());
68 static CorbaType*
toAny(
const StdType& tp) {
74 static bool update(
const CORBA::Any& any, StdType& _value) {
76 if ( any >>= result ) {
88 static bool updateAny( StdType
const& t, CORBA::Any& any ) {
98 size_t rows =
static_cast<size_t>(tp.rows());
99 size_t cols =
static_cast<size_t>(tp.cols());
101 cb.length( (CORBA::ULong)(tp.size() + 2) );
103 cb[0] =
static_cast<double>(rows);
104 cb[1] =
static_cast<double>(cols);
106 Eigen::Map<Eigen::MatrixXd>(cb.get_buffer() + 2 , rows, cols) = tp;
111 static bool toStdType(StdType& tp,
const CorbaType& cb){
112 if(!cb.length() || cb.length() < 2){
116 size_t rows =
static_cast<size_t>(cb[0]);
117 size_t cols =
static_cast<size_t>(cb[1]);
119 tp.resize(rows,cols);
121 tp = Eigen::MatrixXd::Map(cb.get_buffer()+2,rows,cols);
131 #endif // ORO_EIGEN_CORBAEIGENCONVERSION_HPP
static bool update(const CORBA::Any &any, StdType &_value)
static bool toStdType(StdType &tp, const CorbaType &cb)
static CorbaType * toAny(const StdType &tp)
static bool updateAny(StdType const &t, CORBA::Any &any)
static bool toCorbaType(CorbaType &cb, const StdType &tp)
static CORBA::Any_ptr createAny(const StdType &t)
static bool toCorbaType(CorbaType &cb, const StdType &tp)
static CorbaType * toAny(const StdType &tp)
static CORBA::Any_ptr createAny(const StdType &t)
static bool toCorbaType(CorbaType &cb, const StdType &tp)
static bool toStdType(StdType &tp, const CorbaType &cb)
static bool toStdType(StdType &tp, const CorbaType &cb)
static bool updateAny(StdType const &t, CORBA::Any &any)
Eigen::corba::DoubleSequence CorbaType
Eigen::corba::DoubleSequence CorbaType
static bool update(const CORBA::Any &any, StdType &_value)