OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
ossimUnitTypeLut Class Reference

#include <ossimUnitTypeLut.h>

Inheritance diagram for ossimUnitTypeLut:
ossimLookUpTable

Public Member Functions

virtual ~ossimUnitTypeLut ()
 
virtual ossim_int32 getEntryNumber (const char *entry_string, bool case_insensitive=true) const
 
virtual ossim_int32 getEntryNumber (const ossimKeywordlist &kwl, const char *prefix=0, bool case_insensitive=true) const
 
virtual ossimKeyword getKeyword () const
 
- Public Member Functions inherited from ossimLookUpTable
 ossimLookUpTable (const std::initializer_list< ossimString > &stringInitializer)
 By default if you just give an initializer list with strings then it will assume keys 0..n-1 for each string. More...
 
virtual ~ossimLookUpTable ()
 
virtual ossimString getEntryString (ossim_int32 entry_number) const
 
virtual ossimString getTableIndexString (ossim_uint32 table_index) const
 
virtual ossimString operator[] (ossim_int32 entry_number) const
 
virtual ossimString getEntryString (const ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual ossim_uint32 getTableSize () const
 
void dumpValues (std::ostream &out) const
 

Static Public Member Functions

static ossimUnitTypeLutinstance ()
 Returns the static instance of an ossimUnitTypeLut object. More...
 

Protected Member Functions

 ossimUnitTypeLut ()
 
- Protected Member Functions inherited from ossimLookUpTable
 ossimLookUpTable (ossim_int32 table_size)
 
 ossimLookUpTable ()
 

Additional Inherited Members

- Public Types inherited from ossimLookUpTable
enum  { NOT_FOUND = -1 }
 
- Protected Attributes inherited from ossimLookUpTable
std::vector< ossimKeyValueMaptheTable
 

Detailed Description

Definition at line 16 of file ossimUnitTypeLut.h.

Constructor & Destructor Documentation

◆ ~ossimUnitTypeLut()

ossimUnitTypeLut::~ossimUnitTypeLut ( )
virtual

Definition at line 68 of file ossimUnitTypeLut.cpp.

69 {
70 }

◆ ossimUnitTypeLut()

ossimUnitTypeLut::ossimUnitTypeLut ( )
protected

Definition at line 29 of file ossimUnitTypeLut.cpp.

30  :ossimLookUpTable(TABLE_SIZE)
31 {
32  theTable[0].theKey = OSSIM_UNIT_UNKNOWN;
33  theTable[0].theValue = "unknown";
34  theTable[1].theKey = OSSIM_METERS;
35  theTable[1].theValue = "meters";
36  theTable[2].theKey = OSSIM_FEET;
37  theTable[2].theValue = "feet";
38  theTable[3].theKey = OSSIM_US_SURVEY_FEET;
39  theTable[3].theValue = "us_survey_feet";
40  theTable[4].theKey = OSSIM_DEGREES;
41  theTable[4].theValue = "degrees";
42  theTable[5].theKey = OSSIM_RADIANS;
43  theTable[5].theValue = "radians";
44  theTable[6].theKey = OSSIM_NAUTICAL_MILES;
45  theTable[6].theValue = "nautical_miles";
46  theTable[7].theKey = OSSIM_SECONDS;
47  theTable[7].theValue = "seconds";
48  theTable[8].theKey = OSSIM_MINUTES;
49  theTable[8].theValue = "minutes";
50  theTable[9].theKey = OSSIM_PIXEL;
51  theTable[9].theValue = "pixel";
52  theTable[10].theKey = OSSIM_MILES;
53  theTable[10].theValue = "miles";
54  theTable[11].theKey = OSSIM_MILLIMETERS;
55  theTable[11].theValue = "millimeters";
56  theTable[12].theKey = OSSIM_MICRONS;
57  theTable[12].theValue = "microns";
58  theTable[13].theKey = OSSIM_CENTIMETERS;
59  theTable[13].theValue = "centimeters";
60  theTable[14].theKey = OSSIM_YARDS;
61  theTable[14].theValue = "yards";
62  theTable[15].theKey = OSSIM_INCHES;
63  theTable[15].theValue = "inches";
64  theTable[16].theKey = OSSIM_KILOMETERS;
65  theTable[16].theValue = "kilometers";
66 }
std::vector< ossimKeyValueMap > theTable

Member Function Documentation

◆ getEntryNumber() [1/2]

ossim_int32 ossimUnitTypeLut::getEntryNumber ( const char *  entry_string,
bool  case_insensitive = true 
) const
virtual

Returns the entry number associated with the entry string passed in. Returns OSSIM_UNIT_UNKNOWN if entry string is not in the list. If case_insensitive == true(default), the test is case insensitive; else, the test will be case sensitive.

Reimplemented from ossimLookUpTable.

Definition at line 71 of file ossimUnitTypeLut.cpp.

References ossimLookUpTable::getEntryNumber(), and OSSIM_UNIT_UNKNOWN.

Referenced by ossimTilingRect::loadState(), ossimGeoAnnotationEllipseObject::loadState(), ossimTiling::loadState(), and ossimStatePlaneProjectionInfo::ossimStatePlaneProjectionInfo().

73 {
74  ossim_int32 result
75  = ossimLookUpTable::getEntryNumber(entry_string, case_insensitive);
76  if(result < 0)
77  {
79  }
80 
81  return result;
82 }
virtual ossim_int32 getEntryNumber(const char *entry_string, bool case_insensitive=true) const
int ossim_int32

◆ getEntryNumber() [2/2]

ossim_int32 ossimUnitTypeLut::getEntryNumber ( const ossimKeywordlist kwl,
const char *  prefix = 0,
bool  case_insensitive = true 
) const
virtual

Returns the entry number associated with the lookup table keyword entry in the Keywordlist passed in. Returns NOT_FOUND(-1) if no matching entry. If case_insensitive == true(default), the test is case insensitive; else, the test will be case sensitive.

Reimplemented from ossimLookUpTable.

Definition at line 84 of file ossimUnitTypeLut.cpp.

References ossimLookUpTable::getEntryNumber(), and OSSIM_UNIT_UNKNOWN.

87 {
88  ossim_int32 result =
89  ossimLookUpTable::getEntryNumber(kwl, prefix, case_insensitive);
90  if(result < 0)
91  {
93  }
94  return result;
95 }
virtual ossim_int32 getEntryNumber(const char *entry_string, bool case_insensitive=true) const
int ossim_int32

◆ getKeyword()

ossimKeyword ossimUnitTypeLut::getKeyword ( ) const
virtual

Returns keyword for lookups from a Keywordlist.

Reimplemented from ossimLookUpTable.

Definition at line 97 of file ossimUnitTypeLut.cpp.

References ossimKeywordNames::UNITS_KW.

98 {
100 }
static const char * UNITS_KW

◆ instance()

ossimUnitTypeLut * ossimUnitTypeLut::instance ( )
static

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