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
ossimElevCellHandlerFactory Class Reference

#include <ossimElevCellHandlerFactory.h>

Inheritance diagram for ossimElevCellHandlerFactory:
ossimFactoryBase< ossimElevCellHandler >

Public Member Functions

virtual ossimElevCellHandlercreate (const ossimString &) const
 
virtual ossimElevCellHandlercreate (const ossimKeywordlist &kwl, const char *prefix) const
 
virtual std::list< ossimStringgetList () const
 
- Public Member Functions inherited from ossimFactoryBase< ossimElevCellHandler >
void registerFactory (ossimFactoryBase< ossimElevCellHandler > *new_factory)
 

Static Public Member Functions

static ossimElevCellHandlerFactoryinstance ()
 

Protected Member Functions

 ossimElevCellHandlerFactory ()
 
- Protected Member Functions inherited from ossimFactoryBase< ossimElevCellHandler >
 ossimFactoryBase ()
 
virtual ~ossimFactoryBase ()
 

Static Protected Attributes

static ossimElevCellHandlerFactorytheInstance = 0
 

Additional Inherited Members

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

Detailed Description


CLASS: ossimElevCellHandlerFactory

Definition at line 30 of file ossimElevCellHandlerFactory.h.

Constructor & Destructor Documentation

◆ ossimElevCellHandlerFactory()

ossimElevCellHandlerFactory::ossimElevCellHandlerFactory ( )
protected

Definition at line 53 of file ossimElevCellHandlerFactory.cpp.

Referenced by instance().

54 {
55  //***
56  // Add default sub factories to this factory's registry list:
57  // NOTE: DTED handlers are managed by their own ossimDtedManager so should
58  // never be created individually via a factory. This will be the typical
59  // pattern for all but custom DEM files.
60  //***
61 // registerFactory(ossimUsgsDemCellFactory::instance());
62 }

Member Function Documentation

◆ create() [1/2]

ossimElevCellHandler * ossimElevCellHandlerFactory::create ( const ossimString ) const
virtual

METHOD: instance() For accessing static singleton instance of concrete factory. The derived class implementation of this method invokes the factory's private constructor. MUST BE PROVIDED BY CONCRETE DERIVED CLASS as follows:

static <ossimFactoryBase-derived class>* instance();

PURE VIRTUAL METHODS: create(string), create(keywordlist, prefix)

Attempts to create an instance of the Product given a string or keywordlist. It is up to the concrete factory implementation to decide how to interpret string. It could conceivably represent a "magic number" specification of a product (such as the class name). Or, it could be a filename that the factory must open to decide which product to instantiate. The derived factory can also define other create methods following the model used here.

Returns successfully constructed product or NULL.

Implements ossimFactoryBase< ossimElevCellHandler >.

Definition at line 93 of file ossimElevCellHandlerFactory.cpp.

References product, and ossimFactoryBase< ossimElevCellHandler >::theRegistry.

94 {
95  std::list<ossimFactoryBase<ossimElevCellHandler>*>::const_iterator
96  elevCellFactory;
97 
99 
100  elevCellFactory = theRegistry.begin();
101  while((elevCellFactory != theRegistry.end()) && (!product))
102  {
103  product = (*elevCellFactory)->create(name);
104  elevCellFactory++;
105  }
106 
107  return product;
108 }
std::list< ossimFactoryBase< ossimElevCellHandler > *> theRegistry

◆ create() [2/2]

ossimElevCellHandler * ossimElevCellHandlerFactory::create ( const ossimKeywordlist kwl,
const char *  prefix 
) const
virtual

Implements ossimFactoryBase< ossimElevCellHandler >.

Definition at line 70 of file ossimElevCellHandlerFactory.cpp.

References product, and ossimFactoryBase< ossimElevCellHandler >::theRegistry.

72 {
73  std::list<ossimFactoryBase<ossimElevCellHandler>*>::const_iterator
74  elevCellFactory;
75 
77 
78  elevCellFactory = theRegistry.begin();
79  while((elevCellFactory != theRegistry.end()) && (!product))
80  {
81  product = (*elevCellFactory)->create(keywordList, prefix);
82  elevCellFactory++;
83  }
84 
85  return product;
86 }
std::list< ossimFactoryBase< ossimElevCellHandler > *> theRegistry

◆ getList()

std::list< ossimString > ossimElevCellHandlerFactory::getList ( ) const
virtual

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

Implements ossimFactoryBase< ossimElevCellHandler >.

Definition at line 114 of file ossimElevCellHandlerFactory.cpp.

References ossimFactoryBase< ossimElevCellHandler >::theRegistry.

115 {
116  std::list<ossimString> rtn_list;
117  std::list<ossimString> sub_list;
118  std::list<ossimFactoryBase<ossimElevCellHandler>*>::const_iterator factory_iter;
119 
120  factory_iter = theRegistry.begin();
121  while(factory_iter != theRegistry.end())
122  {
123  sub_list = (*factory_iter)->getList();
124  rtn_list.merge(sub_list);
125  factory_iter++;
126  }
127 
128  return rtn_list;
129 }
std::list< ossimFactoryBase< ossimElevCellHandler > *> theRegistry

◆ instance()

ossimElevCellHandlerFactory * ossimElevCellHandlerFactory::instance ( )
static

Member Data Documentation

◆ theInstance

ossimElevCellHandlerFactory * ossimElevCellHandlerFactory::theInstance = 0
staticprotected

Definition at line 45 of file ossimElevCellHandlerFactory.h.

Referenced by instance().


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