2014-10-31 00:16:47 +00:00
|
|
|
#ifndef RESOURCEFILE_H
|
|
|
|
#define RESOURCEFILE_H
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
#include "ResType.h"
|
|
|
|
#include "ResourceFork.h"
|
|
|
|
|
|
|
|
class ResourceFile
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum class Format
|
|
|
|
{
|
|
|
|
autodetect,
|
|
|
|
#ifdef __APPLE__
|
|
|
|
real,
|
|
|
|
#endif
|
|
|
|
macbin,
|
|
|
|
diskimage,
|
|
|
|
basilisk,
|
2014-11-07 23:53:36 +00:00
|
|
|
applesingle,
|
2014-10-31 00:16:47 +00:00
|
|
|
//underscore_ad,
|
|
|
|
//appledouble
|
|
|
|
};
|
|
|
|
|
|
|
|
ResourceFile();
|
|
|
|
ResourceFile(std::string path, Format f = Format::autodetect);
|
|
|
|
~ResourceFile();
|
|
|
|
|
|
|
|
bool assign(std::string path, Format f = Format::autodetect);
|
|
|
|
|
|
|
|
bool read();
|
|
|
|
bool write();
|
|
|
|
|
|
|
|
std::string pathstring;
|
|
|
|
Format format;
|
|
|
|
ResType type;
|
|
|
|
ResType creator;
|
|
|
|
Resources resources;
|
|
|
|
std::string data;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // RESOURCEFILE_H
|