Photon Engine 2.0.0-beta
A physically based renderer.
|
#include <BinaryFileInputStream.h>
Public Member Functions | |
BinaryFileInputStream ()=default | |
BinaryFileInputStream (const Path &filePath) | |
BinaryFileInputStream (BinaryFileInputStream &&other)=default | |
template<typename T , bool DO_BYTE_REVERSAL = false> | |
void | readData (T *out_data) |
template<typename T , bool DO_BYTE_REVERSAL = false> | |
void | readData (TSpan< T > out_data) |
std::optional< std::size_t > | getFileSizeInBytes () const |
BinaryFileInputStream & | operator= (BinaryFileInputStream &&rhs)=default |
Public Member Functions inherited from ph::StdInputStream | |
StdInputStream ()=default | |
StdInputStream (std::unique_ptr< std::istream > stream) | |
StdInputStream (StdInputStream &&other) noexcept | |
void | read (std::size_t numBytes, std::byte *out_bytes) override |
Read specific number of raw bytes in one go. The method does not return before finishing the reading process. | |
void | readString (std::string *out_string, char delimiter) override |
Read a string in one go. Note the EOF is also considered a delimiter (the final one). | |
void | seekGet (std::size_t pos) override |
Set the input position of the stream. The unit of the position is defined by the implementation. | |
std::optional< std::size_t > | tellGet () override |
Get the current input position of the stream. The unit of the position is defined by the implementation. | |
operator bool () const override | |
std::size_t | readSome (std::size_t numBytes, std::byte *out_bytes) override |
Read some data in the form of raw bytes. The method may return before finish reading all bytes. In such case, the method returns how many bytes were actually read. | |
std::istream * | getStream () const |
StdInputStream & | operator= (StdInputStream &&rhs) noexcept |
Public Member Functions inherited from ph::IInputStream | |
void | readLine (std::string *out_string) |
Read a line. Equivalent to calling readString(std::string*, char) with ' ' as the delimiter. | |
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::StdInputStream | |
bool | isStreamGoodForRead () const |
void | ensureStreamIsGoodForRead () const |
Check if the stream has any error. | |
std::string | getReasonForError () const |
A description for why the stream is not in a good state. | |
|
inlinedefault |
|
explicit |
|
inlinedefault |
std::optional< std::size_t > ph::BinaryFileInputStream::getFileSizeInBytes | ( | ) | const |
|
inlinedefault |
|
inline |
|
inline |