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

#include <ossimCodecFactoryRegistry.h>

Inheritance diagram for ossimCodecFactoryRegistry:
ossimFactoryListInterface< ossimCodecFactoryInterface, ossimCodecBase >

Public Member Functions

virtual ~ossimCodecFactoryRegistry ()
 
virtual ossimCodecBasecreateCodec (const ossimString &type) const
 Will loop through all registered factories trying to allocate a codec for the passed in type. More...
 
virtual ossimCodecBasecreateCodec (const ossimKeywordlist &kwl, const char *prefix=0) const
 Will loop through all registered factories trying to allocate a codec for the passed in type in the type keyword of the keywordlist. More...
 
virtual void getTypeNameList (std::vector< ossimString > &typeNames) const
 Loop through all factories and get a list of supported types. More...
 
- Public Member Functions inherited from ossimFactoryListInterface< ossimCodecFactoryInterface, ossimCodecBase >
 ossimFactoryListInterface ()
 
void addFactory (ossimCodecFactoryInterface *factory)
 This is for backward compatability and calls registerFactory for simple adds. More...
 
bool isFactoryRegistered (ossimCodecFactoryInterface *factory) const
 Public access method to determine if a factory is already registered to this list. More...
 
void registerFactory (ossimCodecFactoryInterface *factory, bool pushToFrontFlag=false)
 Will register a factory to the factory list. More...
 
void unregisterFactory (ossimCodecFactoryInterface *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 (ossimCodecFactoryInterface *factory)
 Inserts the factory to the front of the list. More...
 
void registerFactoryBefore (ossimCodecFactoryInterface *factory, ossimCodecFactoryInterface *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...
 
ossimCodecBasecreateNativeObjectFromRegistry (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...
 
ossimCodecBasecreateNativeObjectFromRegistry (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 ossimCodecFactoryRegistryinstance ()
 

Private Member Functions

 ossimCodecFactoryRegistry ()
 hidden from use default constructor More...
 
 ossimCodecFactoryRegistry (const ossimCodecFactoryRegistry &obj)
 hidden from use copy constructor More...
 
const ossimCodecFactoryRegistryoperator= (const ossimCodecFactoryRegistry &rhs)
 hidden from use operator = More...
 

Static Private Attributes

static ossimCodecFactoryRegistrym_instance =0
 

Additional Inherited Members

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

Detailed Description

Definition at line 7 of file ossimCodecFactoryRegistry.h.

Constructor & Destructor Documentation

◆ ~ossimCodecFactoryRegistry()

ossimCodecFactoryRegistry::~ossimCodecFactoryRegistry ( )
virtual

Definition at line 35 of file ossimCodecFactoryRegistry.cpp.

References m_instance.

36 {
37  m_instance = 0;
38 }
static ossimCodecFactoryRegistry * m_instance

◆ ossimCodecFactoryRegistry() [1/2]

ossimCodecFactoryRegistry::ossimCodecFactoryRegistry ( )
private

hidden from use default constructor

Definition at line 7 of file ossimCodecFactoryRegistry.cpp.

References m_instance.

Referenced by instance().

8 {
9  m_instance = this;
10 }
static ossimCodecFactoryRegistry * m_instance

◆ ossimCodecFactoryRegistry() [2/2]

ossimCodecFactoryRegistry::ossimCodecFactoryRegistry ( const ossimCodecFactoryRegistry obj)
private

hidden from use copy constructor

Definition at line 13 of file ossimCodecFactoryRegistry.cpp.

References m_instance.

14 {
15  m_instance = this;
16 }
static ossimCodecFactoryRegistry * m_instance

Member Function Documentation

◆ createCodec() [1/2]

ossimCodecBase * ossimCodecFactoryRegistry::createCodec ( const ossimString type) const
virtual

Will loop through all registered factories trying to allocate a codec for the passed in type.

Parameters
intype. Type of Codec to allocate.
Returns
ossimCodecBase. Newly allocated Codec

Definition at line 41 of file ossimCodecFactoryRegistry.cpp.

References ossimFactoryListInterface< ossimCodecFactoryInterface, ossimCodecBase >::createNativeObjectFromRegistry().

Referenced by ossimNitfCodecFactory::createCodec(), and ossimGpkgWriter::initializeCodec().

42 {
43  return createNativeObjectFromRegistry(type);
44 }
ossimCodecBase * createNativeObjectFromRegistry(const ossimString &typeName) const
This is a helper method that calls the createObject and makes sure that the returned object is of the...

◆ createCodec() [2/2]

ossimCodecBase * ossimCodecFactoryRegistry::createCodec ( const ossimKeywordlist kwl,
const char *  prefix = 0 
) const
virtual

Will loop through all registered factories trying to allocate a codec for the passed in type in the type keyword of the keywordlist.

Parameters
inkwl. State infromation to load when allocating the codec
inprefix. prefix value for all keys
Returns
ossimCodecBase. Newly allocated codec

Definition at line 46 of file ossimCodecFactoryRegistry.cpp.

References ossimFactoryListInterface< ossimCodecFactoryInterface, ossimCodecBase >::createNativeObjectFromRegistry().

48 {
49  return createNativeObjectFromRegistry(kwl, prefix);
50 }
ossimCodecBase * createNativeObjectFromRegistry(const ossimString &typeName) const
This is a helper method that calls the createObject and makes sure that the returned object is of the...

◆ getTypeNameList()

void ossimCodecFactoryRegistry::getTypeNameList ( std::vector< ossimString > &  typeNames) const
virtual

Loop through all factories and get a list of supported types.

Parameters
outtypeNames. The resulting typename list. Values will be appended.

Definition at line 52 of file ossimCodecFactoryRegistry.cpp.

References ossimFactoryListInterface< ossimCodecFactoryInterface, ossimCodecBase >::getAllTypeNamesFromRegistry().

53 {
54  getAllTypeNamesFromRegistry(typeNames);
55 }
void getAllTypeNamesFromRegistry(std::vector< ossimString > &typeList) const
Will add all object types the factories can allocate.

◆ instance()

ossimCodecFactoryRegistry * ossimCodecFactoryRegistry::instance ( )
static

◆ operator=()

const ossimCodecFactoryRegistry & ossimCodecFactoryRegistry::operator= ( const ossimCodecFactoryRegistry rhs)
private

hidden from use operator =

Definition at line 19 of file ossimCodecFactoryRegistry.cpp.

20 {
21  return *this;
22 }

Member Data Documentation

◆ m_instance

ossimCodecFactoryRegistry * ossimCodecFactoryRegistry::m_instance =0
staticprivate

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