Helper structure for writing binary data. More...
#include <fileIo.hpp>
Public Member Functions | |
FileIo (std::string const &file, bool write) | |
template<typename Data > | |
void | readData (Data *data, size_t const length) |
template<typename Data > | |
void | writeData (Data const *data, size_t const length) |
~FileIo () | |
Destructor. | |
Helper structure for writing binary data.
Exceptions are thrown if:
|
inline |
Constructor Will throw an IoException if file cannot be opened.
|
inline |
Read data from a file. Will throw an IoException if not in read mode or if the number of bytes read is wrong.
|
inline |
Write data to a file. Will throw an IoException if not in write mode or if the number of bytes written is wrong.