Ult3D
Implementation of "Ultimate 3D Game Engine Design & Architecture" by Allan Sherrod
Loading...
Searching...
No Matches
Endian.h
Go to the documentation of this file.
1#ifndef ULT_ENDIAN_H_INCLUDED
2#define ULT_ENDIAN_H_INCLUDED
3
4#include <cstddef>
5
6namespace Ult
7{
8
15
20class Endian
21{
22public:
26 Endian();
30 virtual ~Endian();
31
39 void ResolveEndian(char* data, size_t size, EndianType inputEndian) const;
40
46 void SwapBytes(char* data, size_t size) const;
47
54 void SwapBytes(char* data, size_t size, size_t number) const;
55
57 EndianType GetEndianType() const { return mSystemEndian; }
58
59private:
60 EndianType mSystemEndian;
61};
62
63} // namespace Ult
64
65#endif // ULT_ENDIAN_H_INCLUDED
66
virtual ~Endian()
Definition Endian.cpp:23
EndianType GetEndianType() const
Definition Endian.h:57
Endian()
Definition Endian.cpp:8
void SwapBytes(char *data, size_t size) const
Definition Endian.cpp:37
void ResolveEndian(char *data, size_t size, EndianType inputEndian) const
Definition Endian.cpp:27
Definition Archive.h:13
EndianType
Definition Endian.h:10
@ ENDIAN_BIG
Definition Endian.h:12
@ ENDIAN_LITTLE
Definition Endian.h:13
@ ENDIAN_UNKNOWN
Definition Endian.h:11