You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
449 B
24 lines
449 B
#ifndef _INMEMORYFILE_H_
|
|
#define _INMEMORYFILE_H_
|
|
|
|
|
|
#define INMEMORYFILE_ALLOCATEBLOCK 4096
|
|
class InMemoryFile {
|
|
private:
|
|
size_t memallocsize;
|
|
public:
|
|
void *mem;
|
|
size_t memsize;
|
|
std::string filename;
|
|
|
|
InMemoryFile operator=(InMemoryFile rightside);
|
|
|
|
InMemoryFile();
|
|
~InMemoryFile();
|
|
|
|
int Allocate(size_t newsize);
|
|
int CopyFrom(void *srcptr, size_t srcsize);
|
|
};
|
|
|
|
#endif
|