Doloro GDK 22 .1.0 Beta
by Tauri Interactive
Doloro.InvetorySystem.StoragesDatabase.ItemContainer Class Reference

Detailed Description

Implements conception of the storage entry.

Defined resource signature change not allowed to prevent data fraud.

Inheritance diagram for Doloro.InvetorySystem.StoragesDatabase.ItemContainer:
Collaboration diagram for Doloro.InvetorySystem.StoragesDatabase.ItemContainer:

Public Member Functions

 ItemContainer (string itemReourceBundle, string itemKey)
 Creates database entry for the certain item key. More...
 
 ItemContainer (string itemReourceBundle, string itemKey, int count)
 Creates database entry for the certain item key. More...
 
 ItemContainer (Item resource)
 Creates container that describes Item resource. Collects entire AItemFeature states provided with the Item.features property. More...
 
 ItemContainer (Item resource, int count)
 Creates container that describes Item resource. More...
 
 ItemContainer (SerializationInfo info, StreamingContext context)
 Allows to binary serializer instantiate the object from binary. More...
 
void SaveSessionData ()
 Saves entire runtime data from instantiated Resource to the container.
 
void SaveAssetProperties ()
 Saving data from the Resource located Item.properties to the container.
 
void LoadAssetProperties ()
 Loads stored binary data to the Resource instance's Item.properties.
 
override int GetHashCode ()
 Returns related to the item's signature. More...
 
override string ToString ()
 Returns resource signature along with placed resource count. More...
 
void Dispose ()
 Releases on-scene resources related to the container.
 
void SetFeatureState (FeatureType prop)
 Collects session data from the property and stores it in container. More...
 
void SetFeatureState (Type propType, byte[] data)
 Collects session data from the property and stores it in container. More...
 
void SetFeatureState (string propFullType, byte[] data)
 Collects session data from the property and stores it in container. More...
 
bool ContainsFeatureState (FeatureType prop)
 Checks is the container contains binary data related to the property. More...
 
bool ContainsFeatureState (Type prop)
 Checks is the container contains binary data related to the property. More...
 
bool ContainsFeatureState (string prop)
 Checks is the container contains binary data related to the property. More...
 
bool DropFeatureState (Type prop)
 Drops property related data. More...
 
bool DropFeatureState (string prop)
 Drops property data. More...
 

Protected Member Functions

override void OnModified ()
 Should be called any time when some important runtime property is changed.
 
virtual void Dispose (bool disposing)
 

Properties

static Transform ItemsHolder [get]
 On scene game object that holds entire instantiated Item instance with connected ItemContainer sources.
 
Item Resource [get]
 Gets an Item resource declared with the container by the Bundle.Key properties. Returns null in case if DynamicResource has not been found.
 
bool IsResourceInstantiated [get]
 Checks is that container has Resource instance that may suppose that Item.properties and AFeaturesExtendingResource<FeatureType>.features has been modified and requires session data save.
 
string Bundle [get, set]
 Bundle key of the item related to the item resource defined into the entry.
 
string Key [get, set]
 Resource key of the item related to the entry.
 
int Count [get, set]
 Count of items into the entry stack.
 
int Available [get]
 How many items available for transaction.
 
int Reserved [get, set]
 How many items reserved by transaction orders. More...
 
Guid StorageId = Guid.Empty [get, set]
 Id of parental storage container.
 
FeatureContainer this[Type type] [get]
 Returns FeatureContainer by type in string format in case if it exists. More...
 
FeatureContainer this[string type] [get]
 Returns FeatureContainer by type in string format in case if it exists. More...
 
Dictionary< string, FeatureContainerfeatures [get]
 Collection of FeatureType related cross-session data in binary format.
 

Constructor & Destructor Documentation

◆ ItemContainer() [1/5]

Doloro.InvetorySystem.StoragesDatabase.ItemContainer.ItemContainer ( string  itemReourceBundle,
string  itemKey 
)

Creates database entry for the certain item key.

Parameters
itemReourceBundleResource bundle key related to the item.
itemKeyUnique key related to the item stored at the entry entity.

◆ ItemContainer() [2/5]

Doloro.InvetorySystem.StoragesDatabase.ItemContainer.ItemContainer ( string  itemReourceBundle,
string  itemKey,
int  count 
)

Creates database entry for the certain item key.

Parameters
itemReourceBundleResource bundle key related to the item.
itemKeyUnique key related to the item stored at the entry entity.
countCount of resource inside the container.

◆ ItemContainer() [3/5]

Doloro.InvetorySystem.StoragesDatabase.ItemContainer.ItemContainer ( Item  resource)

Creates container that describes Item resource. Collects entire AItemFeature states provided with the Item.features property.

