Sleeping Wombat Common Library
0.50.0
swCommonLibrary
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
HierarchicalChunkedFormat
Headers
FileHeader.h
Go to the documentation of this file.
1
#pragma once
2
8
#include "
swCommonLib/Common/TypesDefinitions.h
"
9
#include "
swCommonLib/Common/Version.h
"
10
11
12
namespace
sw
13
{
14
15
19
struct
FileHeader
20
{
21
char
LetterShortcut
[ 3 ];
22
bool
LittleEndian
;
23
Size
FileSize
;
24
Size
RootChunkOffset
;
25
Version
VersionHCF
;
26
27
28
// ================================ //
29
//
31
FileHeader
(
Version
version )
32
: VersionHCF( version )
33
{
34
LetterShortcut[ 0 ] =
'H'
;
35
LetterShortcut[ 1 ] =
'C'
;
36
LetterShortcut[ 2 ] =
'F'
;
37
38
FileSize = 0;
39
RootChunkOffset = 0;
40
LittleEndian =
CheckLittleEndian
();
41
}
42
46
bool
CheckLittleEndian
()
47
{
48
int
n = 1;
49
// little endian if true
50
if
( *(
char
*)&n == 1 )
51
return
true
;
52
return
false
;
53
}
54
};
55
56
}
// sw
57
sw::FileHeader::LittleEndian
bool LittleEndian
Endiannes of hardware which have written this file.
Definition:
FileHeader.h:22
sw
Definition:
Exception.h:11
sw::FileHeader::CheckLittleEndian
bool CheckLittleEndian()
Based on: http://stackoverflow.com/questions/4181951/how-to-check-whether-a-system-is-big-endian-or-l...
Definition:
FileHeader.h:46
Version.h
sw::FileHeader::VersionHCF
Version VersionHCF
Version of HCF file library.
Definition:
FileHeader.h:25
TypesDefinitions.h
Plik zawiera definicje podstawowych typów zmiennych.
sw::FileHeader::RootChunkOffset
Size RootChunkOffset
First chunk in file.
Definition:
FileHeader.h:24
sw::FileHeader::LetterShortcut
char LetterShortcut[3]
Header.
Definition:
FileHeader.h:21
sw::FileHeader::FileSize
Size FileSize
Size including header.
Definition:
FileHeader.h:23
Version
Standard version structure.
Definition:
Version.h:17
sw::FileHeader
Hierarchical Chunked Format file header.
Definition:
FileHeader.h:19
Generated on Thu May 31 2018 19:56:00 for Sleeping Wombat Common Library by
1.8.9.1