mirror of
https://github.com/ksherlock/profuse.git
synced 2025-01-30 00:34:01 +00:00
git-svn-id: https://profuse.googlecode.com/svn/branches/v2@100 aa027e90-d47c-11dd-86d7-074df07e0730
This commit is contained in:
parent
2209b44225
commit
2462938c3a
19
MappedFile.h
19
MappedFile.h
@ -8,10 +8,6 @@
|
||||
namespace ProFUSE {
|
||||
|
||||
|
||||
enum {
|
||||
LittleEndian = 0x3412,
|
||||
BigEndian = 0x1234
|
||||
};
|
||||
|
||||
class MappedFile {
|
||||
public:
|
||||
@ -41,20 +37,7 @@ public:
|
||||
size_t fileSize() const { return _size; }
|
||||
void *fileData() const { return _map; }
|
||||
|
||||
uint8_t read8(size_t location) const
|
||||
{
|
||||
return ((uint8_t *)_map)[location];
|
||||
}
|
||||
uint16_t read16(size_t location, int byteOrder) const;
|
||||
uint32_t read32(size_t location, int byteOrder) const;
|
||||
|
||||
void write8(size_t location, uint8_t data)
|
||||
{
|
||||
((uint8_t *)_map)[location] = data;
|
||||
}
|
||||
void write16(size_t location, uint16_t data, int byteOrder);
|
||||
void write32(size_t location, uint32_t data, int byteOrder);
|
||||
|
||||
|
||||
|
||||
private:
|
||||
MappedFile& operator=(const MappedFile& other);
|
||||
|
Loading…
x
Reference in New Issue
Block a user