21 #ifndef CO_SERIALIZABLE_H
22 #define CO_SERIALIZABLE_H
24 #include <co/object.h>
28 namespace detail {
class Serializable; }
45 CO_API
bool isDirty()
const override;
48 CO_API
virtual bool isDirty(
const uint64_t dirtyBits )
const;
51 CO_API uint128_t
commit(
const uint32_t incarnation = CO_COMMIT_NEXT )
106 DIRTY_ALL = 0xFFFFFFFFFFFFFFFFull
110 CO_API
virtual void setDirty(
const uint64_t bits );
113 CO_API
virtual void unsetDirty(
const uint64_t bits );
130 detail::Serializable*
const _impl;
131 friend class detail::Serializable;
134 #endif // CO_SERIALIZABLE_H
CO_API void pack(co::DataOStream &os) final
Serialize the modifications since the last call to commit().
Base class for distributed, inheritable objects.
CO_API uint64_t getDirty() const
CO_API void notifyAttached() override
virtual CO_API ~Serializable()
Destruct the serializable.
CO_API uint128_t commit(const uint32_t incarnation=CO_COMMIT_NEXT) override
virtual void deserialize(co::DataIStream &, const uint64_t)
Worker for unpack() and applyInstanceData().
virtual void serialize(co::DataOStream &, const uint64_t)
Worker for pack() and getInstanceData().
Serializable & operator=(const Serializable &from)
NOP assignment operator.
CO_API void applyInstanceData(co::DataIStream &is) final
Deserialize the instance data.
CO_API Serializable()
Construct a new Serializable.
ChangeType
Object change handling characteristics, see Programming Guide.
void getInstanceData(co::DataOStream &os) final
Serialize all instance information of this distributed object.
A std::ostream-like interface for object serialization.
DirtyBits
The changed parts of the serializable since the last pack().
ChangeType getChangeType() const override
virtual CO_API void unsetDirty(const uint64_t bits)
Remove dirty flags to clear data from distribution.
virtual CO_API void setDirty(const uint64_t bits)
Add dirty flags to mark data for distribution.
Object & operator=(const Object &)
NOP assignment operator.
A std::istream-like input data stream for binary data.
CO_API void unpack(co::DataIStream &is) final
Deserialize a change.
CO_API bool isDirty() const override