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
6
namespace
Ult
7
{
8
9
enum
EndianType
10
{
11
ENDIAN_UNKNOWN
,
12
ENDIAN_BIG
,
13
ENDIAN_LITTLE
14
};
15
20
class
Endian
21
{
22
public
:
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
59
private
:
60
EndianType
mSystemEndian;
61
};
62
63
}
// namespace Ult
64
65
#endif
// ULT_ENDIAN_H_INCLUDED
66
Ult::Endian::~Endian
virtual ~Endian()
Definition
Endian.cpp:23
Ult::Endian::GetEndianType
EndianType GetEndianType() const
Definition
Endian.h:57
Ult::Endian::Endian
Endian()
Definition
Endian.cpp:8
Ult::Endian::SwapBytes
void SwapBytes(char *data, size_t size) const
Definition
Endian.cpp:37
Ult::Endian::ResolveEndian
void ResolveEndian(char *data, size_t size, EndianType inputEndian) const
Definition
Endian.cpp:27
Ult
Definition
Archive.h:13
Ult::EndianType
EndianType
Definition
Endian.h:10
Ult::ENDIAN_BIG
@ ENDIAN_BIG
Definition
Endian.h:12
Ult::ENDIAN_LITTLE
@ ENDIAN_LITTLE
Definition
Endian.h:13
Ult::ENDIAN_UNKNOWN
@ ENDIAN_UNKNOWN
Definition
Endian.h:11
include
Ult
Endian.h
Generated by
1.13.0