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 uint128_t
commit(
const uint32_t incarnation =
122 CO_COMMIT_NEXT )
override;
125 CO_API
bool isDirty()
const override;
129 const uint64_t dirtyBits )
override;
133 const uint64_t dirtyBits )
override;
141 DIRTY_ADDED = Serializable::DIRTY_CUSTOM << 0,
142 DIRTY_REMOVED = Serializable::DIRTY_CUSTOM << 1,
143 DIRTY_CHANGED = Serializable::DIRTY_CUSTOM << 2,
144 DIRTY_CUSTOM = Serializable::DIRTY_CUSTOM << 3
148 detail::ObjectMap*
const _impl;
151 void _commitMasters(
const uint32_t incarnation );
154 #endif // CO_OBJECTMAP_H
CO_API void deserialize(DataIStream &is, const uint64_t dirtyBits) override
Worker for unpack() and applyInstanceData().
CO_API uint128_t commit(const uint32_t incarnation=CO_COMMIT_NEXT) override
Commit all registered objects.
CO_API bool unmap(Object *object)
Unmap an object from the object map.
Base class for distributed, inheritable objects.
ChangeType getChangeType() const override
CO_API bool register_(Object *object, const uint32_t type)
Add and register a new object as master instance to this object map.
ChangeType
Object change handling characteristics, see Programming Guide.
CO_API bool deregister(Object *object)
Remove and deregister an object from this object map.
virtual CO_API ~ObjectMap()
Destroy this object map.
A std::ostream-like interface for object serialization.
Object-oriented network library.
A distributed object registry.
CO_API bool isDirty() const override
Return if this object needs a commit.
Interface for entities which map and register objects.
The interface to create objects, used by ObjectMap.
CO_API void serialize(DataOStream &os, const uint64_t dirtyBits) override
Worker for pack() and getInstanceData().
CO_API void clear()
Deregister or unmap all registered and mapped objects.
CO_API void notifyAttached() override
Notify that this object has been registered or mapped.
A std::istream-like input data stream for binary data.
CO_API ObjectMap(ObjectHandler &handler, ObjectFactory &factory)
Construct a new object map.
CO_API Object * map(const uint128_t &identifier, Object *instance=0)
Map and return an object.