OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimAigBounds.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: ossimAigBounds.cpp 9963 2006-11-28 21:11:01Z gpotts $
9 
10 #include <ostream>
12 #include <ossim/base/ossimEndian.h>
13 
15 {
16  out << "ll_x: " << data.ll_x << std::endl
17  << "ll_y: " << data.ll_y << std::endl
18  << "ur_x: " << data.ur_x << std::endl
19  << "ur_y: " << data.ur_y;
20 
21  return out;
22 }
23 
25 {
26  reset();
27 }
28 
30 {
31  ll_x = 0.0;
32  ll_y = 0.0;
33  ur_x = 0.0;
34  ur_y = 0.0;
35 }
36 
38 {
39  ossimEndian endian;
40  double tempDouble;
41 
43  {
44  tempDouble = ll_x;
45  endian.swap(tempDouble);
46  out.write((char*)(&tempDouble), 8);
47 
48  tempDouble = ll_y;
49  endian.swap(tempDouble);
50  out.write((char*)(&tempDouble), 8);
51 
52  tempDouble = ur_x;
53  endian.swap(tempDouble);
54  out.write((char*)(&tempDouble), 8);
55 
56  tempDouble = ur_y;
57  endian.swap(tempDouble);
58  out.write((char*)(&tempDouble), 8);
59  }
60  else
61  {
62  out.write((char*)(&ll_x), 8);
63  out.write((char*)(&ll_y), 8);
64  out.write((char*)(&ur_x), 8);
65  out.write((char*)(&ur_y), 8);
66  }
67 
68  return out.good();
69 }
std::ostream & operator<<(std::ostream &out, const ossimAigBounds &data)
bool writeStream(std::ostream &out)
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