Collage  1.7.0
High-performance C++ library for developing object-oriented distributed applications.
co::ObjectVersion Struct Reference

A helper struct bundling an object identifier and version. More...

#include <objectVersion.h>

+ Collaboration diagram for co::ObjectVersion:

Public Member Functions

CO_API ObjectVersion ()
 Construct a new, zero-initialized object version. More...
 
CO_API ObjectVersion (const uint128_t &identifier, const uint128_t &version)
 Construct a new object version. More...
 
CO_API ObjectVersion (const Object *object)
 Construct a new object version. More...
 
CO_API ObjectVersion (const Object &object)
 Construct a new object version. More...
 
template<class R >
 ObjectVersion (lunchbox::RefPtr< R > object)
 Construct a new object version. More...
 
CO_API ObjectVersionoperator= (const Object *object)
 Assign a new identifier and version. More...
 
bool operator== (const ObjectVersion &value) const
 
bool operator!= (const ObjectVersion &value) const
 
bool operator< (const ObjectVersion &rhs) const
 <
 
bool operator> (const ObjectVersion &rhs) const
 <
 
 operator bool () const
 
bool operator! () const
 

Public Attributes

uint128_t identifier
 the object identifier
 
uint128_t version
 the object version
 

Detailed Description

A helper struct bundling an object identifier and version.

Primarily used for serialization. The struct either contains the object's identifier and version (if it is registered or mapped), 0 and VERSION_NONE if it is unmapped or if no object was given.

Definition at line 46 of file objectVersion.h.

Constructor & Destructor Documentation

CO_API co::ObjectVersion::ObjectVersion ( )

Construct a new, zero-initialized object version.

Version
1.0
CO_API co::ObjectVersion::ObjectVersion ( const uint128_t &  identifier,
const uint128_t &  version 
)

Construct a new object version.

Version
1.0
CO_API co::ObjectVersion::ObjectVersion ( const Object object)
explicit

Construct a new object version.

Version
1.0
CO_API co::ObjectVersion::ObjectVersion ( const Object object)
explicit

Construct a new object version.

Version
1.2
template<class R >
co::ObjectVersion::ObjectVersion ( lunchbox::RefPtr< R >  object)
inlineexplicit

Construct a new object version.

Version
1.0

Definition at line 62 of file objectVersion.h.

References operator=().

+ Here is the call graph for this function:

Member Function Documentation

co::ObjectVersion::operator bool ( ) const
inlineexplicit
Returns
true if the identifier and version are set.

Definition at line 95 of file objectVersion.h.

References co::VERSION_NONE().

+ Here is the call graph for this function:

bool co::ObjectVersion::operator! ( ) const
inline
Returns
true if the identifier or version are not set.

Definition at line 101 of file objectVersion.h.

References co::VERSION_NONE().

+ Here is the call graph for this function:

bool co::ObjectVersion::operator!= ( const ObjectVersion value) const
inline
Returns
true if both structs have different values.
Version
1.0

Definition at line 77 of file objectVersion.h.

References identifier, and version.

CO_API ObjectVersion& co::ObjectVersion::operator= ( const Object object)

Assign a new identifier and version.

Version
1.0

Referenced by ObjectVersion().

+ Here is the caller graph for this function:

bool co::ObjectVersion::operator== ( const ObjectVersion value) const
inline
Returns
true if both structs contain the same values.
Version
1.0

Definition at line 71 of file objectVersion.h.

References identifier, and version.


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