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

#include <ossimPropertyInterfaceRegistry.h>

Inheritance diagram for ossimPropertyInterfaceRegistry:
ossimObjectFactory ossimObject ossimReferenced

Public Member Functions

virtual ~ossimPropertyInterfaceRegistry ()
 
virtual ossimPropertyInterfacecreateInterface (const ossimObject *obj) const
 
virtual ossimObjectcreateObject (const ossimString &typeName) const
 
virtual ossimObjectcreateObject (const ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual void getTypeNameList (std::vector< ossimString > &typeList) const
 
bool addFactory (ossimPropertyInterfaceFactory *factory)
 
bool registerFactory (ossimPropertyInterfaceFactory *factory)
 
- Public Member Functions inherited from ossimObjectFactory
virtual ~ossimObjectFactory ()
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimObjectdup () const
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getDescription () const
 
virtual ossimString getClassName () const
 
virtual RTTItypeid getType () const
 
virtual bool canCastTo (ossimObject *obj) const
 
virtual bool canCastTo (const RTTItypeid &id) const
 
virtual bool canCastTo (const ossimString &parentClassName) const
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 
virtual std::ostream & print (std::ostream &out) const
 Generic print method. More...
 
virtual bool isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
 
virtual void accept (ossimVisitor &visitor)
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 

Static Public Member Functions

static ossimPropertyInterfaceRegistryinstance ()
 

Protected Member Functions

 ossimPropertyInterfaceRegistry ()
 
 ossimPropertyInterfaceRegistry (const ossimPropertyInterfaceRegistry &rhs)
 
void operator= (const ossimPropertyInterfaceRegistry &)
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 

Protected Attributes

vector< ossimPropertyInterfaceFactory * > theFactoryList
 

Static Protected Attributes

static ossimPropertyInterfaceRegistrytheInstance = NULL
 

Detailed Description

Definition at line 13 of file ossimPropertyInterfaceRegistry.h.

Constructor & Destructor Documentation

◆ ~ossimPropertyInterfaceRegistry()

ossimPropertyInterfaceRegistry::~ossimPropertyInterfaceRegistry ( )
virtual

Definition at line 12 of file ossimPropertyInterfaceRegistry.cpp.

13 {
14  theInstance = NULL;
15 }
static ossimPropertyInterfaceRegistry * theInstance

◆ ossimPropertyInterfaceRegistry() [1/2]

ossimPropertyInterfaceRegistry::ossimPropertyInterfaceRegistry ( )
inlineprotected

◆ ossimPropertyInterfaceRegistry() [2/2]

ossimPropertyInterfaceRegistry::ossimPropertyInterfaceRegistry ( const ossimPropertyInterfaceRegistry rhs)
inlineprotected

Definition at line 47 of file ossimPropertyInterfaceRegistry.h.

Member Function Documentation

◆ addFactory()

bool ossimPropertyInterfaceRegistry::addFactory ( ossimPropertyInterfaceFactory factory)

Definition at line 90 of file ossimPropertyInterfaceRegistry.cpp.

91 {
92  return registerFactory(factory);
93 }
bool registerFactory(ossimPropertyInterfaceFactory *factory)

◆ createInterface()

ossimPropertyInterface * ossimPropertyInterfaceRegistry::createInterface ( const ossimObject obj) const
virtual

Definition at line 17 of file ossimPropertyInterfaceRegistry.cpp.

18 {
19  vector<ossimPropertyInterfaceFactory*>::const_iterator i = theFactoryList.begin();
20  ossimPropertyInterface* result = NULL;
21 
22  while ( ( i != theFactoryList.end() ) && ( ! result ) )
23  {
24  result = (*i)->createInterface( obj );
25 
26  ++i;
27  }
28 
29  return result;
30 }
vector< ossimPropertyInterfaceFactory * > theFactoryList

◆ createObject() [1/2]

ossimObject * ossimPropertyInterfaceRegistry::createObject ( const ossimString typeName) const
virtual

Creates an object given a type name.

Implements ossimObjectFactory.

Definition at line 42 of file ossimPropertyInterfaceRegistry.cpp.

43 {
44  ossimObject* result = (ossimObject*)NULL;
45  vector<ossimPropertyInterfaceFactory*>::const_iterator i = theFactoryList.begin();
46 
47  while ( ( i != theFactoryList.end() ) && ( ! result ) )
48  {
49  result = (*i)->createObject(typeName);
50 
51  ++i;
52  }
53 
54  return result;
55 }
vector< ossimPropertyInterfaceFactory * > theFactoryList

◆ createObject() [2/2]

ossimObject * ossimPropertyInterfaceRegistry::createObject ( const ossimKeywordlist kwl,
const char *  prefix = 0 
) const
virtual

Creates and object given a keyword list.

Implements ossimObjectFactory.

Definition at line 57 of file ossimPropertyInterfaceRegistry.cpp.

59 {
60  ossimObject* result = (ossimObject*)NULL;
61  vector<ossimPropertyInterfaceFactory*>::const_iterator i = theFactoryList.begin();
62 
63  while ( ( i != theFactoryList.end() ) && ( ! result ) )
64  {
65  result = (*i)->createObject(kwl, prefix);
66 
67  ++i;
68  }
69 
70  return result;
71 }
vector< ossimPropertyInterfaceFactory * > theFactoryList

◆ getTypeNameList()

void ossimPropertyInterfaceRegistry::getTypeNameList ( std::vector< ossimString > &  typeList) const
virtual

This should return the type name of all objects in all factories. This is the name used to construct the objects dynamially and this name must be unique.

Implements ossimObjectFactory.

Definition at line 73 of file ossimPropertyInterfaceRegistry.cpp.

74 {
75  vector<ossimPropertyInterfaceFactory*>::const_iterator i = theFactoryList.begin();
76 
77  while ( i != theFactoryList.end() )
78  {
79  std::vector<ossimString> tempTypeList;
80 
81  (*i)->getTypeNameList(tempTypeList);
82  typeList.insert(typeList.end(),
83  tempTypeList.begin(),
84  tempTypeList.end());
85  ++i;
86  }
87 
88 }
vector< ossimPropertyInterfaceFactory * > theFactoryList

◆ instance()

ossimPropertyInterfaceRegistry * ossimPropertyInterfaceRegistry::instance ( )
static

Definition at line 32 of file ossimPropertyInterfaceRegistry.cpp.

Referenced by ossimPropertyInterfaceRegistryGetInstance().

33 {
34  if ( !theInstance)
35  {
37  }
38 
39  return theInstance;
40 }
static ossimPropertyInterfaceRegistry * theInstance

◆ operator=()

void ossimPropertyInterfaceRegistry::operator= ( const ossimPropertyInterfaceRegistry )
inlineprotected

Definition at line 50 of file ossimPropertyInterfaceRegistry.h.

50 {}

◆ registerFactory()

bool ossimPropertyInterfaceRegistry::registerFactory ( ossimPropertyInterfaceFactory factory)

Definition at line 95 of file ossimPropertyInterfaceRegistry.cpp.

96 {
97  bool result = false;
98 
99  if ( factory )
100  {
101  theFactoryList.push_back( factory );
102  result = true;
103  }
104 
105  return result;
106 }
vector< ossimPropertyInterfaceFactory * > theFactoryList

Member Data Documentation

◆ theFactoryList

vector<ossimPropertyInterfaceFactory*> ossimPropertyInterfaceRegistry::theFactoryList
protected

Definition at line 52 of file ossimPropertyInterfaceRegistry.h.

◆ theInstance

ossimPropertyInterfaceRegistry * ossimPropertyInterfaceRegistry::theInstance = NULL
staticprotected

Definition at line 51 of file ossimPropertyInterfaceRegistry.h.


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