GeoTessCPP  2.0.0
Software to facilitate storage and retrieval of 3D information about the Earth.
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines
include/InterpolatorType.h
Go to the documentation of this file.
00001 //- ****************************************************************************
00002 //- 
00003 //- Copyright 2009 Sandia Corporation. Under the terms of Contract
00004 //- DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government
00005 //- retains certain rights in this software.
00006 //- 
00007 //- BSD Open Source License.
00008 //- All rights reserved.
00009 //- 
00010 //- Redistribution and use in source and binary forms, with or without
00011 //- modification, are permitted provided that the following conditions are met:
00012 //- 
00013 //-    * Redistributions of source code must retain the above copyright notice,
00014 //-      this list of conditions and the following disclaimer.
00015 //-    * Redistributions in binary form must reproduce the above copyright
00016 //-      notice, this list of conditions and the following disclaimer in the
00017 //-      documentation and/or other materials provided with the distribution.
00018 //-    * Neither the name of Sandia National Laboratories nor the names of its
00019 //-      contributors may be used to endorse or promote products derived from
00020 //-      this software without specific prior written permission.
00021 //- 
00022 //- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00023 //- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00024 //- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00025 //- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
00026 //- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00027 //- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00028 //- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00029 //- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00030 //- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00031 //- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00032 //- POSSIBILITY OF SUCH DAMAGE.
00033 //-
00034 //- ****************************************************************************
00035 
00036 #ifndef INTERPOLATORTYPE_OBJECT_H
00037 #define INTERPOLATORTYPE_OBJECT_H
00038 
00039 // **** _SYSTEM INCLUDES_ ******************************************************
00040 
00041 #include <iostream>
00042 #include <string>
00043 
00044 // use standard library objects
00045 using namespace std;
00046 
00047 // **** _LOCAL INCLUDES_ *******************************************************
00048 
00049 #include "EnumType.h"
00050 
00051 // **** _BEGIN GEOTESS NAMESPACE_ **********************************************
00052 
00053 namespace geotess {
00054 
00055 // **** _FORWARD REFERENCES_ ***************************************************
00056 
00057 // **** _CLASS DEFINITION_ *****************************************************
00058 
00071 class GEOTESS_EXP_IMP InterpolatorType : public EnumType
00072 {
00073         private:
00074 
00078                                                                                                                                                 InterpolatorType() : EnumType() {}
00079 
00083                                                                 InterpolatorType(const InterpolatorType& it) : EnumType(it) {}
00084 
00088                 InterpolatorType&                                                               operator=(const InterpolatorType& it)
00089                                                                                                                                                 { return *this; };
00090 
00094                 static const int                                                                aSize;
00095 
00100                 static inline int                                                               nextOrdinal ()
00101                                                                                                                                                 { static int firstOrdinal = 0;
00102                                                                                                                                                         return firstOrdinal++; };
00103 
00109                                                                                                                                                 InterpolatorType (const string& name) :
00110                                                                                                                                                 EnumType(name, nextOrdinal()) {};
00111 
00112         public:
00113 
00114 //              /**
00115 //               * Assignment Operator.
00116 //               */
00117 //              InterpolatorType& InterpolatorType::operator=(const InterpolatorType& it)
00118 //              {
00119 //                      EnumType::operator=(it);
00120 //
00121 //                      return *this;
00122 //              }
00123 
00127                 static const InterpolatorType           LINEAR;
00128                 static const InterpolatorType           NATURAL_NEIGHBOR;
00129                 static const InterpolatorType           CUBIC_SPLINE;
00130 
00134                 static const InterpolatorType*  aArray[];
00135 
00139                 virtual                                                                                                 ~InterpolatorType() {};
00140 
00148                 static const InterpolatorType*  valueOf(const string& s)
00149                 { return (const InterpolatorType*) EnumType::valueOf(s, (EnumType const* const* const) aArray, aSize); };
00150 
00154                 static InterpolatorType const* const*   const values() { return aArray; };
00155 
00159                 static int                                                                                      size() { return aSize; };
00160 
00161 }; // end class InterpolatorType
00162 
00163 } // end namespace geotess
00164 
00165 #endif  // INTERPOLATORTYPE_OBJECT_H