DataSourceBase Class Reference

#include <rtt/DataSourceBase.hpp>

Inheritance diagram for DataSourceBase:

ExpressionProxy DataSource DataSource< bool > DataSource< boost::function_traits< DataType >::result_type > DataSource< boost::function_traits< SignatureT >::boost::function_traits< Signature >::result_type > DataSource< CORBA::Any_var > DataSource< double > DataSource< F::arg1_type > DataSource< F::arg2_type > DataSource< F::arg3_type > DataSource< F::arg4_type > DataSource< F::arg5_type > DataSource< F::arg6_type > DataSource< F::result_type > DataSource< function::result_type > DataSource< FunctorT::result_type > DataSource< void >

List of all members.


Detailed Description

The base class for all DataSource's The DataSource is an object containing Data of any type. It's interface is designed for dynamic build-up and destruction of these objects and allowing Commands, Properties etc to use them as 'storage' devices which have the dual copy() /clone() semantics (which is heavily used by the Orocos Task Infrastructure).

DataSource's are reference counted and must be allocated on the headp. Use DataSourceBase::shared_ptr or DataSource<T>::shared_ptr to deal with cleanup of allocated DataSources. You are not allowed to delete a DataSource. If you must have the pointer of a DataSource, use the .get() method of the shared_ptr class.

Once a newly created DataSource is assigned to a shared_ptr, it will be deleted when that pointer goes out of scope and is not shared by other shared_ptr objects.

See also:
DataSource

Definition at line 77 of file DataSourceBase.hpp.


Public Types

typedef
boost::intrusive_ptr
< DataSourceBase
shared_ptr
 Use this type to store a pointer to a DataSourceBase.
typedef
boost::intrusive_ptr
< const
DataSourceBase
const_ptr
 Use this type to store a const pointer to a DataSourceBase.

Public Member Functions

 DataSourceBase ()
void ref () const
 Increase the reference count by one.
void deref () const
 Decrease the reference count by one and delete this on zero.
virtual void reset ()
 Reset the data to initial values.
virtual bool evaluate () const =0
 Force an evaluation of the DataSourceBase.
virtual void updated ()
 In case the DataSource returns a 'reference' type, call this method to notify it that the data was updated in the course of an invocation of get().
virtual bool update (DataSourceBase *other)
 Update the value of this DataSource with the value of an other DataSource.
virtual
CommandInterface
updateCommand (DataSourceBase *other)
 Generate a CommandInterface object which will update this DataSource with the value of another DataSource when execute()'ed.
virtual bool updatePart (DataSourceBase *part, DataSourceBase *other)
 Update part of the value of this DataSource with the value of an other DataSource.
virtual
CommandInterface
updatePartCommand (DataSourceBase *part, DataSourceBase *other)
 Generate a CommandInterface object which will partially update this DataSource with the value of another DataSource when execute()'ed.
virtual DataSourceBaseclone () const =0
 Return a shallow clone of this DataSource.
virtual DataSourceBasecopy (std::map< const DataSourceBase *, DataSourceBase * > &alreadyCloned) const =0
 Create a deep copy of this DataSource, unless it is already cloned.
virtual std::string getType () const =0
 Return useful type info in a human readable format.
virtual const TypeInfogetTypeInfo () const =0
 Return the Orocos type info object.
virtual std::string getTypeName () const =0
 Return the Orocos type name, without const, pointer or reference qualifiers.
std::ostream & write (std::ostream &os)
 Stream the contents of this object.
std::string toString ()
 Get the contents of this object as a string.
bool decomposeType (PropertyBag &targetbag)
 Decompose the contents of this object into properties.
bool composeType (DataSourceBase::shared_ptr source)
 Compose the contents of this object from another datasource.
virtual void * createBlob (int protocol)
 Creates a transportable data object with the current value of this DataSource.
virtual void * getBlob (int protocol)
 Creates a transportable data object with the current value of this DataSource.
virtual bool updateBlob (int protocol, const void *data)
 Updates the value of this DataSource with the value of a transportable data object.
virtual int serverProtocol () const
 Inspect if this DataSource is a proxy for a remote server object.
virtual void * server (int protocol, void *arg)
 Create an object server which 'mirrors' this DataSource.
