SmartEngine
1.6.0
|
Base class for objects that can be loaded from and saved to disk. More...
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... | |
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.
SerializationResult SmartEngine.Resource.Deserialize | ( | byte[] | data | ) |
Fill this object with contents from a byte array.
SerializationResult SmartEngine.Resource.Deserialize | ( | MemoryBuffer | buffer | ) |
Fill this object with contents from a buffer.
Implements SmartEngine.ISerializable.
SerializationResult SmartEngine.Resource.Load | ( | string | appendName = null | ) |
Load this object from disk.
appendName | Optional name to be appended to our resource name when loading. If not provided, the constructor's resource name will be the final resource name. |
SerializationResult SmartEngine.Resource.Save | ( | string | appendName = null | ) |
Save this object to disk.
appendName | Optional name to be appended to our resource name when saving. If not provided, the constructor's resource name will be the final resource name. |
SerializationResult SmartEngine.Resource.Serialize | ( | MemoryBuffer | buffer | ) |
Write the contents of this object to a buffer.
Implements SmartEngine.ISerializable.
SerializationResult SmartEngine.Resource.Serialize | ( | out byte[] | data | ) |
Write the contents of this object to a byte array.
|
get |
Returns the result of the last call to Load(). Useful for checking loaded data state after creation.
|
get |
Returns the name of this resource passed to the constructor.