21 #ifndef CO_OBJECTMAP_H
22 #define CO_OBJECTMAP_H
24 #include <co/serializable.h>
28 namespace detail {
class ObjectMap; }
102 CO_API
Object*
map(
const uint128_t& identifier,
Object* instance = 0 );
121 CO_API
virtual uint128_t
commit(
const uint32_t incarnation =
125 CO_API
virtual bool isDirty()
const;
139 DIRTY_ADDED = Serializable::DIRTY_CUSTOM << 0,
140 DIRTY_REMOVED = Serializable::DIRTY_CUSTOM << 1,
141 DIRTY_CHANGED = Serializable::DIRTY_CUSTOM << 2,
142 DIRTY_CUSTOM = Serializable::DIRTY_CUSTOM << 3
146 detail::ObjectMap*
const _impl;
149 void _commitMasters(
const uint32_t incarnation );
152 #endif // CO_OBJECTMAP_H
Interface for entities which map and register objects.
virtual CO_API void deserialize(DataIStream &is, const uint64_t dirtyBits)
Worker for unpack() and applyInstanceData().
Base class for distributed, inheritable objects.
CO_API void clear()
Deregister or unmap all registered and mapped objects.
A distributed object registry.
virtual CO_API void serialize(DataOStream &os, const uint64_t dirtyBits)
Worker for pack() and getInstanceData().
CO_API Object * map(const uint128_t &identifier, Object *instance=0)
Map and return an object.
ChangeType
Object change handling characteristics, see Programming Guide.
virtual CO_API bool isDirty() const
CO_API bool unmap(Object *object)
Unmap an object from the object map.
CO_API bool register_(Object *object, const uint32_t type)
Add and register a new object as master instance to this object map.
A std::istream-like input data stream for binary data.
The interface to create objects, used by ObjectMap.
virtual CO_API void notifyAttached()
A std::ostream-like interface for object serialization.
virtual CO_API ~ObjectMap()
Destroy this object map.
CO_API ObjectMap(ObjectHandler &handler, ObjectFactory &factory)
Construct a new object map.
virtual CO_API uint128_t commit(const uint32_t incarnation=CO_COMMIT_NEXT)
Commit all registered objects.
virtual ChangeType getChangeType() const
CO_API bool deregister(Object *object)
Remove and deregister an object from this object map.