virtual void * method (int protocol, MethodC *orig, void *arg)
 Create an object server which 'mirrors' this DataSource.

Protected Member Functions

virtual ~DataSourceBase ()
 the destructor is private.

Protected Attributes

oro_atomic_t refcount
 We keep the refcount ourselves.

Constructor & Destructor Documentation

~DataSourceBase (  )  [protected, virtual]

the destructor is private.

You are not allowed to delete this class yourself, use a shared pointer !

Definition at line 51 of file DataSource.cpp.


Member Function Documentation

virtual bool evaluate (  )  const [pure virtual]

Force an evaluation of the DataSourceBase.

Returns:
true on successful evaluation. If the DataSource itself contains a boolean, return that boolean.

Implemented in ExpressionProxy, DataSource, DataSource< DataSourceType >, DataSource< Arg6T >, DataSource< boost::function_types::function_type_parameter_c< Function, 1 >::type >, DataSource< boost::function_types::function_type_parameter_c< Function, 0 >::type >, DataSource< F::arg2_type >, DataSource< FunctionT::arg3_type >, DataSource< EventT::SlotFunction::arg2_type >, DataSource< double >, DataSource< function::sixth_argument_type >, DataSource< Arg1T >, DataSource< Arg2T >, DataSource< R >, DataSource< FunctionImpl::arg2_type >, DataSource< A >, DataSource< function::argument_type >, DataSource< boost::function_traits< DataType >::arg3_type >, DataSource< CORBA::Any_var >, DataSource< boost::weak_ptr< boost::remove_pointer< typename FunctionImpl::arg1_type >::type > >, DataSource< F::arg5_type >, DataSource< void >, DataSource< boost::weak_ptr< RTT::RTT::StateMachine > >, DataSource< boost::weak_ptr< ComponentT > >, DataSource< RTT::ProgramInterface * >, DataSource< boost::function_traits< DataType >::arg1_type >, DataSource< FunctorT::result_type >, DataSource< function::result_type >, DataSource< boost::weak_ptr< RTT::ProgramInterface > >, DataSource< boost::function_traits< DataType >::arg2_type >, DataSource< function::second_argument_type >, DataSource< F::arg1_type >, DataSource< F::result_type >, DataSource< boost::weak_ptr< RTT::StateMachine > >, DataSource< function::fourth_argument_type >, DataSource< EventT::SlotFunction::arg1_type >, DataSource< boost::function_traits< SignatureT >::boost::function_traits< Signature >::result_type >, DataSource< FunctionT::arg2_type >, DataSource< F::arg4_type >, DataSource< function::fifth_argument_type >, DataSource< value_t >, DataSource< boost::function_traits< DataType >::result_type >, DataSource< bool >, DataSource< F::arg3_type >, DataSource< boost::weak_ptr< RTT::RTT::ProgramInterface > >, DataSource< EventT::SlotFunction::arg3_type >, DataSource< function::first_argument_type >, DataSource< F::arg6_type >, DataSource< Arg3T >, DataSource< function::third_argument_type >, DataSource< boost::function_traits< DataType >::arg4_type >, DataSource< Arg4T >, DataSource< Arg5T >, and DataSource< boost::function_types::function_type_parameter_c< Function, 2 >::type >.

Referenced by StatementProcessor::D::doPrint(), and DataSourceBase::getBlob().

bool update ( DataSourceBase other  )  [virtual]

Update the value of this DataSource with the value of an other DataSource.

Update does a full update of the value, adding extra information if necessary.

Returns:
false if the DataSources are of different type OR if the contents of this DataSource can not be updated.

Reimplemented in AssignableDataSource, AssignableDataSource< DataSourceType >, AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 1 >::type >, AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 0 >::type >, AssignableDataSource< EventT::SlotFunction::arg2_type >, AssignableDataSource< R >, AssignableDataSource< A >, AssignableDataSource< boost::function_traits< DataType >::arg3_type >, AssignableDataSource< RTT::ProgramInterface * >, AssignableDataSource< boost::function_traits< DataType >::arg1_type >, AssignableDataSource< boost::weak_ptr< RTT::ProgramInterface > >, AssignableDataSource< boost::function_traits< DataType >::arg2_type >, AssignableDataSource< boost::weak_ptr< RTT::StateMachine > >, AssignableDataSource< EventT::SlotFunction::arg1_type >, AssignableDataSource< bool >, AssignableDataSource< value_t >, AssignableDataSource< boost::function_traits< DataType >::result_type >, AssignableDataSource< EventT::SlotFunction::arg3_type >, AssignableDataSource< boost::function_traits< DataType >::arg4_type >, and AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 2 >::type >.

