35 return &sharedInstance;
41 return registerFactory(factory);
48 if(!findFactory(factory))
50 theFactoryList.push_back(factory);
64 vector<ossimObjectFactory*>::iterator iter = theFactoryList.begin();
66 while(iter != theFactoryList.end())
68 if( (*iter) == factory)
70 theFactoryList.erase(iter);
80 unsigned long index = 0;
82 while((index < theFactoryList.size()) &&(!result))
84 result = theFactoryList[index]->createObject(name);
91 const char* prefix)
const 94 unsigned long index = 0;
96 while((index < theFactoryList.size()) &&(!result))
98 result = theFactoryList[index]->createObject(kwl,
108 vector<ossimString> result;
109 vector<ossimObjectFactory*>::const_iterator iter = theFactoryList.begin();
111 while(iter != theFactoryList.end())
114 (*iter)->getTypeNameList(result);
116 typeList.insert(typeList.end(),
125 vector<ossimObjectFactory*>::const_iterator iter = theFactoryList.begin();
127 while(iter != theFactoryList.end())
129 if( (*iter) == factory)
143 vector<ossimString> allTypeList;
145 getTypeNameList(allTypeList);
149 typeList.insert(typeList.end(),
157 for(i = 0; i < (int)allTypeList.size(); ++i)
164 typeList.push_back(allTypeList[i]);
Represents serializable keyword/value map.
static ossimBaseObjectFactory * instance()
static ossimObjectFactoryRegistry * instance()
ossimObjectFactoryRegistry()
RTTI_DEF1(ossimObjectFactoryRegistry, "ossimObjectFactoryRegistry", ossimObject)
void addFactory(ossimObjectFactory *factory)
This is for backward compatability and calls registerFactory for simple adds.
void unregisterFactory(ossimObjectFactory *factory)
Will remove the factory from the registry.
ossimObject * createObject(const ossimString &objectType)
void registerFactory(ossimObjectFactory *factory, bool pushToFrontFlag=false)
Will register a factory to the factory list.
virtual ~ossimObjectFactoryRegistry()
virtual void getTypeNameList(std::vector< ossimString > &typeList) const
virtual ossimObject * createObject(const ossimString &name) const
virtual bool canCastTo(ossimObject *obj) const
bool findFactory(ossimObjectFactory *factory) const
Utility to find a factory in the list.
void * ossimObjectFactoryRegistryGetInstance()