macdependency/MachO/internalfile.h
Mike Lischke 972fcb3094 Overhaul of the application to avoid it crashing on macOS Sierra.
- Applied all recommended XCode (8) settings.
- Removed boost and replaced that code by standard functions.
- Implemented name mangling via abi::__cxa_demangle instead of running an external process to use c++filt.
- Enabled C++11. Min deployment target is now OSX 10.7.
- Some code clean up (e.g. formatting, std namespace).
2016-11-19 16:23:39 +01:00

36 lines
764 B
C++

#ifndef INTERNALFILE_H
#define INTERNALFILE_H
#include "macho_global.h"
class InternalFile
{
public:
virtual ~InternalFile();
static InternalFile* create(InternalFile* file);
static InternalFile* create(const std::string& filename);
void release();
std::string getPath() const;
std::string getName() const;
std::string getTitle() const;
unsigned long long getSize() const;
bool seek(long long int position);
std::streamsize read(char* buffer, std::streamsize size);
long long int getPosition();
time_t getLastModificationTime() const;
private:
unsigned int counter;
InternalFile(const std::string& filename);
std::ifstream file;
std::string filename;
size_t _fileSize;
time_t _lastWriteTime;
};
#endif // INTERNALFILE_H