Parameters
resourceSource prefab resource that will be represented with container.

◆ ItemContainer() [4/5]

Doloro.InvetorySystem.StoragesDatabase.ItemContainer.ItemContainer ( Item  resource,
int  count 
)

Creates container that describes Item resource.

Parameters
resourceSource prefab resource that will be represented with container.
countCount of resource inside the container.

◆ ItemContainer() [5/5]

Doloro.InvetorySystem.StoragesDatabase.ItemContainer.ItemContainer ( SerializationInfo  info,
StreamingContext  context 
)

Allows to binary serializer instantiate the object from binary.

Parameters
info
context

Member Function Documentation

◆ ContainsFeatureState() [1/3]

bool Doloro.InvetorySystem.StoragesDatabase.AFeaturesHolderContainer< FeatureType, ContainerType >.ContainsFeatureState ( FeatureType  prop)
inherited

Checks is the container contains binary data related to the property.

Parameters
propProperty to check.
Returns
true in case if there is stored property data.

◆ ContainsFeatureState() [2/3]

bool Doloro.InvetorySystem.StoragesDatabase.AFeaturesHolderContainer< FeatureType, ContainerType >.ContainsFeatureState ( string  prop)
inherited

Checks is the container contains binary data related to the property.

Parameters
propProperty to check.
Returns
true in case if there is stored property data.

◆ ContainsFeatureState() [3/3]

bool Doloro.InvetorySystem.StoragesDatabase.AFeaturesHolderContainer< FeatureType, ContainerType >.ContainsFeatureState ( Type  prop)
inherited

Checks is the container contains binary data related to the property.

Parameters
propProperty to check.
Returns
true in case if there is stored property data.

◆ DropFeatureState() [1/2]

bool Doloro.InvetorySystem.StoragesDatabase.AFeaturesHolderContainer< FeatureType, ContainerType >.DropFeatureState ( string  prop)
inherited

Drops property data.

Parameters
propProperty name to release.
Returns
Is the property container has been found and released.

◆ DropFeatureState() [2/2]

bool Doloro.InvetorySystem.StoragesDatabase.AFeaturesHolderContainer< FeatureType, ContainerType >.DropFeatureState ( Type  prop)
inherited

Drops property related data.

Parameters
propType of the FeatureType to data release.
Returns
Is the property container has been found and released.

◆ GetHashCode()

override int Doloro.InvetorySystem.StoragesDatabase.ItemContainer.GetHashCode ( )

Returns related to the item's signature.

Returns
Literally (Bundle + "." ?? "" + Key).GetHashCode()

◆ SetFeatureState() [1/3]

void Doloro.InvetorySystem.StoragesDatabase.AFeaturesHolderContainer< FeatureType, ContainerType >.SetFeatureState ( FeatureType  prop)
inherited

Collects session data from the property and stores it in container.

Parameters
propProperty to data save.

◆ SetFeatureState() [2/3]

void Doloro.InvetorySystem.StoragesDatabase.AFeaturesHolderContainer< FeatureType, ContainerType >.SetFeatureState ( string  propFullType,
byte[]  data 
)
inherited

Collects session data from the property and stores it in container.

Parameters
propFullTypeFull name of property's type related to the data.
dataBinary data related to the property.

◆ SetFeatureState() [3/3]

void Doloro.InvetorySystem.StoragesDatabase.AFeaturesHolderContainer< FeatureType, ContainerType >.SetFeatureState ( Type  propType,
byte[]  data 
)
inherited

Collects session data from the property and stores it in container.

Parameters
propTypeProperty type related to the data.
dataBinary data related to the property.

◆ ToString()

override string Doloro.InvetorySystem.StoragesDatabase.ItemContainer.ToString ( )

Returns resource signature along with placed resource count.

Returns
Log-like item description.

Property Documentation

◆ Reserved

int Doloro.InvetorySystem.StoragesDatabase.ItemContainer.Reserved
getset

How many items reserved by transaction orders.

Exists only at runtime and drops after session is over.

◆ this[string type]

FeatureContainer Doloro.InvetorySystem.StoragesDatabase.AFeaturesHolderContainer< FeatureType, ContainerType >.this[string type]
getinherited

Returns FeatureContainer by type in string format in case if it exists.

Parameters
typeType in string format received with the Type.FullName
Returns
Cross-session property data or null in case if not found.

◆ this[Type type]

FeatureContainer Doloro.InvetorySystem.StoragesDatabase.AFeaturesHolderContainer< FeatureType, ContainerType >.this[Type type]
getinherited

Returns FeatureContainer by type in string format in case if it exists.

Parameters
typeType of the FeatureType instance.
Returns
Cross-session property data or null in case if not found.

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