Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::BinaryFileOutputStream Class Reference

#include <BinaryFileOutputStream.h>

Inheritance diagram for ph::BinaryFileOutputStream:
ph::StdOutputStream ph::IOutputStream ph::IDataStream

Public Member Functions

 BinaryFileOutputStream ()=default
 
 BinaryFileOutputStream (const Path &filePath)
 
 BinaryFileOutputStream (BinaryFileOutputStream &&other)=default
 
template<typename T , bool DO_BYTE_REVERSAL = false>
void writeData (const T *data)
 
template<typename T , bool DO_BYTE_REVERSAL = false>
void writeData (TSpanView< T > data)
 
BinaryFileOutputStreamoperator= (BinaryFileOutputStream &&rhs)=default
 
- Public Member Functions inherited from ph::StdOutputStream
 StdOutputStream ()=default
 
 StdOutputStream (std::unique_ptr< std::ostream > stream)
 
 StdOutputStream (StdOutputStream &&other) noexcept
 
void write (std::size_t numBytes, const std::byte *bytes) override
 Write data in the form of raw bytes in one go. The method does not return before finishing the writing process.
 
void writeString (std::string_view str) override
 Write a string in one go.
 
void seekPut (std::size_t pos) override
 Set the output position of the stream. The unit of the position is defined by the implementation.
 
std::optional< std::size_t > tellPut () override
 Get the current output position of the stream. The unit of the position is defined by the implementation.
 
 operator bool () const override
 
std::ostream * getStream () const
 
StdOutputStreamoperator= (StdOutputStream &&rhs) noexcept
 
- Public Member Functions inherited from ph::IOutputStream
virtual std::size_t writeSome (std::size_t numBytes, const std::byte *bytes)
 Write some data in the form of raw bytes. The method may return before finish writing all bytes. In such case, the method returns how many bytes were actually written.
 
void writeLine (std::string_view str)
 Write a line. Equivalent to calling writeString(std::string_view) with '
' as an extra character.
 
- Public Member Functions inherited from ph::IDataStream
virtual ~IDataStream ()=default
 
virtual std::string acquireName () const
 Access to the stream's name. This method is not meant to be used in a high performance context, unless otherwise stated by the overridder. Stream name is not always available.
 

Additional Inherited Members

- Protected Member Functions inherited from ph::StdOutputStream
bool isStreamGoodForWrite () const
 
void ensureStreamIsGoodForWrite () const
 Check if the stream has any error.
 
std::string getReasonForError () const
 A description for why the stream is not in a good state.
 

Constructor & Destructor Documentation

◆ BinaryFileOutputStream() [1/3]

ph::BinaryFileOutputStream::BinaryFileOutputStream ( )
inlinedefault

◆ BinaryFileOutputStream() [2/3]

ph::BinaryFileOutputStream::BinaryFileOutputStream ( const Path & filePath)
explicit

◆ BinaryFileOutputStream() [3/3]

ph::BinaryFileOutputStream::BinaryFileOutputStream ( BinaryFileOutputStream && other)
inlinedefault

Member Function Documentation

◆ operator=()

BinaryFileOutputStream & ph::BinaryFileOutputStream::operator= ( BinaryFileOutputStream && rhs)
inlinedefault

◆ writeData() [1/2]

template<typename T , bool DO_BYTE_REVERSAL>
void ph::BinaryFileOutputStream::writeData ( const T * data)
inline

◆ writeData() [2/2]

template<typename T , bool DO_BYTE_REVERSAL>
void ph::BinaryFileOutputStream::writeData ( TSpanView< T > data)
inline

The documentation for this class was generated from the following files: