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

This is the elevation database registry. More...

#include <ossimElevationDatabaseRegistry.h>

Inheritance diagram for ossimElevationDatabaseRegistry:
ossimFactoryListInterface< ossimElevationDatabaseFactoryBase, ossimElevationDatabase >

Public Member Functions

 ossimElevationDatabaseRegistry ()
 
void getTypeNameList (std::vector< ossimString > &typeList) const
 
ossimElevationDatabasecreateDatabase (const ossimString &typeName) const
 
ossimElevationDatabasecreateDatabase (const ossimKeywordlist &kwl, const char *prefix=0) const
 
ossimElevationDatabaseopen (const ossimString &connectionString)
 
- Public Member Functions inherited from ossimFactoryListInterface< ossimElevationDatabaseFactoryBase, ossimElevationDatabase >
 ossimFactoryListInterface ()
 
void addFactory (ossimElevationDatabaseFactoryBase *factory)
 This is for backward compatability and calls registerFactory for simple adds. More...
 
bool isFactoryRegistered (ossimElevationDatabaseFactoryBase *factory) const
 Public access method to determine if a factory is already registered to this list. More...
 
void registerFactory (ossimElevationDatabaseFactoryBase *factory, bool pushToFrontFlag=false)
 Will register a factory to the factory list. More...
 
void unregisterFactory (ossimElevationDatabaseFactoryBase *factory)
 Will remove the factory from the registry. More...
 
void unregisterFactory (const ossimString &factoryTypeName)
 Will remove the factory from the registry by name. More...
 
void unregisterAllFactories ()
 Will remove all factories from the registry. More...
 
void registerFactoryToFront (ossimElevationDatabaseFactoryBase *factory)
 Inserts the factory to the front of the list. More...
 
void registerFactoryBefore (ossimElevationDatabaseFactoryBase *factory, ossimElevationDatabaseFactoryBase *beforeThisFactory)
 Will insert the factory before the beforeThisFactory. More...
 
void getAllTypeNamesFromRegistry (std::vector< ossimString > &typeList) const
 Will add all object types the factories can allocate. More...
 
ossimObjectcreateObjectFromRegistry (const ossimString &typeName) const
 This is the base object return for all objects in the system. More...
 
ossimObjectcreateObjectFromRegistry (const ossimKeywordlist &kwl, const char *prefix=0) const
 This is the base object return for all objects in the system. More...
 
ossimElevationDatabasecreateNativeObjectFromRegistry (const ossimString &typeName) const
 This is a helper method that calls the createObject and makes sure that the returned object is of the NativeType base type this registry supports. More...
 
ossimElevationDatabasecreateNativeObjectFromRegistry (const ossimKeywordlist &kwl, const char *prefix=0) const
 This is a helper method that calls the createObject and makes sure that the returned object is of the NativeType base type this registry supports. More...
 

Static Public Member Functions

static ossimElevationDatabaseRegistryinstance ()
 

Static Protected Attributes

static ossimElevationDatabaseRegistrym_instance = 0
 

Additional Inherited Members

- Public Types inherited from ossimFactoryListInterface< ossimElevationDatabaseFactoryBase, ossimElevationDatabase >
typedef std::vector< ossimElevationDatabaseFactoryBase *> FactoryListType
 
typedef ossimElevationDatabaseFactoryBase FactoryType
 
typedef ossimElevationDatabase NativeReturnType
 
- Protected Member Functions inherited from ossimFactoryListInterface< ossimElevationDatabaseFactoryBase, ossimElevationDatabase >
bool findFactory (ossimElevationDatabaseFactoryBase *factory) const
 Utility to find a factory in the list. More...
 
- Protected Attributes inherited from ossimFactoryListInterface< ossimElevationDatabaseFactoryBase, ossimElevationDatabase >
std::mutex m_factoryListMutex
 
FactoryListType m_factoryList
 

Detailed Description

This is the elevation database registry.

