5 #include "MemoryBuffer.h"
37 InputDimensionMismatch,
40 TensorDataSizeMismatch,
82 virtual const char* GetResourceName()
const = 0;
114 SMARTENGINE_EXPORT
SerializationResult Serializable_Serialize(ObjPtr
object, ObjPtr buffer);
115 SMARTENGINE_EXPORT
SerializationResult Serializable_Deserialize(ObjPtr
object, ObjPtr buffer);
117 SMARTENGINE_EXPORT
const char* Resource_GetResourceName(ObjPtr
object);
119 SMARTENGINE_EXPORT
SerializationResult Resource_Load(ObjPtr
object,
const char* resourceName);
120 SMARTENGINE_EXPORT
SerializationResult Resource_Save(ObjPtr
object,
const char* resourceName);
Base class for objects that can be loaded from and saved to an in memory buffer.
Definition: Resource.h:54
virtual SerializationResult GetLastLoadResult() const =0
Returns the result of the last call to Load(). Useful for checking loaded data state after creation.
virtual SerializationResult Load(const char *appendName=nullptr)=0
Load this object from disk.
Definition: A2CTrainer.h:10
Base class for SmartEngine AI objects. It is not common to deal with this class directly.
Definition: Object.h:19
const char * resourceName
Optional resource name that will be used with Load() and Save() if no other name is provided.
Definition: Resource.h:21
virtual SerializationResult Deserialize(IMemoryBuffer *buffer)=0
Fill this object with contents from a buffer.
SerializationResult
Definition: Resource.h:25
Base class for objects that can be loaded from and saved to disk.
Definition: Resource.h:77
virtual SerializationResult Save(const char *appendName=nullptr)=0
Save this object to disk.
Simple in memory buffer. Used for serialization, but can be used as a generic buffer too.
Definition: MemoryBuffer.h:15