LibCorr3D 2.2
All Classes Namespaces Files Functions
LibCorr3DGrid.h
Go to the documentation of this file.
1//- ****************************************************************************
2//-
3//- Copyright 2009 Sandia Corporation. Under the terms of Contract
4//- DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government
5//- retains certain rights in this software.
6//-
7//- BSD Open Source License.
8//- All rights reserved.
9//-
10//- Redistribution and use in source and binary forms, with or without
11//- modification, are permitted provided that the following conditions are met:
12//-
13//- * Redistributions of source code must retain the above copyright notice,
14//- this list of conditions and the following disclaimer.
15//- * Redistributions in binary form must reproduce the above copyright
16//- notice, this list of conditions and the following disclaimer in the
17//- documentation and/or other materials provided with the distribution.
18//- * Neither the name of Sandia National Laboratories nor the names of its
19//- contributors may be used to endorse or promote products derived from
20//- this software without specific prior written permission.
21//-
22//- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23//- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24//- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25//- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
26//- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27//- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28//- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29//- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30//- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31//- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32//- POSSIBILITY OF SUCH DAMAGE.
33//-
34//- ****************************************************************************
35
36#ifndef LIBCORR3DGRID_OBJECT_H
37#define LIBCORR3DGRID_OBJECT_H
38
39// **** _SYSTEM INCLUDES_ ******************************************************
40
41#include <iostream>
42#include <string>
43#include <fstream>
44#include <vector>
45#include <map>
46
47// use standard library objects
48using namespace std;
49
50// **** _LOCAL INCLUDES_ *******************************************************
51
52#include "CPPUtils.h"
53#include "GeoTessUtils.h"
54#include "GeoTessException.h"
55#include "GeoTessGrid.h"
56
57// **** _BEGIN GEOTESS NAMESPACE_ **********************************************
58
59namespace geotess
60{
61
62// **** _FORWARD REFERENCES_ ***************************************************
63
64class GeoTessMetaData;
65class IFStreamBinary;
66
67// **** _CLASS DEFINITION_ *****************************************************
68
77class GEOTESS_EXP_IMP LibCorr3DGrid: public GeoTessGrid
78{
79private:
80
84 string gDescription;
85 string gParameters;
86 string gComments;
87
88protected:
89
93 virtual GeoTessGrid* loadGridBinary(IFStreamBinary& ifs);
94
95public:
96
103 LibCorr3DGrid(const string& fileName, const string& gridID);
104
108 virtual ~LibCorr3DGrid() { }
109
122 virtual LONG_INT getMemory()
123 {
124 LONG_INT memory = (LONG_INT)(sizeof(LibCorr3DGrid)-sizeof(GeoTessGrid));
125
126 memory += GeoTessGrid::getMemory();
127
128 memory += (LONG_INT) (gDescription.length() + gParameters.length() + gComments.length());
129
130 return memory;
131 }
132
136 const string& getDescription() const
137 {
138 return gDescription;
139 }
140
144 const string& getParameters() const
145 {
146 return gParameters;
147 }
148
152 const string& getComments() const
153 {
154 return gComments;
155 }
156
157};
158// end class LibCorr3DGrid
159
160}// end namespace geotess
161
162#endif // LIBCORR3DGRID_OBJECT_H
Definition: LibCorr3D.h:62
This is a LibCorr3D extension of the GeoTessGrid object for use by LibCorr3D.
Definition: LibCorr3DGrid.h:78
const string & getParameters() const
Return tessellation parameters string.
Definition: LibCorr3DGrid.h:144
virtual GeoTessGrid * loadGridBinary(IFStreamBinary &ifs)
Builds this grid from the contents of the input binary file stream.
LibCorr3DGrid(const string &fileName, const string &gridID)
Parameterized constructor.
const string & getDescription() const
Return tessellation description.
Definition: LibCorr3DGrid.h:136
virtual LONG_INT getMemory()
Return the amount of memory currently occupied by all of the LibCorr3DModel objects NOT INCLUDING THE...
Definition: LibCorr3DGrid.h:122
virtual ~LibCorr3DGrid()
Destructor.
Definition: LibCorr3DGrid.h:108
const string & getComments() const
Return tessellation comments string.
Definition: LibCorr3DGrid.h:152