Depiction Engine For Unity 2023.0 (Alpha)
Loading...
Searching...
No Matches
DepictionEngine.Datasource Class Reference

Classes

struct  PersistenceOperationData
 Data used to create a persistence operation. More...
 

Public Types

enum  OperationType { Save , Synchronize , Delete , Load }
 The different types of datasource operation.

Save:
Save to datasource.

Synchronize:
Synchronize with datasource.

Delete:
Delete from datasource.

Load:
Load from datasource.
 

Public Member Functions

void Recycle ()
 
Datasource Initialize (JsonMonoBehaviour datasourceWrapper, InitializationContext initializingContext)
 
void InitializeLastFields ()
 
bool UpdateAllDelegates (bool isDisposing)
 
bool GetPersistent (SerializableGuid id, out IPersistent persistent)
 
bool IsPersistentOutOfSync (IPersistent persistent, bool autoDispose=false)
 
bool IsPersistentComponentPropertyOutOfSync (IPersistent persistent, IJson component, string name)
 
void SetPersistentAllSync (IPersistent persistent, IJson component=null)
 
bool SetPersistentAllOutOfSync (IPersistent persistent, IJson component=null, bool allowAutoDispose=false, bool autoDispose=true)
 
void IterateOverLoaders (Func< LoaderBase, bool > callback)
 
void IterateOverPersistents (Func< SerializableGuid, IPersistent, bool > callback)
 
bool AddPersistent (IPersistent persistent)
 
bool RemovePersistent (IPersistent persistent, DisposeContext disposeContext=DisposeContext.Programmatically_Pool)
 
bool RemovePersistent (SerializableGuid persistentId, DisposeContext disposeContext=DisposeContext.Programmatically_Pool)
 
bool SupportsOperationType (OperationType operationType)
 
void ReloadAll ()
 Create missing DepictionEngine.LoadScope(s), reload existing ones and dispose those that are no longer required.
 
void Load (DatasourceOperationBase datasourceOperation, Action< List< IPersistent >, DatasourceOperationBase.LoadingState > resultCallback, LoadScope loadScope)
 
void Save (DatasourceOperationBase datasourceOperation, Action< int > resultCallback)
 
void Synchronize (DatasourceOperationBase datasourceOperation, Action< int > resultCallback)
 
void Delete (DatasourceOperationBase datasourceOperation, Action< int > resultCallback)
 
void OnDispose (DisposeContext disposeContext)
 
void IterateOverPersistents (Func< SerializableGuid, IPersistent, bool > callback)
 
bool AddPersistent (IPersistent persistent)
 
bool RemovePersistent (IPersistent persistent, DisposeContext disposeContext=DisposeContext.Programmatically_Pool)
 
bool RemovePersistent (SerializableGuid persistentId, DisposeContext disposeContext=DisposeContext.Programmatically_Pool)
 

Static Public Member Functions

static void StartAllowAutoDisposeOnOutOfSynchProperty ()
 
static void EndAllowAutoDisposeOnOutOfSynchProperty ()
 
static void ResetAllowAutoDispose ()
 
static bool EnablePersistenceOperations ()
 

Public Attributes

Action< OperationType, IPersistent, Action > PersistenceOperationEvent
 Dispatched when a DepictionEngine.IPersistent.PersistenceSaveOperationEvent, DepictionEngine.IPersistent.PersistenceSynchronizeOperationEvent or DepictionEngine.IPersistent.PersistenceDeleteOperationEvent is dispatched by the encapsulated DepictionEngine.IPersistent.
 

Properties

bool supportsSave [get, set]
 
bool supportsSynchronize [get, set]
 
bool supportsDelete [get, set]
 
int persistentCount [get]
 

Member Function Documentation

◆ AddPersistent()

bool DepictionEngine.Datasource.AddPersistent ( IPersistent  persistent)

◆ IterateOverPersistents()

void DepictionEngine.Datasource.IterateOverPersistents ( Func< SerializableGuid, IPersistent, bool >  callback)

◆ RemovePersistent() [1/2]

bool DepictionEngine.Datasource.RemovePersistent ( IPersistent  persistent,
DisposeContext  disposeContext = DisposeContext::Programmatically_Pool 
)

◆ RemovePersistent() [2/2]

bool DepictionEngine.Datasource.RemovePersistent ( SerializableGuid  persistentId,
DisposeContext  disposeContext = DisposeContext::Programmatically_Pool 
)

The documentation for this class was generated from the following file: