2015-07-26 21:39:49 +00:00
|
|
|
#ifndef CRESOURCE_H
|
|
|
|
#define CRESOURCE_H
|
|
|
|
|
|
|
|
#include "EResType.h"
|
|
|
|
#include <Common/CFourCC.h>
|
|
|
|
#include <Common/CUniqueID.h>
|
|
|
|
#include <Common/types.h>
|
2015-11-24 06:08:31 +00:00
|
|
|
#include <Common/TString.h>
|
2015-07-26 21:39:49 +00:00
|
|
|
|
|
|
|
class CResCache;
|
|
|
|
|
|
|
|
class CResource
|
|
|
|
{
|
|
|
|
friend class CResCache;
|
|
|
|
|
2015-11-24 06:08:31 +00:00
|
|
|
TString mResSource;
|
2015-07-26 21:39:49 +00:00
|
|
|
CUniqueID mID;
|
|
|
|
int mRefCount;
|
|
|
|
|
|
|
|
public:
|
|
|
|
CResource();
|
|
|
|
virtual ~CResource();
|
|
|
|
virtual EResType Type();
|
2015-11-24 06:08:31 +00:00
|
|
|
TString Source();
|
|
|
|
TString FullSource();
|
2015-07-26 21:39:49 +00:00
|
|
|
CUniqueID ResID();
|
|
|
|
void Lock();
|
|
|
|
void Release();
|
|
|
|
bool IsValidResource();
|
|
|
|
static EResType ResTypeForExtension(CFourCC Extension);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CRESOURCE_H
|