OperationNotifications.h
// OperationNotifications.h
//
// Author David Barrett-Lennard
// (C)opyright Cedanet Pty Ltd 2010
@import "cxObject.h"
@import "IObject.h"
@import "FieldPath.h"
namespace ceda
{
$typedef+ void* FieldAddress;
$interface+ IVectorFieldNotifications
{
void OnVectorInsert(bool localOp, ptr<IObject> obj, const FieldPath& path, FieldAddress fa, ssize_t i1, ssize_t i2);
void OnVectorErase(bool localOp, ptr<IObject> obj, const FieldPath& path, FieldAddress fa, ssize_t i1, ssize_t i2);
};
$interface+ IAssignableFieldNotifications
{
void OnAssign(bool localOp, ptr<IObject> obj, const FieldPath& path, FieldAddress fa);
};
$interface+ IOffsetableFieldNotifications
{
void OnOffset(bool localOp, ptr<IObject> obj, const FieldPath& path, FieldAddress fa, int64 offset);
};
$interface+ ISetFieldNotifications
{
void OnSetInsert(bool localOp, ptr<IObject> obj, const FieldPath& path, FieldAddress fa);
void OnSetDelete(bool localOp, ptr<IObject> obj, const FieldPath& path, FieldAddress fa);
};
/*
The following register/unregister functions assume a CSpace has been set in thread local storage
(if not they trip an assertion in debug builds).
The registries are assumed to be protected by the CSpace mutex. Therefore these functions should
only be called with a lock on the CSpace.
*/
@api void RegisterForVectorFieldNotifications(ptr<IVectorFieldNotifications> vfn);
@api void UnregisterForVectorFieldNotifications(ptr<IVectorFieldNotifications> vfn);
@api void RegisterForAssignableFieldNotifications(ptr<IAssignableFieldNotifications> afn);
@api void UnregisterForAssignableFieldNotifications(ptr<IAssignableFieldNotifications> afn);
@api void RegisterForOffsetableFieldNotifications(ptr<IOffsetableFieldNotifications> ofn);
@api void UnregisterForOffsetableFieldNotifications(ptr<IOffsetableFieldNotifications> ofn);
@api void RegisterForSetFieldNotifications(ptr<ISetFieldNotifications> sfn);
@api void UnregisterForSetFieldNotifications(ptr<ISetFieldNotifications> sfn);
} // namespace ceda