16 #ifndef __CU_ASSET_H__
17 #define __CU_ASSET_H__
18 #include <base/CCRef.h>
19 #include <platform/CCFileUtils.h>
24 #pragma mark Generic Asset
39 class CC_DLL
Asset :
public Ref {
50 std::string
getFile()
const {
return _file; }
60 void setFile(std::string file) { _file = file; }
76 virtual bool load() = 0;
92 CC_CONSTRUCTOR_ACCESS:
93 #pragma mark Initializers
97 Asset() : Ref() { _file =
""; }
112 bool init() { _file =
"";
return true; }
123 _file = FileUtils::getInstance()->fullPathForFilename(file);
std::string getFile() const
Definition: CUAsset.h:50
bool init(std::string file)
Definition: CUAsset.h:122
virtual void unload()
Definition: CUAsset.h:89
virtual ~Asset()
Definition: CUAsset.h:102
bool init()
Definition: CUAsset.h:112
void setFile(std::string file)
Definition: CUAsset.h:60
std::string _file
Definition: CUAsset.h:42