|  | MAGE
    v0.171.0
    Matthias Advanced Game Engine | 
#include <binary_reader.hpp>
 
  
 | Public Member Functions | |
| BigEndianBinaryReader & | operator= (const BigEndianBinaryReader &reader)=delete | 
| BigEndianBinaryReader & | operator= (BigEndianBinaryReader &&reader) noexcept | 
| void | ReadFromFile (std::filesystem::path path) | 
| void | ReadFromMemory (gsl::span< const U8 > input) | 
| Protected Member Functions | |
| BigEndianBinaryReader () | |
| BigEndianBinaryReader (const BigEndianBinaryReader &reader)=delete | |
| BigEndianBinaryReader (BigEndianBinaryReader &&reader) noexcept | |
| ~BigEndianBinaryReader () | |
| const std::filesystem::path & | GetPath () const noexcept | 
| bool | ContainsChars () const noexcept | 
| template<typename T > | |
| const T | Read () | 
| template<typename T > | |
| const T * | ReadArray (std::size_t count) | 
| Private Member Functions | |
| virtual void | ReadData ()=0 | 
| Private Attributes | |
| std::filesystem::path | m_path | 
| const U8 * | m_pos | 
| const U8 * | m_end | 
| UniquePtr< U8[] > | m_data | 
A class of readers for reading (big endian) binary files.
| 
 | protected | 
Constructs a big endian binary reader.
| 
 | protecteddelete | 
Constructs a big endian binary reader from the given big endian binary reader.
| [in] | reader | A reference to the big endian binary reader to copy. | 
| 
 | protecteddefaultnoexcept | 
Constructs a big endian binary reader by moving the given big endian binary reader.
| [in] | reader | A reference to the big endian binary reader to move. | 
| 
 | protecteddefault | 
Destructs this big endian binary reader.
| 
 | protectednoexcept | 
Checks if there are characters left to read by this big endian binary reader.
true if there are characters left to read by this binary reader. false otherwise. | 
 | protectednoexcept | 
Returns the current path of this big endian binary reader.
| 
 | delete | 
Copies the given big endian binary reader to this big endian binary reader.
| [in] | reader | A reference to a big endian binary reader to copy. | 
| 
 | defaultnoexcept | 
Moves the given big endian binary reader to this big endian binary reader.
| [in] | reader | A reference to a big endian binary reader to move. | 
| 
 | protected | 
Reads a T value.
| T | The data type. | 
T value read. | Exception | Failed to read a Tvalue. | 
| 
 | protected | 
Reads an array of T values.
| T | The data type. | 
| count | The number of Tvalues to read. | 
T value read. | Exception | Failed to read countTvalues. | 
| 
 | privatepure virtual | 
Starts reading.
| Exception | Failed to read from the given file. | 
Implemented in mage::rendering::loader::MSHReader< VertexT, IndexT >, and mage::rendering::loader::SpriteFontReader.
| void mage::BigEndianBinaryReader::ReadFromFile | ( | std::filesystem::path | path | ) | 
Reads from the file associated with the given path.
| [in] | path | The path. | 
| Exception | Failed to read from the file. | 
| void mage::BigEndianBinaryReader::ReadFromMemory | ( | gsl::span< const U8 > | input | ) | 
Reads the input string.
| [in] | input | The input byte string. | 
| Exception | Failed to read from the given input string. | 
A pointer to the data to read of this big endian binary reader.
| 
 | private | 
A pointer to the end position of this big endian binary reader.
| 
 | private | 
The current path of this big endian binary reader.
| 
 | private | 
A pointer to the current position of this big endian binary reader.