Doloro GDK 22 .1.0 Beta
by Tauri Interactive
Doloro.DataManagement.AssetPropertiesSystem.AssetPropertiesCollection Class Reference

Detailed Description

A collection of custom properties related to some asset.

Inheritance diagram for Doloro.DataManagement.AssetPropertiesSystem.AssetPropertiesCollection:
Collaboration diagram for Doloro.DataManagement.AssetPropertiesSystem.AssetPropertiesCollection:

Classes

class  ProperiesDomain
 Implements API for the layer relayed features. More...
 

Public Member Functions

void Add (AssetProperty property)
 Adds property to the register. More...
 
void Clear ()
 Clears entire register.
 
bool Contains (string propertyPath)
 Checks is the property by the path exists. More...
 
bool Contains (AssetProperty property)
 Checks is the property by the path exists. More...
 
void CopyTo (AssetProperty[] array, int arrayIndex)
 Copying properties to array. More...
 
IEnumerator< AssetPropertyGetEnumerator ()
 Returns enumerator of entire asset properties. More...
 
IEnumerator< AssetPropertyGetDomainEnumerator (ProperiesDomain domain)
 Returns enumerator of properties placed to the certain domain layer. More...
 
bool Remove (string propertyPath)
 Removes property from the register. More...
 
bool Remove (AssetProperty property)
 Removes property from the register. More...
 
ProperiesDomain FindDomain (string domainPath)
 Looking for domain by the path. More...
 
ProperiesDomain FindPropertyDomain (string propertyPath, out string propertyKey)
 Looking for layer by the full property path. More...
 
void SetDirty ()
 Bakes runtime data from the Register property to the serializable binaryRegister. More...
 
bool TryReadFromBinary (byte[] data)
 Attempts to read the binary as ProperiesDomain. Applies result to Register in case is operation has been successful. More...
 
void ReadFromBinary (byte[] data)
 Drops current Register and loads new one from the binary data. More...
 
byte[] ToBinary ()
 Converts Register to binary view. More...
 
object Clone ()
 Creates new game object with cloned properties. More...
 

Properties

int Count [get]
 Elements in register's hierarchy.
 
bool IsReadOnly [get]
 Always false.
 
ProperiesDomain Register [get, set]
 Ground properties layer.
 
AssetProperty this[string path] [get]
 Provides access to property by path. More...
 

Events

Action< AssetPropertyPropertyAdded
 Occurs when new property added.
 
Action< AssetPropertyPropertyRemoved
 Occurs when property removed.
 

Member Function Documentation

◆ Add()

void Doloro.DataManagement.AssetPropertiesSystem.AssetPropertiesCollection.Add ( AssetProperty  property)

Adds property to the register.

Parameters
propertyProperty to add.
Exceptions
ArgumentNullExceptionproperty is null.
ArgumentExceptionproperty.FullPath is null of white space.
EntryAlreadyExistsExceptionOccurs when you try to add property to the path that already exist or can't be expanded.

◆ Clone()

object Doloro.DataManagement.AssetPropertiesSystem.AssetPropertiesCollection.Clone ( )

Creates new game object with cloned properties.

Returns

◆ Contains() [1/2]

bool Doloro.DataManagement.AssetPropertiesSystem.AssetPropertiesCollection.Contains ( AssetProperty  property)

Checks is the property by the path exists.

Parameters
propertyProperty instance to check.
Returns
Result of search.

◆ Contains() [2/2]

bool Doloro.DataManagement.AssetPropertiesSystem.AssetPropertiesCollection.Contains ( string  propertyPath)

Checks is the property by the path exists.

Parameters
propertyPathFull path of the a property.
Returns
Result of search.

Implements Doloro.DataManagement.AssetPropertiesSystem.IPropertiesProvider.

◆ CopyTo()

void Doloro.DataManagement.AssetPropertiesSystem.AssetPropertiesCollection.CopyTo ( AssetProperty[]  array,
int  arrayIndex 
)

