urbackup_backend/file_memory.h
plucid 7ceac9be75 Buildfixes for newer libraries
A few minor fixes are needed to compile with the VC++ 2013 headers and Boost 1.50 or later.

Include <algorithm> so std::min/max is available.

Get rid of unused 'int round(float)' which conflicts with 'float round(float)' in <cmath>.

boost::TIME_UTC is now boost::TIME_UTC_, as of 1.50.  Use an #if BOOST_VERSION to choose the proper name.
2015-02-05 01:02:35 -08:00

22 lines
459 B
C++

#include <string>
#include <algorithm>
#include "Interface/File.h"
class CMemoryFile : public IFile
{
public:
CMemoryFile();
virtual std::string Read(_u32 tr);
virtual _u32 Read(char* buffer, _u32 bsize);
virtual _u32 Write(const std::string &tw);
virtual _u32 Write(const char* buffer, _u32 bsize);
virtual bool Seek(_i64 spos);
virtual _i64 Size(void);
virtual std::string getFilename(void);
private:
std::string data;
size_t pos;
};