#ifndef MSP_GL_RESOURCE_H_
#define MSP_GL_RESOURCE_H_
-#include <msp/core/inttypes.h>
+#include <cstdint>
+#include <msp/core/noncopyable.h>
#include <msp/io/seekable.h>
namespace Msp {
class ResourceManager;
class Resources;
-class Resource
+class Resource: public NonCopyable
{
public:
class AsyncLoader
};
protected:
- ResourceManager *manager;
- void *manager_data;
+ ResourceManager *manager = 0;
+ void *manager_data = 0;
- Resource();
+ Resource() = default;
+ Resource(Resource &&);
public:
virtual ~Resource();
/** Returns the amount of graphics memory used by this resource. The
returned value must not change while the resource is loaded. */
- virtual UInt64 get_data_size() const = 0;
+ virtual std::size_t get_data_size() const = 0;
virtual void unload() = 0;
};