Definition at line 89 of file DataSource.cpp.

CommandInterface * updateCommand ( DataSourceBase other  )  [virtual]

Generate a CommandInterface object which will update this DataSource with the value of another DataSource when execute()'ed.

Returns:
zero if the DataSource types do not match OR if the contents of this DataSource can not be updated.

Reimplemented in CORBAAssignableExpression, AssignableDataSource, IndexedValueDataSource, AssignableDataSource< DataSourceType >, AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 1 >::type >, AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 0 >::type >, AssignableDataSource< EventT::SlotFunction::arg2_type >, AssignableDataSource< R >, AssignableDataSource< A >, AssignableDataSource< boost::function_traits< DataType >::arg3_type >, AssignableDataSource< RTT::ProgramInterface * >, AssignableDataSource< boost::function_traits< DataType >::arg1_type >, AssignableDataSource< boost::weak_ptr< RTT::ProgramInterface > >, AssignableDataSource< boost::function_traits< DataType >::arg2_type >, AssignableDataSource< boost::weak_ptr< RTT::StateMachine > >, AssignableDataSource< EventT::SlotFunction::arg1_type >, AssignableDataSource< bool >, AssignableDataSource< value_t >, AssignableDataSource< boost::function_traits< DataType >::result_type >, AssignableDataSource< EventT::SlotFunction::arg3_type >, AssignableDataSource< boost::function_traits< DataType >::arg4_type >, and AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 2 >::type >.

Definition at line 97 of file DataSource.cpp.

bool updatePart ( DataSourceBase part,
DataSourceBase other 
) [virtual]

Update part of the value of this DataSource with the value of an other DataSource.

Update does a partial update of the value, according to part, which is most likely an index or hash value of some type.

Returns:
false if the DataSources are of different type OR if the contents of this DataSource can not be partially updated.

Definition at line 101 of file DataSource.cpp.

CommandInterface * updatePartCommand ( DataSourceBase part,
DataSourceBase other 
) [virtual]

Generate a CommandInterface object which will partially update this DataSource with the value of another DataSource when execute()'ed.

part is an index or hash value of some type.

Returns:
zero if the DataSource types do not match OR if the contents of this DataSource can not be partially updated.

Reimplemented in CORBAAssignableExpression, and IndexedValueDataSource.

Definition at line 105 of file DataSource.cpp.

Referenced by CORBAAssignableExpression::updatePartCommand().

virtual DataSourceBase* clone (  )  const [pure virtual]

Return a shallow clone of this DataSource.

This method returns a duplicate of this instance which re-uses the DataSources this DataSource holds reference to. The clone() function is thus a non-deep copy.

