RTT::AnyConversion< Type > Struct Template Reference

This class converts a given application-specific type to a CORBA::Any object and vice versa. More...

#include <rtt/corba/CorbaConversion.hpp>

List of all members.

Public Types

typedef CORBA::Any CorbaType
typedef Type StdType

Static Public Member Functions

static bool update (const CORBA::Any &any, StdType tp)
 Updates tp with the contents of any.
static CORBA::Any_ptr createAny (StdType tp)
 Creates an CORBA::Any object out of a C++/IDL type.

Detailed Description

template<class Type>
struct RTT::AnyConversion< Type >

This class converts a given application-specific type to a CORBA::Any object and vice versa.

This class works with 'template specialisation'. To create your own any conversion, specialise this class for your application's C++ or IDL type. Also, your specialisation must be in the RTT namespace in order to be found by the CORBA-enabled classes such as Property or the TaskContext.

Parameters:
Type is the Standard C++ or IDL type which is used throughout your application.

Definition at line 80 of file CorbaConversion.hpp.


Member Function Documentation

template<class Type>
static CORBA::Any_ptr RTT::AnyConversion< Type >::createAny ( StdType  tp  )  [inline, static]

Creates an CORBA::Any object out of a C++/IDL type.

Parameters:
tp The value to convert to an Any.
Returns:
An Any object which contains tp or an empty Any object if the conversion was not possible.

Definition at line 103 of file CorbaConversion.hpp.

References RTT::Logger::log().

template<class Type>
static bool RTT::AnyConversion< Type >::update ( const CORBA::Any &  any,
StdType  tp 
) [inline, static]

Updates tp with the contents of any.

Parameters:
any Contains possibly data of a type convertible to tp
tp A C++ or CORBA type in which the contents of the any are written.
Returns:
true if the any was convertible to tp.

Definition at line 92 of file CorbaConversion.hpp.

References RTT::Logger::log().


The documentation for this struct was generated from the following file:
Generated on Thu Dec 23 13:22:40 2010 for Orocos Real-Time Toolkit by  doxygen 1.6.3