8#if __has_include("defs.h")
26 asset (
int id_,
const std::string& name_ = std::string (),
bool persist =
false);
30 bool write (
const std::string& path);
33 const std::string name;
53inline asset::asset (
int id_,
const std::string& name_,
bool persist)
75inline bool asset::remove ()
80 return utf8::remove (fullpath);
Class for storing asset files in Windows resource data.
Definition asset.h:24
~asset()
Destructor. Delete asset file if it exists.
Definition asset.h:64
bool write(const std::string &path)
Write the asset to a folder.
Definition asset.cpp:51
size_t size()
Return size of asset (in bytes)
Definition asset.h:86
const void * data()
Load asset data.
Definition asset.cpp:35
asset(int id_, const std::string &name_=std::string(), bool persist=false)
Constructor for an asset object.
Definition asset.h:53