Implemented in BufferDataSource, AnyDataSource, CorbaDataObject, CorbaDataObjectProxy, CORBAExpression, CORBAExpression< void >, CORBAAssignableExpression, ExpressionProxy, DataObjectLocked, DataObjectPrioritySet, DataObjectPriorityGet, DataObjectLockFree, DataObject, DataSource, AssignableDataSource, DataSourceArgsMethod, DataSourceCommand, DataSourceCondition, ValueDataSource, ConstantDataSource, ReferenceDataSource, IndexedValueDataSource, BinaryDataSource, TernaryDataSource, SixaryDataSource, UnaryDataSource, NArityDataSource, DataSourceTime, FunctorDataSource0, FunctorDataSource1, FunctorDataSourceDS0, FunctorDataSourceDS1, FunctorDataSource2, FunctorDataSource3, FunctorDataSource4, FunctorDataSource5, FunctorDataSource6, DataSource< DataSourceType >, DataSource< Arg6T >, DataSource< boost::function_types::function_type_parameter_c< Function, 1 >::type >, DataSource< boost::function_types::function_type_parameter_c< Function, 0 >::type >, DataSource< F::arg2_type >, DataSource< FunctionT::arg3_type >, DataSource< EventT::SlotFunction::arg2_type >, DataSource< double >, DataSource< function::sixth_argument_type >, DataSource< Arg1T >, DataSource< Arg2T >, DataSource< R >, DataSource< FunctionImpl::arg2_type >, DataSource< A >, DataSource< function::argument_type >, DataSource< boost::function_traits< DataType >::arg3_type >, DataSource< CORBA::Any_var >, DataSource< boost::weak_ptr< boost::remove_pointer< typename FunctionImpl::arg1_type >::type > >, DataSource< F::arg5_type >, DataSource< void >, DataSource< boost::weak_ptr< RTT::RTT::StateMachine > >, DataSource< boost::weak_ptr< ComponentT > >, DataSource< RTT::ProgramInterface * >, DataSource< boost::function_traits< DataType >::arg1_type >, DataSource< FunctorT::result_type >, DataSource< function::result_type >, DataSource< boost::weak_ptr< RTT::ProgramInterface > >, DataSource< boost::function_traits< DataType >::arg2_type >, DataSource< function::second_argument_type >, DataSource< F::arg1_type >, DataSource< F::result_type >, DataSource< boost::weak_ptr< RTT::StateMachine > >, DataSource< function::fourth_argument_type >, DataSource< EventT::SlotFunction::arg1_type >, DataSource< boost::function_traits< SignatureT >::boost::function_traits< Signature >::result_type >, DataSource< FunctionT::arg2_type >, DataSource< F::arg4_type >, DataSource< function::fifth_argument_type >, DataSource< value_t >, DataSource< boost::function_traits< DataType >::result_type >, DataSource< bool >, DataSource< F::arg3_type >, DataSource< boost::weak_ptr< RTT::RTT::ProgramInterface > >, DataSource< EventT::SlotFunction::arg3_type >, DataSource< function::first_argument_type >, DataSource< F::arg6_type >, DataSource< Arg3T >, DataSource< function::third_argument_type >, DataSource< boost::function_traits< DataType >::arg4_type >, DataSource< Arg4T >, DataSource< Arg5T >, DataSource< boost::function_types::function_type_parameter_c< Function, 2 >::type >, AssignableDataSource< DataSourceType >, AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 1 >::type >, AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 0 >::type >, AssignableDataSource< EventT::SlotFunction::arg2_type >, AssignableDataSource< R >, AssignableDataSource< A >, AssignableDataSource< boost::function_traits< DataType >::arg3_type >, AssignableDataSource< RTT::ProgramInterface * >, AssignableDataSource< boost::function_traits< DataType >::arg1_type >, AssignableDataSource< boost::weak_ptr< RTT::ProgramInterface > >, AssignableDataSource< boost::function_traits< DataType >::arg2_type >, AssignableDataSource< boost::weak_ptr< RTT::StateMachine > >, AssignableDataSource< EventT::SlotFunction::arg1_type >, AssignableDataSource< bool >, AssignableDataSource< value_t >, AssignableDataSource< boost::function_traits< DataType >::result_type >, AssignableDataSource< EventT::SlotFunction::arg3_type >, AssignableDataSource< boost::function_traits< DataType >::arg4_type >, AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 2 >::type >, ValueDataSource< R >, ValueDataSource< A >, ValueDataSource< boost::weak_ptr< ProgramInterface > >, ValueDataSource< boost::function_traits< DataType >::arg3_type >, ValueDataSource< boost::function_traits< DataType >::arg1_type >, ValueDataSource< boost::function_traits< DataType >::arg2_type >, ValueDataSource< boost::weak_ptr< StateMachine > >, ValueDataSource< boost::function_traits< DataType >::result_type >, ValueDataSource< boost::function_traits< DataType >::arg4_type >, FunctorDataSource0< F >, FunctorDataSource1< F, F::arg1_type >, FunctorDataSource2< F, F::arg1_type, F::arg2_type >, FunctorDataSource3< F, F::arg1_type, F::arg2_type, F::arg3_type >, FunctorDataSource4< F, F::arg1_type, F::arg2_type, F::arg3_type, F::arg4_type >, FunctorDataSource5< F, F::arg1_type, F::arg2_type, F::arg3_type, F::arg4_type, F::arg5_type >, and FunctorDataSource6< F, F::arg1_type, F::arg2_type, F::arg3_type, F::arg4_type, F::arg5_type, F::arg6_type >.

