All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Pages
Public Types | Public Member Functions | List of all members
paal::data_structures::object_with_copy< T > Class Template Reference

keeps object and its copy. Invoke all the member functions on both: object and its copy. If you want to invoke member function on both objects, you run the object_with_copy::invoke. If you want to run member function only on the copy you run object_with_copy::invoke_on_copy. More...

#include <object_with_copy.hpp>

Public Types

typedef T ObjectType
 

Public Member Functions

 object_with_copy (T t)
 constructor More...
 
template<typename F , typename... Args>
std::result_of< F(T *, Args...)>
::type 
invoke (F f, Args...args)
 invokes member function on object and copy More...
 
template<typename F , typename... Args>
std::result_of< F(T *, Args...)>
::type 
invoke_on_copy (F f, Args...args) const
 invokes member function on copy More...
 
const T * operator-> () const
 easier way for invoking const member functions More...
 
T & get_obj ()
 getter for inner object More...
 
const T & get_obj () const
 getter for inner object More...
 

Detailed Description

template<typename T>
class paal::data_structures::object_with_copy< T >

keeps object and its copy. Invoke all the member functions on both: object and its copy. If you want to invoke member function on both objects, you run the object_with_copy::invoke. If you want to run member function only on the copy you run object_with_copy::invoke_on_copy.

Template Parameters
Ttype of the contain object

Definition at line 33 of file object_with_copy.hpp.

Constructor & Destructor Documentation

template<typename T >
paal::data_structures::object_with_copy< T >::object_with_copy ( t)
inline

constructor

Parameters
t

Definition at line 42 of file object_with_copy.hpp.

Member Function Documentation

template<typename T >
T& paal::data_structures::object_with_copy< T >::get_obj ( )
inline

getter for inner object

Returns
member object

Definition at line 93 of file object_with_copy.hpp.

template<typename T >
const T& paal::data_structures::object_with_copy< T >::get_obj ( ) const
inline

getter for inner object

Returns
member object

Definition at line 100 of file object_with_copy.hpp.

template<typename T >
template<typename F , typename... Args>
std::result_of<F(T*, Args...)>::type paal::data_structures::object_with_copy< T >::invoke ( F  f,
Args...  args 
)
inline

invokes member function on object and copy

Parameters
f- pointer to member function of T
args- arguments for f
Template Parameters
Ftype of pointer to member function
Args...types of member function arguments
Returns
the same as f

Definition at line 59 of file object_with_copy.hpp.

template<typename T >
template<typename F , typename... Args>
std::result_of<F(T*, Args...)>::type paal::data_structures::object_with_copy< T >::invoke_on_copy ( F  f,
Args...  args 
) const
inline

invokes member function on copy

Parameters
f- pointer to member function of T
args- arguments for f
Template Parameters
Ftype of pointer to member function
Args...types of member function arguments
Returns
the same as f

Definition at line 77 of file object_with_copy.hpp.

template<typename T >
const T* paal::data_structures::object_with_copy< T >::operator-> ( ) const
inline

easier way for invoking const member functions

Returns
T*

Definition at line 86 of file object_with_copy.hpp.


The documentation for this class was generated from the following file: