forked from ossimlabs/ossim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathossimAigIndexFileHeader.cpp
More file actions
32 lines (29 loc) · 906 Bytes
/
Copy pathossimAigIndexFileHeader.cpp
File metadata and controls
32 lines (29 loc) · 906 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//*******************************************************************
//
// License: See top level LICENSE.txt file.
//
// Author: Garrett Potts (gpotts@imagelinks.com)
//
//*******************************************************************
// $Id: ossimAigIndexFileHeader.cpp 9963 2006-11-28 21:11:01Z gpotts $
#include <ossim/support_data/ossimAigIndexFileHeader.h>
#include <ossim/base/ossimEndian.h>
bool ossimAigIndexFileHeader::writeStream(std::ostream& out)
{
ossimEndian endian;
ossim_uint32 tempInt;
if(endian.getSystemEndianType() == OSSIM_LITTLE_ENDIAN)
{
out.write((char*)theMagicNumber, 8);
out.write((char*)theZeroFill1, 16);
tempInt = theFileSize;
endian.swap(tempInt);
out.write((char*)(&tempInt), 4);
out.write((char*)theZeroFill2, 72);
}
else
{
out.write((char*)(&theFileSize), 8);
}
return out.good();
}