OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
The is a factory list interface that allows registries to be accessed in a common way. More...
#include <ossimFactoryListInterface.h>
Public Types | |
typedef std::vector< T * > | FactoryListType |
typedef T | FactoryType |
typedef NativeType | NativeReturnType |
Public Member Functions | |
ossimFactoryListInterface () | |
void | addFactory (T *factory) |
This is for backward compatability and calls registerFactory for simple adds. More... | |
bool | isFactoryRegistered (T *factory) const |
Public access method to determine if a factory is already registered to this list. More... | |
void | registerFactory (T *factory, bool pushToFrontFlag=false) |
Will register a factory to the factory list. More... | |
void | unregisterFactory (T *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 (T *factory) |
Inserts the factory to the front of the list. More... | |
void | registerFactoryBefore (T *factory, T *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... | |
ossimObject * | createObjectFromRegistry (const ossimString &typeName) const |
This is the base object return for all objects in the system. More... | |
ossimObject * | createObjectFromRegistry (const ossimKeywordlist &kwl, const char *prefix=0) const |
This is the base object return for all objects in the system. More... | |
NativeType * | createNativeObjectFromRegistry (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... | |
NativeType * | createNativeObjectFromRegistry (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... | |
Protected Member Functions | |
bool | findFactory (T *factory) const |
Utility to find a factory in the list. More... | |
Protected Attributes | |
std::mutex | m_factoryListMutex |
FactoryListType | m_factoryList |
The is a factory list interface that allows registries to be accessed in a common way.
This is typically used by the Registries. The registries derive from this interface so that it will have the ability to give access to others to add to it's registry:
Pseudo Code:
Definition at line 33 of file ossimFactoryListInterface.h.
typedef std::vector<T*> ossimFactoryListInterface< T, NativeType >::FactoryListType |
Definition at line 36 of file ossimFactoryListInterface.h.
typedef T ossimFactoryListInterface< T, NativeType >::FactoryType |
Definition at line 37 of file ossimFactoryListInterface.h.
typedef NativeType ossimFactoryListInterface< T, NativeType >::NativeReturnType |
Definition at line 38 of file ossimFactoryListInterface.h.
|
inline |
Definition at line 40 of file ossimFactoryListInterface.h.
|
inline |
This is for backward compatability and calls registerFactory for simple adds.
Definition at line 45 of file ossimFactoryListInterface.h.
Referenced by ossimInit::initializeDefaultFactories().
NativeType * ossimFactoryListInterface< T, NativeType >::createNativeObjectFromRegistry | ( | 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.
Definition at line 261 of file ossimFactoryListInterface.h.
Referenced by ossimProjectionFactoryRegistry::createProjection(), and ossim2dTo2dTransformRegistry::createTransform().
NativeType * ossimFactoryListInterface< T, NativeType >::createNativeObjectFromRegistry | ( | 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.
kwl | is a state keywordlist allowing one to instantiate an object defined by a set of name value pairs. It will use the type keyword to create an object of the defined type and then load the state. |
Definition at line 278 of file ossimFactoryListInterface.h.
ossimObject * ossimFactoryListInterface< T, NativeType >::createObjectFromRegistry | ( | const ossimString & | typeName | ) | const |
This is the base object return for all objects in the system.
This is used for backward compatability.
Definition at line 234 of file ossimFactoryListInterface.h.
Referenced by ossimWebRequestFactoryRegistry::createObject(), ossimObjectFactoryRegistry::createObject(), ossim2dTo2dTransformRegistry::createObject(), and ossimProjectionFactoryRegistry::createObject().
ossimObject * ossimFactoryListInterface< T, NativeType >::createObjectFromRegistry | ( | const ossimKeywordlist & | kwl, |
const char * | prefix = 0 |
||
) | const |
This is the base object return for all objects in the system.
This is used for backward compatability.
Definition at line 247 of file ossimFactoryListInterface.h.
|
inlineprotected |
Utility to find a factory in the list.
Definition at line 205 of file ossimFactoryListInterface.h.
Referenced by ossimFactoryListInterface< ossimProjectionFactoryBase, ossimProjection >::isFactoryRegistered(), ossimFactoryListInterface< ossimProjectionFactoryBase, ossimProjection >::registerFactory(), ossimFactoryListInterface< ossimProjectionFactoryBase, ossimProjection >::registerFactoryBefore(), and ossimFactoryListInterface< ossimProjectionFactoryBase, ossimProjection >::registerFactoryToFront().
void ossimFactoryListInterface< T, NativeType >::getAllTypeNamesFromRegistry | ( | std::vector< ossimString > & | typeList | ) | const |
Will add all object types the factories can allocate.
Typically a list of classnames are returned
Definition at line 224 of file ossimFactoryListInterface.h.
Referenced by ossimElevationDatabaseRegistry::getTypeNameList(), ossimObjectFactoryRegistry::getTypeNameList(), ossimWebRequestFactoryRegistry::getTypeNameList(), ossimImageGeometryRegistry::getTypeNameList(), ossimProjectionFactoryRegistry::getTypeNameList(), and ossim2dTo2dTransformRegistry::getTypeNameList().
|
inline |
Public access method to determine if a factory is already registered to this list.
Definition at line 54 of file ossimFactoryListInterface.h.
|
inline |
Will register a factory to the factory list.
Will append the passed in factory if not already registered to the list.
Definition at line 66 of file ossimFactoryListInterface.h.
Referenced by ossimFactoryListInterface< ossimProjectionFactoryBase, ossimProjection >::addFactory(), ossimInit::initializeDefaultFactories(), ossimCodecFactoryRegistry::instance(), ossimElevationDatabaseRegistry::instance(), ossimImageGeometryRegistry::instance(), ossimImageWriterFactory::instance(), ossim2dTo2dTransformRegistry::instance(), ossimImageWriterFactoryRegistry::instance(), ossimOverviewBuilderFactoryRegistry::instance(), ossimImageHandlerRegistry::ossimImageHandlerRegistry(), ossimImageMetaDataWriterRegistry::ossimImageMetaDataWriterRegistry(), ossimProjectionFactoryRegistry::ossimProjectionFactoryRegistry(), and ossimSharedLibraryInitialize().
|
inline |
Will insert the factory before the beforeThisFactory.
If not found it will do a simple append.
Definition at line 146 of file ossimFactoryListInterface.h.
|
inline |
Inserts the factory to the front of the list.
Definition at line 133 of file ossimFactoryListInterface.h.
Referenced by ossimSharedLibraryInitialize().
|
inline |
Will remove all factories from the registry.
Definition at line 124 of file ossimFactoryListInterface.h.
|
inline |
Will remove the factory from the registry.
Definition at line 85 of file ossimFactoryListInterface.h.
Referenced by ossimSharedLibraryFinalize(), ATP::ossimAtpToolFactory::~ossimAtpToolFactory(), ossimDemToolFactory::~ossimDemToolFactory(), ossimImageMetaDataWriterRegistry::~ossimImageMetaDataWriterRegistry(), ossimImageSourceFactory::~ossimImageSourceFactory(), ossimPotraceToolFactory::~ossimPotraceToolFactory(), ossimRegToolFactory::~ossimRegToolFactory(), and ossimToolFactory::~ossimToolFactory().
|
inline |
Will remove the factory from the registry by name.
factoryTypeName | The class name of the factory, (e.g. "ossimCsmProjectionFactory") |
Definition at line 103 of file ossimFactoryListInterface.h.
|
protected |
Definition at line 220 of file ossimFactoryListInterface.h.
Referenced by ossimFactoryListInterface< ossimProjectionFactoryBase, ossimProjection >::findFactory(), ossimFactoryListInterface< ossimProjectionFactoryBase, ossimProjection >::registerFactory(), ossimFactoryListInterface< ossimProjectionFactoryBase, ossimProjection >::registerFactoryBefore(), ossimFactoryListInterface< ossimProjectionFactoryBase, ossimProjection >::registerFactoryToFront(), ossimFactoryListInterface< ossimProjectionFactoryBase, ossimProjection >::unregisterAllFactories(), and ossimFactoryListInterface< ossimProjectionFactoryBase, ossimProjection >::unregisterFactory().
|
mutableprotected |
Definition at line 219 of file ossimFactoryListInterface.h.
Referenced by ossimFactoryListInterface< ossimProjectionFactoryBase, ossimProjection >::isFactoryRegistered(), ossimFactoryListInterface< ossimProjectionFactoryBase, ossimProjection >::registerFactory(), ossimFactoryListInterface< ossimProjectionFactoryBase, ossimProjection >::registerFactoryBefore(), ossimFactoryListInterface< ossimProjectionFactoryBase, ossimProjection >::registerFactoryToFront(), ossimFactoryListInterface< ossimProjectionFactoryBase, ossimProjection >::unregisterAllFactories(), and ossimFactoryListInterface< ossimProjectionFactoryBase, ossimProjection >::unregisterFactory().