virtual DataSourceBase* copy ( std::map< const DataSourceBase *, DataSourceBase * > &  alreadyCloned  )  const [pure virtual]

Create a deep copy of this DataSource, unless it is already cloned.

Places the association (parent, clone) in alreadyCloned. If the DataSource is non-copyable (for example it represents the Property of a Task ), this may be returned.

Implemented in BufferDataSource, AnyDataSource, CorbaDataObject, CorbaDataObjectProxy, CORBAExpression, CORBAExpression< void >, CORBAAssignableExpression, ExpressionProxy, DataObjectLocked, DataObjectPrioritySet, DataObjectPriorityGet, DataObjectLockFree, DataObject, DataSource, AssignableDataSource, DataSourceArgsMethod, DataSourceCommand, DataSourceCondition, ValueDataSource, ConstantDataSource, ReferenceDataSource, IndexedValueDataSource, BinaryDataSource, TernaryDataSource, SixaryDataSource, UnaryDataSource, NArityDataSource, DataSourceTime, FunctorDataSource0, FunctorDataSource1, FunctorDataSourceDS0, FunctorDataSourceDS1, FunctorDataSource2, FunctorDataSource3, FunctorDataSource4, FunctorDataSource5, FunctorDataSource6, DataSource< DataSourceType >, DataSource< Arg6T >, DataSource< boost::function_types::function_type_parameter_c< Function, 1 >::type >, DataSource< boost::function_types::function_type_parameter_c< Function, 0 >::type >, DataSource< F::arg2_type >, DataSource< FunctionT::arg3_type >, DataSource< EventT::SlotFunction::arg2_type >, DataSource< double >, DataSource< function::sixth_argument_type >, DataSource< Arg1T >, DataSource< Arg2T >, DataSource< R >, DataSource< FunctionImpl::arg2_type >, DataSource< A >, DataSource< function::argument_type >, DataSource< boost::function_traits< DataType >::arg3_type >, DataSource< CORBA::Any_var >, DataSource< boost::weak_ptr< boost::remove_pointer< typename FunctionImpl::arg1_type >::type > >, DataSource< F::arg5_type >, DataSource< void >, DataSource< boost::weak_ptr< RTT::RTT::StateMachine > >, DataSource< boost::weak_ptr< ComponentT > >, DataSource< RTT::ProgramInterface * >, DataSource< boost::function_traits< DataType >::arg1_type >, DataSource< FunctorT::result_type >, DataSource< function::result_type >, DataSource< boost::weak_ptr< RTT::ProgramInterface > >, DataSource< boost::function_traits< DataType >::arg2_type >, DataSource< function::second_argument_type >, DataSource< F::arg1_type >, DataSource< F::result_type >, DataSource< boost::weak_ptr< RTT::StateMachine > >, DataSource< function::fourth_argument_type >, DataSource< EventT::SlotFunction::arg1_type >, DataSource< boost::function_traits< SignatureT >::boost::function_traits< Signature >::result_type >, DataSource< FunctionT::arg2_type >, DataSource< F::arg4_type >, DataSource< function::fifth_argument_type >, DataSource< value_t >, DataSource< boost::function_traits< DataType >::result_type >, DataSource< bool >, DataSource< F::arg3_type >, DataSource< boost::weak_ptr< RTT::RTT::ProgramInterface > >, DataSource< EventT::SlotFunction::arg3_type >, DataSource< function::first_argument_type >, DataSource< F::arg6_type >, DataSource< Arg3T >, DataSource< function::third_argument_type >, DataSource< boost::function_traits< DataType >::arg4_type >, DataSource< Arg4T >, DataSource< Arg5T >, DataSource< boost::function_types::function_type_parameter_c< Function, 2 >::type >, AssignableDataSource< DataSourceType >, AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 1 >::type >, AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 0 >::type >, AssignableDataSource< EventT::SlotFunction::arg2_type >, AssignableDataSource< R >, AssignableDataSource< A >, AssignableDataSource< boost::function_traits< DataType >::arg3_type >, AssignableDataSource< RTT::ProgramInterface * >, AssignableDataSource< boost::function_traits< DataType >::arg1_type >, AssignableDataSource< boost::weak_ptr< RTT::ProgramInterface > >, AssignableDataSource< boost::function_traits< DataType >::arg2_type >, AssignableDataSource< boost::weak_ptr< RTT::StateMachine > >, AssignableDataSource< EventT::SlotFunction::arg1_type >, AssignableDataSource< bool >, AssignableDataSource< value_t >, AssignableDataSource< boost::function_traits< DataType >::result_type >, AssignableDataSource< EventT::SlotFunction::arg3_type >, AssignableDataSource< boost::function_traits< DataType >::arg4_type >, AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 2 >::type >, ValueDataSource< R >, ValueDataSource< A >, ValueDataSource< boost::weak_ptr< ProgramInterface > >, ValueDataSource< boost::function_traits< DataType >::arg3_type >, ValueDataSource< boost::function_traits< DataType >::arg1_type >, ValueDataSource< boost::function_traits< DataType >::arg2_type >, ValueDataSource< boost::weak_ptr< StateMachine > >, ValueDataSource< boost::function_traits< DataType >::result_type >, ValueDataSource< boost::function_traits< DataType >::arg4_type >, FunctorDataSource0< F >, FunctorDataSource1< F, F::arg1_type >, FunctorDataSource2< F, F::arg1_type, F::arg2_type >, FunctorDataSource3< F, F::arg1_type, F::arg2_type, F::arg3_type >, FunctorDataSource4< F, F::arg1_type, F::arg2_type, F::arg3_type, F::arg4_type >, FunctorDataSource5< F, F::arg1_type, F::arg2_type, F::arg3_type, F::arg4_type, F::arg5_type >, and FunctorDataSource6< F, F::arg1_type, F::arg2_type, F::arg3_type, F::arg4_type, F::arg5_type, F::arg6_type >.

