OperationCallBacks.h
// OperationCallBacks.h
//
// Author David Barrett-Lennard
// (C)opyright Cedanet Pty Ltd 2009
@import "cxObject.h"
@import "IObject.h"
@import "ReflectedVector.h"
@import "ReflectedSet.h"
namespace ceda
{
$adt CSpace;
struct IOperationCallBacks
{
virtual void SetThreadLocalStorage(CSpace* cspace) = 0;
virtual void OnBeginTransaction(CSpace* cspace) = 0;
virtual void OnEndTransaction(CSpace* cspace) = 0;
virtual void OnBeforeAssignValue(const AssignValue_params& params) = 0;
virtual void OnAfterAssignValueWithoutPrefs(const AssignValue_params& params) = 0;
virtual void OnAfterAssignValueWithPrefs(const AssignValue_params& params) = 0;
// Field is of type pref<T> or cref<T>
virtual void OnAssignPref(const AssignPref_params& params) = 0;
virtual void OnOffsetValue(const OffsetValue_params& params) = 0;
// Field is of type xvector<T>
virtual void OnInsertIntoVector(const InsertIntoVector_params& params) = 0;
virtual void OnEraseFromVector(const EraseFromVector_params& params) = 0;
// Field is of type xvector<pref>
virtual void OnInsertIntoMVector(const InsertIntoMVector_params& params) = 0;
virtual void OnEraseFromMVector(const EraseFromMVector_params& params) = 0;
// Field is of type xset<T>
virtual void OnSetInsert(const SetInsert_params& params) = 0;
virtual void OnSetDelete(const SetDelete_params& params) = 0;
// Field is of type xset<pref>
virtual void OnInsertIntoMSet(const InsertIntoMSet_params& params) = 0;
virtual void OnDeleteFromMSet(const DeleteFromMSet_params& params) = 0;
};
@api IOperationCallBacks* SetOperationCallBacks(CSpace* cspace, IOperationCallBacks* cb);
}