Oxygen Engine
Modern C++ 3D Engine using OpenGL
Loading...
Searching...
No Matches
oe::io::File Class Reference

Public Member Functions

 File (const std::string &filename, const FileMode &mode)
 
size_t read (void *buffer, const size_t &len)
 
size_t write (const void *buffer, const size_t &len)
 
bool eof ()
 
bool seek (const size_t &pos)
 
size_t tell ()
 
size_t size ()
 
bool flush ()
 
void align (size_t alignment)
 
std::string readStringToNull (const size_t &maxLength=32767)
 
template<typename T >
readValue (bool little_endian=true)
 
template<typename T >
bool writeValue (const T value, bool little_endian=true)
 
template<>
bool readValue (bool little_endian)
 
template<>
uint8_t readValue (bool little_endian)
 
template<>
int8_t readValue (bool little_endian)
 
template<>
uint16_t readValue (bool little_endian)
 
template<>
int16_t readValue (bool little_endian)
 
template<>
uint32_t readValue (bool little_endian)
 
template<>
int32_t readValue (bool little_endian)
 
template<>
uint64_t readValue (bool little_endian)
 
template<>
int64_t readValue (bool little_endian)
 
template<>
float readValue (bool little_endian)
 
template<>
double readValue (bool little_endian)
 
template<>
bool writeValue (const bool value, bool little_endian)
 
template<>
bool writeValue (const uint8_t value, bool little_endian)
 
template<>
bool writeValue (const int8_t value, bool little_endian)
 
template<>
bool writeValue (const uint16_t value, bool little_endian)
 
template<>
bool writeValue (const int16_t value, bool little_endian)
 
template<>
bool writeValue (const uint32_t value, bool little_endian)
 
template<>
bool writeValue (const int32_t value, bool little_endian)
 
template<>
bool writeValue (const uint64_t value, bool little_endian)
 
template<>
bool writeValue (const int64_t value, bool little_endian)
 

Constructor & Destructor Documentation

◆ File()

oe::io::File::File ( const std::string &  filename,
const FileMode &  mode 
)

Open a file for reading / writting

Note
if you intend to open the file for write or append, the path must be relative to write folder

Member Function Documentation

◆ align()

void oe::io::File::align ( size_t  alignment)

Move stream position to be aligned


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