OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimAigDataFileHeader.cpp
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: Garrett Potts (gpotts@imagelinks.com)
6 //
7 //*******************************************************************
8 // $Id: ossimAigDataFileHeader.cpp 9963 2006-11-28 21:11:01Z gpotts $
10 #include <ossim/base/ossimEndian.h>
11 
13 {
14  ossimEndian endian;
15  ossim_uint32 tempInt;
16 
18  {
19  out.write((char*)theMagicNumber, 8);
20  out.write((char*)theZeroFill1, 16);
21  tempInt = theFileSize;
22  endian.swap(tempInt);
23  out.write((char*)(&tempInt), 4);
24  out.write((char*)theZeroFill2, 72);
25  }
26  else
27  {
28  out.write((char*)theMagicNumber, 8);
29  out.write((char*)theZeroFill1, 16);
30  out.write((char*)(&theFileSize), 8);
31  out.write((char*)theZeroFill2, 72);
32  }
33 
34  return out.good();
35 }
unsigned int ossim_uint32
bool writeStream(std::ostream &out) const
ossimByteOrder getSystemEndianType() const
Definition: ossimEndian.h:78
void swap(ossim_sint8 &)
Definition: ossimEndian.h:26
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23