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

#include <ossimAnnotationObjectFactory.h>

Inheritance diagram for ossimAnnotationObjectFactory:
ossimFactoryBase< ossimAnnotationObject >

Public Member Functions

virtual ossimAnnotationObjectcreate (const ossimString &spec) const
 
virtual ossimAnnotationObjectcreate (const ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual list< ossimStringgetList () const
 
- Public Member Functions inherited from ossimFactoryBase< ossimAnnotationObject >
void registerFactory (ossimFactoryBase< ossimAnnotationObject > *new_factory)
 

Static Public Member Functions

static ossimAnnotationObjectFactoryinstance ()
 

Protected Member Functions

 ossimAnnotationObjectFactory ()
 
- Protected Member Functions inherited from ossimFactoryBase< ossimAnnotationObject >
 ossimFactoryBase ()
 
virtual ~ossimFactoryBase ()
 

Static Protected Attributes

static ossimAnnotationObjectFactorytheInstance =NULL
 

Additional Inherited Members

- Protected Attributes inherited from ossimFactoryBase< ossimAnnotationObject >
std::list< ossimFactoryBase< ossimAnnotationObject > *> theRegistry
 

Detailed Description

Definition at line 14 of file ossimAnnotationObjectFactory.h.

Constructor & Destructor Documentation

◆ ossimAnnotationObjectFactory()

ossimAnnotationObjectFactory::ossimAnnotationObjectFactory ( )
protected

Member Function Documentation

◆ create() [1/2]

ossimAnnotationObject * ossimAnnotationObjectFactory::create ( const ossimString spec) const
virtual

METHOD: create() Attempts to create an instance of the Product given a Specifier or keywordlist. Returns successfully constructed product or NULL.

Implements ossimFactoryBase< ossimAnnotationObject >.

Definition at line 24 of file ossimAnnotationObjectFactory.cpp.

References STATIC_TYPE_NAME.

Referenced by create().

◆ create() [2/2]

ossimAnnotationObject * ossimAnnotationObjectFactory::create ( const ossimKeywordlist kwl,
const char *  prefix = 0 
) const
virtual

Implements ossimFactoryBase< ossimAnnotationObject >.

Definition at line 47 of file ossimAnnotationObjectFactory.cpp.

References create(), ossimKeywordlist::find(), ossimAnnotationObject::loadState(), ossimNotify(), and ossimNotifyLevel_WARN.

50 {
51  ossimAnnotationObject* result = NULL;
52 
53  const char* type = kwl.find(prefix, "type");
54  if(type)
55  {
56  result = create(ossimString(type));
57  if(result)
58  {
59  result->loadState(kwl, prefix);
60  }
61  else
62  {
64  << "ossimAnnotationObjectFactory::create WARNING"
65  << "Unable to create object of type: "
66  << type << std::endl;
67  }
68  }
69 
70  return result;
71 }
const char * find(const char *key) const
virtual ossimAnnotationObject * create(const ossimString &spec) const
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ getList()

list< ossimString > ossimAnnotationObjectFactory::getList ( ) const
virtual

METHOD: getList() Returns name list of all products represented by this factory:

Implements ossimFactoryBase< ossimAnnotationObject >.

Definition at line 87 of file ossimAnnotationObjectFactory.cpp.

References ossimFactoryBase< ossimAnnotationObject >::theRegistry.

88 {
89  list<ossimString> rtn_list;
90  list<ossimString> sub_list;
91  list<ossimFactoryBase<ossimAnnotationObject>*>::const_iterator factory;
92 
93  factory = theRegistry.begin();
94  while(factory != theRegistry.end())
95  {
96  sub_list = (*factory)->getList();
97  rtn_list.merge(sub_list);
98  ++factory;
99  }
100 
101  return rtn_list;
102 }
std::list< ossimFactoryBase< ossimAnnotationObject > *> theRegistry

◆ instance()

ossimAnnotationObjectFactory * ossimAnnotationObjectFactory::instance ( )
static

METHOD: instance() For accessing static instance of concrete factory.

Definition at line 73 of file ossimAnnotationObjectFactory.cpp.

References ossimAnnotationObjectFactory(), and theInstance.

Referenced by ossimAnnotationSource::loadState().

74 {
75  if(!theInstance)
76  {
78  }
79 
80  return theInstance;
81 }
static ossimAnnotationObjectFactory * theInstance

Member Data Documentation

◆ theInstance

ossimAnnotationObjectFactory * ossimAnnotationObjectFactory::theInstance =NULL
staticprotected

Definition at line 40 of file ossimAnnotationObjectFactory.h.

Referenced by instance().


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