39 #ifndef ORO_CORBA_CONVERSION_HPP 40 #define ORO_CORBA_CONVERSION_HPP 48 #include <tao/Version.h> 49 #if TAO_MAJOR_VERSION == 1 && TAO_MINOR_VERSION <= 4 51 #else // TAO 1.5 and higher 52 #include <tao/AnyTypeCode/Any.h> 54 #include <tao/CORBA_String.h> 57 #include <omniORB4/stringtypes.h> 60 #include "OrocosTypesC.h" 61 #include "../../Logger.hpp" 62 #include "../../internal/DataSourceTypeInfo.hpp" 103 static bool toStdType(StdType& tp,
const CorbaType& cb) {
127 static bool update(
const CORBA::Any& any, StdType tp) {
140 return new CORBA::Any();
160 template<
class Type,
class _CorbaType = Type>
174 static const Type&
get(
const Type& t) {
178 static bool toStdType(StdType& tp,
const CorbaType& cb) {
188 static bool update(
const CORBA::Any& any, StdType& _value) {
190 if ( any >>= temp ) {
200 *ret <<= toAny( static_cast<CorbaType>(t) );
204 static bool updateAny(
const Type& t, CORBA::Any& any ) {
206 any <<= toAny( static_cast<CorbaType>(t) );
216 template<
class T,
class _Alloc>
224 static bool toStdType(StdType& tp,
const CorbaType& cb) {
226 tp.resize( cb.length() );
227 for (
size_t i = 0; i != cb.length(); ++i) {
235 cb.length( (CORBA::ULong)(tp.size()) );
236 for(
size_t i = 0; i != tp.size(); ++i)
244 static bool toStdType(StdType& tp,
const CORBA::Any& any) {
251 static CorbaType*
toAny(
const StdType& tp) {
257 static bool update(
const CORBA::Any& any, StdType& _value) {
259 if ( any >>= result ) {
271 static bool updateAny( StdType
const& t, CORBA::Any& any ) {
282 template<
class T1,
class T2>
289 static bool toStdType(StdType& tp,
const CorbaType& cb) {
297 static CorbaType*
toAny(
const StdType& tp) {
303 static StdType
get(
const CorbaType* cb) {
309 static bool update(
const CORBA::Any& any, StdType& _value) {
311 if ( any >>= result ) {
323 static bool updateAny( StdType
const& t, CORBA::Any& any ) {
334 template<
class T1,
class T2,
class _Compare,
class _Alloc>
339 typedef std::map<T1, T2, _Compare, _Alloc>
StdType;
341 static bool toStdType(StdType& tp,
const CorbaType& cb) {
345 for (
size_t i = 0; i != cb.length(); ++i) {
355 cb.length(tp.size());
356 typename StdType::const_iterator it = tp.begin();
358 for(
size_t i = 0; i != tp.size(); i++) {
368 static bool toStdType(StdType& tp,
const CORBA::Any& any) {
375 static CorbaType*
toAny(
const StdType& tp) {
381 static StdType
get(
const CorbaType* cb) {
387 static bool update(
const CORBA::Any& any, StdType& _value) {
389 if ( any >>= result ) {
401 static bool updateAny( StdType
const& t, CORBA::Any& any ) {
static bool toCorbaType(CorbaType &cb, const StdType &tp)
static bool toStdType(StdType &tp, const CorbaType &cb)
static bool updateAny(StdType tp, CORBA::Any &any)
static bool toCorbaType(CorbaType &cb, const StdType &tp)
static bool toStdType(StdType &tp, const CorbaType &cb)
static bool toCorbaType(CorbaType &cb, const StdType &tp)
static bool update(const CORBA::Any &any, StdType tp)
static bool toStdType(StdType &tp, const CorbaType &cb)
RTT::corba::CAnySequence sequence
static bool toCorbaType(CorbaType &cb, const StdType &tp)
static CorbaType toAny(Type t)
static bool toStdType(StdType &tp, const CORBA::Any &any)
static CORBA::Any_ptr createAny(const Type &t)
static bool toCorbaType(CorbaType &cb, const StdType &tp)
static bool toStdType(StdType &tp, const CORBA::Any &any)
static bool updateAny(StdType const &t, CORBA::Any &any)
static CORBA::Any_ptr createAny(const StdType &t)
static bool update(const CORBA::Any &any, StdType &_value)
static CorbaType * toAny(const StdType &tp)
RTT::corba::PairSeq sequence
static CORBA::Any_ptr createAny(const StdType &t)
RTT::corba::CAnySequence sequence
AnyConversion< T >::sequence CorbaType
static bool toStdType(StdType &tp, const CorbaType &cb)
static std::ostream & endl(std::ostream &__os)
std::pair< T1, T2 > StdType
static bool toStdType(StdType &tp, const CorbaType &cb)
static bool update(const CORBA::Any &any, StdType &_value)
static bool toCorbaType(CORBA::Any &any, const StdType &tp)
RTT::corba::PairSeq CorbaType
static CORBA::Any_ptr createAny(const StdType &t)
RTT::corba::Pair CorbaType
static bool update(const CORBA::Any &any, StdType &_value)
static bool updateAny(StdType const &t, CORBA::Any &any)
static const std::string & getType()
static CORBA::Any_ptr createAny(StdType tp)
std::map< T1, T2, _Compare, _Alloc > StdType
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
static Type & fromAny(Type &t)
static bool toCorbaType(CORBA::Any &any, const StdType &tp)
std::vector< T, _Alloc > StdType
static bool update(const CORBA::Any &any, StdType &_value)
RTT::corba::CAnySequence sequence
static CorbaType * toAny(const StdType &tp)
static CorbaType * toAny(const StdType &tp)
static bool updateAny(StdType const &t, CORBA::Any &any)
static bool updateAny(const Type &t, CORBA::Any &any)