PrimeWorldEditor/src/FileIO/CFileOutStream.h
2016-08-23 20:42:05 -06:00

36 lines
957 B
C++

#ifndef CFILEOUTSTREAM_H
#define CFILEOUTSTREAM_H
#include "IOutputStream.h"
#include "IOUtil.h"
class CFileOutStream : public IOutputStream
{
private:
FILE *mpFStream;
std::string mName;
unsigned long mSize;
public:
CFileOutStream();
CFileOutStream(const std::string& rkFile);
CFileOutStream(const std::string& rkFile, IOUtil::EEndianness FileEndianness);
CFileOutStream(const CFileOutStream& rkSrc);
~CFileOutStream();
void Open(const std::string& rkFile, IOUtil::EEndianness);
void Update(const std::string& rkFile, IOUtil::EEndianness FileEndianness);
void Close();
void WriteBytes(const void *pkSrc, unsigned long Count);
bool Seek(long Offset, long Origin);
bool Seek64(long long Offset, long Origin);
long Tell() const;
long long Tell64() const;
bool EoF() const;
bool IsValid() const;
long Size() const;
std::string FileName() const;
};
#endif // CFILEOUTSTREAM_H