SmartEngine  1.6.0
Classes | Public Member Functions | Properties | List of all members
SmartEngine.Resource Class Reference

Base class for objects that can be loaded from and saved to disk. More...

Inheritance diagram for SmartEngine.Resource:
SmartEngine.Object SmartEngine.ISerializable SmartEngine.Disposable SmartEngine.NeuralNetworks.AgentDataStore SmartEngine.NeuralNetworks.CuriosityModule SmartEngine.NeuralNetworks.GeneticAgentTrainer SmartEngine.NeuralNetworks.Graph SmartEngine.NeuralNetworks.LossTrainer SmartEngine.NeuralNetworks.RLTrainer SmartEngine.NeuralNetworks.GeneticTrainer SmartEngine.NeuralNetworks.GradientDescentTrainer SmartEngine.NeuralNetworks.A2CTrainer SmartEngine.NeuralNetworks.D4PGTrainer SmartEngine.NeuralNetworks.PPOTrainer

Classes

class  CInfo
 Constructor info. More...
 

Public Member Functions

SerializationResult Load (string appendName=null)
 Load this object from disk. More...
 
SerializationResult Save (string appendName=null)
 Save this object to disk. More...
 
SerializationResult Serialize (MemoryBuffer buffer)
 Write the contents of this object to a buffer. More...
 
SerializationResult Serialize (out byte[] data)
 Write the contents of this object to a byte array. More...
 
SerializationResult Deserialize (MemoryBuffer buffer)
 Fill this object with contents from a buffer. More...
 
SerializationResult Deserialize (byte[] data)
 Fill this object with contents from a byte array. More...
 
- Public Member Functions inherited from SmartEngine.Object
void AddRef ()
 Increments the internal reference count on this object. It is not common to use this method directly. More...
 
void Release ()
 Decrements the internal reference count on this object. It is not common to use this method directly. More...
 
- Public Member Functions inherited from SmartEngine.Disposable
void Dispose ()
 Cleans up any internal state. It is not safe to use an object after it has been disposed. More...
 

Properties

string ResourceName [get]
 Returns the name of this resource passed to the constructor. More...
 
SerializationResult LastLoadResult [get]
 Returns the result of the last call to Load(). Useful for checking loaded data state after creation. More...
 

Detailed Description

Base class for objects that can be loaded from and saved to disk.

When loading and saving, resources deal with one or more assets on disk. The name of the assets will be derived from the resource name used during the load / save process.

Member Function Documentation

◆ Deserialize() [1/2]

SerializationResult SmartEngine.Resource.Deserialize ( byte[]  data)

Fill this object with contents from a byte array.

◆ Deserialize() [2/2]

SerializationResult SmartEngine.Resource.Deserialize ( MemoryBuffer  buffer)

Fill this object with contents from a buffer.

Implements SmartEngine.ISerializable.

◆ Load()

SerializationResult SmartEngine.Resource.Load ( string  appendName = null)

Load this object from disk.

Parameters
appendNameOptional name to be appended to our resource name when loading. If not provided, the constructor's resource name will be the final resource name.

◆ Save()

SerializationResult SmartEngine.Resource.Save ( string  appendName = null)

Save this object to disk.

Parameters
appendNameOptional name to be appended to our resource name when saving. If not provided, the constructor's resource name will be the final resource name.

◆ Serialize() [1/2]

SerializationResult SmartEngine.Resource.Serialize ( MemoryBuffer  buffer)

Write the contents of this object to a buffer.

Implements SmartEngine.ISerializable.

◆ Serialize() [2/2]

SerializationResult SmartEngine.Resource.Serialize ( out byte[]  data)

Write the contents of this object to a byte array.

Property Documentation

◆ LastLoadResult

SerializationResult SmartEngine.Resource.LastLoadResult
get

Returns the result of the last call to Load(). Useful for checking loaded data state after creation.

◆ ResourceName

string SmartEngine.Resource.ResourceName
get

Returns the name of this resource passed to the constructor.