Collage  1.6.0
High-performance C++ library for developing object-oriented distributed applications.
co::Distributable< T, S, Args > Class Template Reference

Distributable Collage object for any servus::Serializable object. More...

#include <distributable.h>

+ Inheritance diagram for co::Distributable< T, S, Args >:
+ Collaboration diagram for co::Distributable< T, S, Args >:

Public Member Functions

 Distributable (Args...args)
 Construct a new distributable object. More...
 
 Distributable (const Distributable &rhs)
 Copy-construct a distributable object. More...
 
bool isDirty () const final
 
uint128_t commit (const uint32_t incarnation=CO_COMMIT_NEXT) final
 
void notifyChanged () override
 Call whenever the object has been modified so it can be distributed.
 

Detailed Description

template<class T, class S = Object, typename... Args>
class co::Distributable< T, S, Args >

Distributable Collage object for any servus::Serializable object.

Clients instantiate this object with a concrete Zerobuf object (or other servus::Serializable) using CRTP. The base class T needs to implement and call an abstract change notification method "virtual void notifyChanged() = 0;" (Zerobuf does this).

Definition at line 39 of file distributable.h.

Constructor & Destructor Documentation

template<class T , class S = Object, typename... Args>
co::Distributable< T, S, Args >::Distributable ( Args...  args)
inline

Construct a new distributable object.

Version
1.4

Definition at line 43 of file distributable.h.

template<class T , class S = Object, typename... Args>
co::Distributable< T, S, Args >::Distributable ( const Distributable< T, S, Args > &  rhs)
inline

Copy-construct a distributable object.

Version
1.4

Definition at line 46 of file distributable.h.

Member Function Documentation

template<class T , class S = Object, typename... Args>
uint128_t co::Distributable< T, S, Args >::commit ( const uint32_t  incarnation = CO_COMMIT_NEXT)
inlinefinal
See also
Object::commit()

Definition at line 55 of file distributable.h.

template<class T , class S = Object, typename... Args>
bool co::Distributable< T, S, Args >::isDirty ( ) const
inlinefinal
See also
Object::dirty()

Definition at line 52 of file distributable.h.


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