std::ostream & write ( std::ostream &  os  ) 

Stream the contents of this object.

See also:
TypeInfo

Definition at line 59 of file DataSource.cpp.

std::string toString (  ) 

Get the contents of this object as a string.

See also:
TypeInfo

Definition at line 71 of file DataSource.cpp.

bool decomposeType ( PropertyBag targetbag  ) 

Decompose the contents of this object into properties.

See also:
TypeInfo

Definition at line 77 of file DataSource.cpp.

bool composeType ( DataSourceBase::shared_ptr  source  ) 

Compose the contents of this object from another datasource.

See also:
TypeInfo

Definition at line 83 of file DataSource.cpp.

void * createBlob ( int  protocol  )  [virtual]

Creates a transportable data object with the current value of this DataSource.

This does not trigger the evaluation() of this data source.

Returns:
a valid object or nill if this type is not supported.

Reimplemented in ExpressionProxy.

Definition at line 116 of file DataSource.cpp.

References TypeTransporter::createBlob(), TypeInfo::getProtocol(), and DataSourceBase::getTypeInfo().

Referenced by CorbaBufferProxy::Push(), CORBAAssignableExpression::set(), and CorbaDataObjectProxy::Set().

void * getBlob ( int  protocol  )  [virtual]

Creates a transportable data object with the current value of this DataSource.

This does trigger the evaluation() of this data source. Equivalent to this->evaluate(); this->createBlob();

Returns:
a valid object or nill if this type is not supported.

Reimplemented in ExpressionProxy.

Definition at line 126 of file DataSource.cpp.

References TypeTransporter::createBlob(), DataSourceBase::evaluate(), TypeInfo::getProtocol(), and DataSourceBase::getTypeInfo().

bool updateBlob ( int  protocol,
const void *  data 
) [virtual]

Updates the value of this DataSource with the value of a transportable data object.

Parameters:
any The value to update to.
Returns:
true if any had the correct type.

Reimplemented in AssignableDataSource, AssignableDataSource< DataSourceType >, AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 1 >::type >, AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 0 >::type >, AssignableDataSource< EventT::SlotFunction::arg2_type >, AssignableDataSource< R >, AssignableDataSource< A >, AssignableDataSource< boost::function_traits< DataType >::arg3_type >, AssignableDataSource< RTT::ProgramInterface * >, AssignableDataSource< boost::function_traits< DataType >::arg1_type >, AssignableDataSource< boost::weak_ptr< RTT::ProgramInterface > >, AssignableDataSource< boost::function_traits< DataType >::arg2_type >, AssignableDataSource< boost::weak_ptr< RTT::StateMachine > >, AssignableDataSource< EventT::SlotFunction::arg1_type >, AssignableDataSource< bool >, AssignableDataSource< value_t >, AssignableDataSource< boost::function_traits< DataType >::result_type >, AssignableDataSource< EventT::SlotFunction::arg3_type >, AssignableDataSource< boost::function_traits< DataType >::arg4_type >, and AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 2 >::type >.

Definition at line 137 of file DataSource.cpp.

int serverProtocol (  )  const [virtual]

Inspect if this DataSource is a proxy for a remote server object.

Returns:
0 if it is a local DataSource, or the protocol id if it is a proxy for a remove server.

Reimplemented in AnyDataSource, CORBAExpression, CORBAExpression< void >, CORBAAssignableExpression, and ExpressionProxy.

Definition at line 142 of file DataSource.cpp.

Referenced by AssignableDataSource::narrow(), DataSource::narrow(), CorbaTemplateProtocol::narrowAssignableDataSource(), and CorbaTemplateProtocol::narrowDataSource().

void * server ( int  protocol,
void *  arg 
) [virtual]

Create an object server which 'mirrors' this DataSource.

Returns:
The existing server if serverProtocol() == protocol, or a new server object reference otherwise.
See also:
Operations.idl

Reimplemented in CORBAExpression, CORBAExpression< void >, CORBAAssignableExpression, ExpressionProxy, AssignableDataSource, AssignableDataSource< DataSourceType >, AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 1 >::type >, AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 0 >::type >, AssignableDataSource< EventT::SlotFunction::arg2_type >, AssignableDataSource< R >, AssignableDataSource< A >, AssignableDataSource< boost::function_traits< DataType >::arg3_type >, AssignableDataSource< RTT::ProgramInterface * >, AssignableDataSource< boost::function_traits< DataType >::arg1_type >, AssignableDataSource< boost::weak_ptr< RTT::ProgramInterface > >, AssignableDataSource< boost::function_traits< DataType >::arg2_type >, AssignableDataSource< boost::weak_ptr< RTT::StateMachine > >, AssignableDataSource< EventT::SlotFunction::arg1_type >, AssignableDataSource< bool >, AssignableDataSource< value_t >, AssignableDataSource< boost::function_traits< DataType >::result_type >, AssignableDataSource< EventT::SlotFunction::arg3_type >, AssignableDataSource< boost::function_traits< DataType >::arg4_type >, and AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 2 >::type >.

Definition at line 147 of file DataSource.cpp.

References TypeInfo::getProtocol(), DataSourceBase::getTypeInfo(), and TypeTransporter::server().

Referenced by CorbaTemplateProtocol::narrowAssignableDataSource(), and CorbaTemplateProtocol::narrowDataSource().

void * method ( int  protocol,
MethodC orig,
void *  arg 
) [virtual]

Create an object server which 'mirrors' this DataSource.

Returns:
The existing server if serverProtocol() == protocol, or a new method object reference otherwise.
See also:
Operations.idl

Reimplemented in ExpressionProxy.

Definition at line 157 of file DataSource.cpp.

References TypeInfo::getProtocol(), DataSourceBase::getTypeInfo(), and TypeTransporter::method().


Member Data Documentation

oro_atomic_t refcount [mutable, protected]

We keep the refcount ourselves.

We aren't using boost::shared_ptr, because boost::intrusive_ptr is better, exactly because it can be used with refcounts that are stored in the class itself. Advantages are that the shared_ptr's for derived classes use the same refcount, which is of course very much desired, and that refcounting happens in an efficient way, which is also nice :)

Definition at line 89 of file DataSourceBase.hpp.

Referenced by DataSourceBase::DataSourceBase(), DataSourceBase::deref(), and DataSourceBase::ref().


The documentation for this class was generated from the following files:
Generated on Tue Mar 25 17:41:55 2008 for OrocosReal-TimeToolkit by  doxygen 1.5.3