|
|
@@ -1,6 +1,7 @@
|
|
|
#pragma once
|
|
|
|
|
|
#include "CmPrerequisites.h"
|
|
|
+#include "CmISerializable.h"
|
|
|
#include "CmUUID.h"
|
|
|
|
|
|
namespace CamelotEngine
|
|
|
@@ -8,11 +9,13 @@ namespace CamelotEngine
|
|
|
/**
|
|
|
* @brief Base class for all resources used in the engine.
|
|
|
*/
|
|
|
- class CM_EXPORT Resource
|
|
|
+ class CM_EXPORT Resource : public ISerializable
|
|
|
{
|
|
|
public:
|
|
|
virtual ~Resource() {};
|
|
|
|
|
|
+ //public
|
|
|
+
|
|
|
protected:
|
|
|
friend class Resources;
|
|
|
|
|
|
@@ -28,5 +31,18 @@ namespace CamelotEngine
|
|
|
|
|
|
UUID mSourceUUID;
|
|
|
UINT32 mSize;
|
|
|
+
|
|
|
+ /************************************************************************/
|
|
|
+ /* SERIALIZATION */
|
|
|
+ /************************************************************************/
|
|
|
+ public:
|
|
|
+ friend class ResourceST;
|
|
|
+
|
|
|
+ virtual SerializableType* getSerializable() const;
|
|
|
+
|
|
|
+ static Resource* newObject()
|
|
|
+ {
|
|
|
+ return new Resource();
|
|
|
+ }
|
|
|
};
|
|
|
}
|