BALL::BinaryFileAdaptor< T > Class Template Reference
[Operating system support]
#include <BALL/SYSTEM/file.h>
List of all members.
Detailed Description
template<typename T>
class BALL::BinaryFileAdaptor< T >
Helper class for data conversion. BinaryFileAdaptors are used to read and write binary data from and to streams. This is done by reading the member data
as a byte stream through an explicit cast and utilizing the stream read() and write() functions.
- Caveat: This concept relies on the C++ memory layout and thus is highly non-portable!
- The flag swap_endian can be used to swap between big- and little-endian.
Definition at line 625 of file file.h.
Constructor & Destructor Documentation
Default constructor.
Definition at line 675 of file file.h.
Detailed constructor.
Definition at line 683 of file file.h.
Member Function Documentation
Returns a mutable reference to the data stored in the adaptor
Definition at line 719 of file file.h.
Returns a const reference to the data stored in the adaptor
Definition at line 712 of file file.h.
return the swap_endian flag
Definition at line 698 of file file.h.
Sets the member data
to the desired value.
- Parameters:
-
Definition at line 705 of file file.h.
Set the swap_endian flag.
Definition at line 691 of file file.h.
Member Data Documentation