Copying properties to array.

Parameters
arrayDestination array.
arrayIndexStart index at the destination array.

◆ FindDomain()

ProperiesDomain Doloro.DataManagement.AssetPropertiesSystem.AssetPropertiesCollection.FindDomain ( string  domainPath)

Looking for domain by the path.

Parameters
domainPathDomains splitted with the dot char.
Returns
Domain in case if found. Null otherwise.

◆ FindPropertyDomain()

ProperiesDomain Doloro.DataManagement.AssetPropertiesSystem.AssetPropertiesCollection.FindPropertyDomain ( string  propertyPath,
out string  propertyKey 
)

Looking for layer by the full property path.

Parameters
propertyPathFull property path.
propertyKeyProperty key detected from the path.
Returns
Layer if exist. Null if not found.

◆ GetDomainEnumerator()

IEnumerator< AssetProperty > Doloro.DataManagement.AssetPropertiesSystem.AssetPropertiesCollection.GetDomainEnumerator ( ProperiesDomain  domain)

Returns enumerator of properties placed to the certain domain layer.

Parameters
domainDomain to properties search.
Returns
Properties enumerator.

◆ GetEnumerator()

IEnumerator< AssetProperty > Doloro.DataManagement.AssetPropertiesSystem.AssetPropertiesCollection.GetEnumerator ( )

Returns enumerator of entire asset properties.

Returns
Properties enumerator.

◆ ReadFromBinary()

void Doloro.DataManagement.AssetPropertiesSystem.AssetPropertiesCollection.ReadFromBinary ( byte[]  data)

Drops current Register and loads new one from the binary data.

Parameters
dataBinary source generated with the SetDirty handler.

Implements Doloro.DataManagement.Serialization.IBinaryDataProvider.

◆ Remove() [1/2]

bool Doloro.DataManagement.AssetPropertiesSystem.AssetPropertiesCollection.Remove ( AssetProperty  property)

Removes property from the register.

Parameters
propertyProperty to remove.
Exceptions
ArgumentNullExceptionproperty is null.
ArgumentExceptionproperty.FullPath is null of white space.
EntryAlreadyExistsExceptionOccurs when you try to add property to the path that already exist or can't be expanded.

◆ Remove() [2/2]

bool Doloro.DataManagement.AssetPropertiesSystem.AssetPropertiesCollection.Remove ( string  propertyPath)

Removes property from the register.

Parameters
propertyPathFull path to property.
Exceptions
ArgumentExceptionproperty.FullPath is null of white space.
EntryAlreadyExistsExceptionOccurs when you try to add property to the path that already exist or can't be expanded.

◆ SetDirty()

void Doloro.DataManagement.AssetPropertiesSystem.AssetPropertiesCollection.SetDirty ( )

Bakes runtime data from the Register property to the serializable binaryRegister.

Should be called each time when Register has been modified with editor tool.

◆ ToBinary()

byte[] Doloro.DataManagement.AssetPropertiesSystem.AssetPropertiesCollection.ToBinary ( )

Converts Register to binary view.

Returns

Implements Doloro.DataManagement.Serialization.IBinaryDataProvider.

◆ TryReadFromBinary()

bool Doloro.DataManagement.AssetPropertiesSystem.AssetPropertiesCollection.TryReadFromBinary ( byte[]  data)

Attempts to read the binary as ProperiesDomain. Applies result to Register in case is operation has been successful.

Parameters
dataBinary data to read.
Returns
true in case if data has been restored to objects without exceptions.

Implements Doloro.DataManagement.Serialization.IBinaryDataProvider.

Property Documentation

◆ this[string path]

AssetProperty Doloro.DataManagement.AssetPropertiesSystem.AssetPropertiesCollection.this[string path]
get

Provides access to property by path.

Parameters
pathPath to property in internal hierarchy.
Returns
Reference to property. Null if not found.

Implements Doloro.DataManagement.AssetPropertiesSystem.IPropertiesProvider.


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