See also
ossimElevationDatabaseFactory for more details on the factories supported within the ossim core.

Definition at line 14 of file ossimElevationDatabaseRegistry.h.

Constructor & Destructor Documentation

◆ ossimElevationDatabaseRegistry()

ossimElevationDatabaseRegistry::ossimElevationDatabaseRegistry ( )
inline

Definition at line 18 of file ossimElevationDatabaseRegistry.h.

Referenced by instance().

19  {
20  m_instance = 0;
21  }
static ossimElevationDatabaseRegistry * m_instance

Member Function Documentation

◆ createDatabase() [1/2]

ossimElevationDatabase * ossimElevationDatabaseRegistry::createDatabase ( const ossimString typeName) const
Parameters
typeNameis the type name of the database you wish to create
Returns
the elevation database or null otherwise

Definition at line 18 of file ossimElevationDatabaseRegistry.cpp.

References ossimFactoryListInterface< ossimElevationDatabaseFactoryBase, ossimElevationDatabase >::m_factoryList.

19 {
20  ossimElevationDatabase* result = 0;
21  ossim_uint32 idx = 0;
22  for(;((idx < m_factoryList.size())&&!result); ++idx)
23  {
24  result = m_factoryList[idx]->createDatabase(typeName);
25  }
26 
27  return result;
28 
29 }
unsigned int ossim_uint32

◆ createDatabase() [2/2]

ossimElevationDatabase * ossimElevationDatabaseRegistry::createDatabase ( const ossimKeywordlist kwl,
const char *  prefix = 0 
) const
Parameters
kwlkewyord list that has state information about how to create a database
prefixprefix key to use when loading the state information.
Returns
the elevation database or null otherwise

Definition at line 30 of file ossimElevationDatabaseRegistry.cpp.

References ossimFactoryListInterface< ossimElevationDatabaseFactoryBase, ossimElevationDatabase >::m_factoryList.

32 {
33  ossimElevationDatabase* result = 0;
34  ossim_uint32 idx = 0;
35  for(;((idx < m_factoryList.size())&&!result); ++idx)
36  {
37  result = m_factoryList[idx]->createDatabase(kwl, prefix);
38  }
39 
40  return result;
41 }
unsigned int ossim_uint32

◆ getTypeNameList()

void ossimElevationDatabaseRegistry::getTypeNameList ( std::vector< ossimString > &  typeList) const
inline

Definition at line 23 of file ossimElevationDatabaseRegistry.h.

References ossimFactoryListInterface< T, NativeType >::getAllTypeNamesFromRegistry().

24  {
26  }
void getAllTypeNamesFromRegistry(std::vector< ossimString > &typeList) const
Will add all object types the factories can allocate.

◆ instance()

ossimElevationDatabaseRegistry * ossimElevationDatabaseRegistry::instance ( )
static

◆ open()

ossimElevationDatabase * ossimElevationDatabaseRegistry::open ( const ossimString connectionString)
Parameters
connectionStringused to determine which database can support that connection.
Returns
the elevation database or null otherwise

Definition at line 43 of file ossimElevationDatabaseRegistry.cpp.

References ossimFactoryListInterface< ossimElevationDatabaseFactoryBase, ossimElevationDatabase >::m_factoryList.

Referenced by ossimElevManager::getCellsForBounds(), and ossimElevManager::loadElevationPath().

44 {
45  ossimElevationDatabase* result = 0;
46  ossim_uint32 idx = 0;
47  for(;((idx < m_factoryList.size())&&!result); ++idx)
48  {
49  result = m_factoryList[idx]->open(connectionString);
50  }
51 
52  return result;
53 }
unsigned int ossim_uint32

Member Data Documentation

◆ m_instance

ossimElevationDatabaseRegistry * ossimElevationDatabaseRegistry::m_instance = 0
staticprotected

Definition at line 51 of file ossimElevationDatabaseRegistry.h.

Referenced by instance().


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