Empeld
Empeld plugin documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
pluginbase.Objects.Saves.ISavedGame Interface Reference

Dependency for registering objects for persistence with saved games More...

Public Member Functions

string DataSubPath (string subpath)
 Create a subpath within the saved directory folder. Unpreferred method More...
 
GetPersistentModel< T > (string name, Func< T > newModel)
 Gets a persistent model, populating it if possible, using a custom constructor More...
 
GetPersistentModel< T > (string name)
 Gets a persistent model, populating it if possible More...
 
bool RegisterObjectForPersistence (string name, object obj)
 Registers an object for persistence, and populate if possible Uses /// More...
 
bool RegisterObjectForPersistence (string name, IPersistable persistable)
 Registers an IPersistable object for persistence More...
 
bool DeletePersistFile (string name, Type objType)
 Deletes a persist file. More...
 

Detailed Description

Dependency for registering objects for persistence with saved games

Attribute: Injectable

Member Function Documentation

string pluginbase.Objects.Saves.ISavedGame.DataSubPath ( string  subpath)

Create a subpath within the saved directory folder. Unpreferred method

Returns
The sub path.
Parameters
subpathSubpath.
bool pluginbase.Objects.Saves.ISavedGame.DeletePersistFile ( string  name,
Type  objType 
)

Deletes a persist file.

Returns
Whether a delete occurred
Parameters
nameIf set to true name.
objTypeIf set to true object type.
T pluginbase.Objects.Saves.ISavedGame.GetPersistentModel< T > ( string  name,
Func< T >  newModel 
)

Gets a persistent model, populating it if possible, using a custom constructor

Returns
The persistent model.
Parameters
nameName.
newModelNew model.
Template Parameters
TThe 1st type parameter.
Type Constraints
T :class 
T pluginbase.Objects.Saves.ISavedGame.GetPersistentModel< T > ( string  name)

Gets a persistent model, populating it if possible

Returns
The persistent model.
Parameters
nameName.
Template Parameters
TThe 1st type parameter.
Type Constraints
T :class 
T :new() 
bool pluginbase.Objects.Saves.ISavedGame.RegisterObjectForPersistence ( string  name,
object  obj 
)

Registers an object for persistence, and populate if possible Uses ///

Attribute: Persist

tag

Returns
True if the object was persisted from a file (otherwise false)
Parameters
nameIf set to true name.
objIf set to true object.
bool pluginbase.Objects.Saves.ISavedGame.RegisterObjectForPersistence ( string  name,
IPersistable  persistable 
)

Registers an IPersistable object for persistence

Returns
true, if object for persistence was registered, false otherwise.
Parameters
nameName.
persistablePersistable.

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