forked from ossimlabs/ossim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathossimAigDataFileHeader.cpp
More file actions
35 lines (32 loc) · 1.01 KB
/
Copy pathossimAigDataFileHeader.cpp
File metadata and controls
35 lines (32 loc) · 1.01 KB
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
33
34
35
//*******************************************************************
//
// License: See top level LICENSE.txt file.
//
// Author: Garrett Potts (gpotts@imagelinks.com)
//
//*******************************************************************
// $Id: ossimAigDataFileHeader.cpp 9963 2006-11-28 21:11:01Z gpotts $
#include <ossim/support_data/ossimAigDataFileHeader.h>
#include <ossim/base/ossimEndian.h>
bool ossimAigDataFileHeader::writeStream(std::ostream& out)const
{
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*)theMagicNumber, 8);
out.write((char*)theZeroFill1, 16);
out.write((char*)(&theFileSize), 8);
out.write((char*)theZeroFill2, 72);
}
return out.good();
}