Drag[en]gine Script Module DragonScript  1.21
Dragengine.LoadSave.Persistency Class Reference

Persistency support for complex objects. More...

Inheritance diagram for Dragengine.LoadSave.Persistency:

Public Member Functions

void addFactory (String name, PersistencyFactory factory)
 Add persistency factory. More...
 
Console getConsole ()
 Console for logging puspose. More...
 
bool getDebugEnableCanaryValue ()
 Enable file consistency debuging. More...
 
PersistencyFactory getFactoryNamed (String name)
 Named factory or null if absent. More...
 
Persistency new (Console console)
 Create persistency. More...
 
void removeAllFactories ()
 Remove all factories. More...
 
void removeFactory (String name)
 Remove factory. More...
 
void setDebugEnableCanaryValue (bool enable)
 Set if file consistency debugingis enabled. More...
 

Static Public Attributes

static final String debugCanaryValue = "|=> Canary Value <=|"
 Canary value if debugging is enabled. More...
 
static final String debugCanaryValue_BEGIN = "|=> Begin Canary Value <=|"
 Begin canary value if debugging is enabled. More...
 
static final String debugCanaryValue_END = "|=> End Canary Value <=|"
 End canary value if debugging is enabled. More...
 

Detailed Description

Persistency support for complex objects.

Provides support for writing and reading complex objects using file readers and writers. Stores a list of PersistencyFactory implementors providing support to read an object type from file. Classes implementing Persistable can be read and written using this persistency environment. Use PersistencyEnvironment to carry useful information required to properly restore complex objects.

Member Function Documentation

◆ addFactory()

void Dragengine.LoadSave.Persistency.addFactory ( String  name,
PersistencyFactory  factory 
)

Add persistency factory.

Exceptions
EInvalidParamfactory is null.
EInvalidParamfactory with name is present.

◆ getConsole()

Console Dragengine.LoadSave.Persistency.getConsole ( )

Console for logging puspose.

◆ getDebugEnableCanaryValue()

bool Dragengine.LoadSave.Persistency.getDebugEnableCanaryValue ( )

Enable file consistency debuging.

Elements and stubs write to file writes a canary value before and after written data verifying the integrity during reading. Intended for debug use only.

◆ getFactoryNamed()

PersistencyFactory Dragengine.LoadSave.Persistency.getFactoryNamed ( String  name)

Named factory or null if absent.

◆ new()

Persistency Dragengine.LoadSave.Persistency.new ( Console  console)

Create persistency.

◆ removeAllFactories()

void Dragengine.LoadSave.Persistency.removeAllFactories ( )

Remove all factories.

◆ removeFactory()

void Dragengine.LoadSave.Persistency.removeFactory ( String  name)

Remove factory.

Exceptions
EInvalidParamfactory with name is absent.

◆ setDebugEnableCanaryValue()

void Dragengine.LoadSave.Persistency.setDebugEnableCanaryValue ( bool  enable)

Set if file consistency debugingis enabled.

Elements and stubs write to file writes a canary value before and after written data verifying the integrity during reading. Intended for debug use only.

Member Data Documentation

◆ debugCanaryValue

final String Dragengine.LoadSave.Persistency.debugCanaryValue = "|=> Canary Value <=|"
static

Canary value if debugging is enabled.

python: ''.join([chr(32+int(random.random()*(126-32))) for x in range(16)]).

◆ debugCanaryValue_BEGIN

final String Dragengine.LoadSave.Persistency.debugCanaryValue_BEGIN = "|=> Begin Canary Value <=|"
static

Begin canary value if debugging is enabled.

◆ debugCanaryValue_END

final String Dragengine.LoadSave.Persistency.debugCanaryValue_END = "|=> End Canary Value <=|"
static

End canary value if debugging is enabled.


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