52 bool open(
const std::string& fileName,
bool append =
false);
75 size_t Read(
void* Buffer,
size_t Count)
override;
76 size_t Write(
const void* Buffer,
size_t Count)
override;
79 !std::is_copy_constructible_v<CFileOutputStream> &&
80 !std::is_copy_assignable_v<CFileOutputStream>,
TSeekOrigin
Used in CStream::Seek.
uint64_t getPosition() const override
Method for getting the current cursor position, where 0 is the first byte and TotalBytesCount-1 the l...
uint64_t Seek(int64_t Offset, CStream::TSeekOrigin Origin=sFromBeginning) override
Introduces a pure virtual method for moving to a specified position in the streamed resource...
CFileOutputStream()
Default constructor.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
bool is_open()
Returns true if the file was open without errors.
std::ofstream m_of
The actual output file stream.
This CStream derived class allow using a file as a write-only, binary stream.
bool fileOpenCorrectly() const
Returns true if the file was open without errors.
bool open(const std::string &fileName, bool append=false)
Open the given file for write.
CFileOutputStream & operator=(const CFileOutputStream &)=delete
~CFileOutputStream() override
Destructor.
uint64_t getTotalBytesCount() const override
Method for getting the total number of bytes writen to buffer.
size_t Read(void *Buffer, size_t Count) override
Introduces a pure virtual method responsible for reading from the stream.
size_t Write(const void *Buffer, size_t Count) override
Introduces a pure virtual method responsible for writing to the stream.
void close()
Close the stream.