SAGA Adaptor CPI v.1.0
saga::adaptors::dynamic_instance_data< T > Class Template Reference

#include <instance_data.hpp>

Inheritance diagram for saga::adaptors::dynamic_instance_data< T >:

List of all members.

Public Types

typedef T instance_data_type

Public Member Functions

 dynamic_instance_data (proxy *prxy)
template<typename Cpi >
 dynamic_instance_data (Cpi *cpi_instance)
 dynamic_instance_data ()
template<typename Cpi >
void init_data (Cpi *proxy, TR1::shared_ptr< instance_data_type > d)
template<typename Cpi >
void release_data (Cpi *proxy)
 ~dynamic_instance_data (void)
T * operator-> () const
bool is_valid () const

Detailed Description

template<typename T>
class saga::adaptors::dynamic_instance_data< T >

Class implementing the scoped_lock pattern for the instance_data (same as instance_data, except this is using dynamic_pointer_cast for the stored data, i.e. this should be used whenever a special instance data type is in use).

Note:
If you want to use shared data which had been registered in the instance_data instance in the session, just create an instance of this class at the beginning of the scope you will use the shared data in by specifying its id.

Definition at line 138 of file instance_data.hpp.


Member Typedef Documentation

template<typename T >
typedef T saga::adaptors::dynamic_instance_data< T >::instance_data_type

Definition at line 160 of file instance_data.hpp.


Constructor & Destructor Documentation

template<typename T >
saga::adaptors::dynamic_instance_data< T >::dynamic_instance_data ( proxy *  prxy) [inline]

Constructor: Here we lock the appropriate object identified by id

Parameters:
idthe identifier for the object you want to lock.
Note:
The object you want to lock has to be registered in the current session before.

Definition at line 169 of file instance_data.hpp.

References saga::adaptors::dynamic_instance_data< T >::is_valid().

template<typename T >
template<typename Cpi >
saga::adaptors::dynamic_instance_data< T >::dynamic_instance_data ( Cpi *  cpi_instance) [inline]
template<typename T >
saga::adaptors::dynamic_instance_data< T >::dynamic_instance_data ( ) [inline]

Definition at line 189 of file instance_data.hpp.

template<typename T >
saga::adaptors::dynamic_instance_data< T >::~dynamic_instance_data ( void  ) [inline]

Destructor: unlocks the object.

Definition at line 218 of file instance_data.hpp.


Member Function Documentation

template<typename T >
template<typename Cpi >
void saga::adaptors::dynamic_instance_data< T >::init_data ( Cpi *  proxy,
TR1::shared_ptr< instance_data_type d 
) [inline]
template<typename T >
template<typename Cpi >
void saga::adaptors::dynamic_instance_data< T >::release_data ( Cpi *  proxy) [inline]

Definition at line 209 of file instance_data.hpp.

template<typename T >
T* saga::adaptors::dynamic_instance_data< T >::operator-> ( ) const [inline]

Definition at line 224 of file instance_data.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines