OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Public Attributes | Friends | List of all members
ossimAigIndexFileHeader Class Reference

#include <ossimAigIndexFileHeader.h>

Public Member Functions

 ossimAigIndexFileHeader ()
 
void reset ()
 
bool writeStream (std::ostream &out)
 

Public Attributes

ossim_uint8 theMagicNumber [8]
 
ossim_uint8 theZeroFill1 [16]
 
ossim_int32 theFileSize
 
ossim_uint8 theZeroFill2 [72]
 

Friends

std::ostream & operator<< (std::ostream &out, const ossimAigIndexFileHeader &data)
 

Detailed Description

Definition at line 15 of file ossimAigIndexFileHeader.h.

Constructor & Destructor Documentation

◆ ossimAigIndexFileHeader()

ossimAigIndexFileHeader::ossimAigIndexFileHeader ( )
inline

Definition at line 24 of file ossimAigIndexFileHeader.h.

References reset().

25  {
26  reset();
27  }

Member Function Documentation

◆ reset()

void ossimAigIndexFileHeader::reset ( void  )
inline

Definition at line 28 of file ossimAigIndexFileHeader.h.

References theFileSize, theMagicNumber, theZeroFill1, and theZeroFill2.

Referenced by ossimAigIndexFileHeader().

29  {
30  theMagicNumber[0] = 0x00;
31  theMagicNumber[1] = 0x00;
32  theMagicNumber[2] = 0x27;
33  theMagicNumber[3] = 0x0A;
34  theMagicNumber[4] = 0xFF;
35  theMagicNumber[5] = 0xFF;
36  theMagicNumber[6] = 0xFC;
37  theMagicNumber[7] = 0x14;
38  memset((char*)theZeroFill1,
39  0x00,
40  16);
41  memset((char*)theZeroFill2,
42  0x00,
43  72);
44  theFileSize = 50;
45  }

◆ writeStream()

bool ossimAigIndexFileHeader::writeStream ( std::ostream &  out)

Definition at line 12 of file ossimAigIndexFileHeader.cpp.

References ossimEndian::getSystemEndianType(), OSSIM_LITTLE_ENDIAN, ossimEndian::swap(), theFileSize, theMagicNumber, theZeroFill1, and theZeroFill2.

Referenced by ossimArcInfoGridWriter::writeFile().

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*)(&theFileSize), 8);
29  }
30 
31  return out.good();
32 }
unsigned int ossim_uint32
ossimByteOrder getSystemEndianType() const
Definition: ossimEndian.h:78
void swap(ossim_sint8 &)
Definition: ossimEndian.h:26

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const ossimAigIndexFileHeader data 
)
friend

Definition at line 18 of file ossimAigIndexFileHeader.h.

19  {
20  out << "theFileSize: " << data.theFileSize;
21 
22  return out;
23  }

Member Data Documentation

◆ theFileSize

ossim_int32 ossimAigIndexFileHeader::theFileSize

The size of this file in number of shorts.

Definition at line 54 of file ossimAigIndexFileHeader.h.

Referenced by reset(), ossimArcInfoGridWriter::writeFile(), and writeStream().

◆ theMagicNumber

ossim_uint8 ossimAigIndexFileHeader::theMagicNumber[8]

Definition at line 48 of file ossimAigIndexFileHeader.h.

Referenced by reset(), and writeStream().

◆ theZeroFill1

ossim_uint8 ossimAigIndexFileHeader::theZeroFill1[16]

Definition at line 50 of file ossimAigIndexFileHeader.h.

Referenced by reset(), and writeStream().

◆ theZeroFill2

ossim_uint8 ossimAigIndexFileHeader::theZeroFill2[72]

Definition at line 56 of file ossimAigIndexFileHeader.h.

Referenced by reset(), and writeStream().


The documentation for this class was generated from the following files: