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

Factory for ossimOpenCvObject. More...

#include <ossimOpenCvObjectFactory.h>

Inheritance diagram for ossimOpenCvObjectFactory:
ossimObjectFactory ossimObject ossimReferenced

Public Member Functions

virtual ~ossimOpenCvObjectFactory ()
 virtual destructor More...
 
virtual ossimObjectcreateObject (const ossimString &typeName) const
 createObject that takes a class name (eg. More...
 
virtual ossimObjectcreateObject (const ossimKeywordlist &kwl, const char *prefix=0) const
 Creates an object given a keyword list and prefix. More...
 
virtual void getTypeNameList (std::vector< ossimString > &typeList) const
 Adds ossimLasWriter to the typeList. More...
 
- 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 ossimOpenCvObjectFactoryinstance ()
 static method to return instance (the only one) of this class. More...
 

Protected Member Functions

 ossimOpenCvObjectFactory ()
 hidden from use default constructor More...
 
 ossimOpenCvObjectFactory (const ossimOpenCvObjectFactory &)
 hidden from use copy constructor More...
 
const ossimOpenCvObjectFactoryoperator= (const ossimOpenCvObjectFactory &)
 hidden from use copy constructor More...
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 

Static Protected Attributes

static ossimOpenCvObjectFactorytheInstance = 0
 static instance of this class More...
 

Detailed Description

Factory for ossimOpenCvObject.

Definition at line 22 of file ossimOpenCvObjectFactory.h.

Constructor & Destructor Documentation

◆ ~ossimOpenCvObjectFactory()

ossimOpenCvObjectFactory::~ossimOpenCvObjectFactory ( )
virtual

virtual destructor

Definition at line 28 of file ossimOpenCvObjectFactory.cpp.

References theInstance.

29 {
30  theInstance = 0;
31 }
static ossimOpenCvObjectFactory * theInstance
static instance of this class

◆ ossimOpenCvObjectFactory() [1/2]

ossimOpenCvObjectFactory::ossimOpenCvObjectFactory ( )
protected

hidden from use default constructor

Definition at line 79 of file ossimOpenCvObjectFactory.cpp.

Referenced by instance().

80 {
81 }

◆ ossimOpenCvObjectFactory() [2/2]

ossimOpenCvObjectFactory::ossimOpenCvObjectFactory ( const ossimOpenCvObjectFactory )
protected

hidden from use copy constructor

Definition at line 83 of file ossimOpenCvObjectFactory.cpp.

84 {
85 }

Member Function Documentation

◆ createObject() [1/2]

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

createObject that takes a class name (eg.

ossimTieMeasurementGenerator)

Parameters
typeName(class, eg. "ossimTieMeasurementGenerator").

Implements ossimObjectFactory.

Definition at line 43 of file ossimOpenCvObjectFactory.cpp.

Referenced by createObject().

45 {
46  ossimObject* result = 0;
47 
48  if(typeName == "ossimTieMeasurementGenerator")
49  {
50  result = new ossimTieMeasurementGenerator;
51  }
52  return result;
53 }

◆ createObject() [2/2]

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

Creates an object given a keyword list and prefix.

Parameters
kwlThe keyword list.
prefixthe keyword list prefix.

Implements ossimObjectFactory.

Definition at line 56 of file ossimOpenCvObjectFactory.cpp.

References createObject(), ossimKeywordlist::find(), and ossimObject::loadState().

58 {
59  ossimObject* result = 0;
60 
61  const char* type = kwl.find(prefix, "type");
62  if(type)
63  {
64  result = createObject(ossimString(type));
65  if(result)
66  {
67  result->loadState(kwl, prefix);
68  }
69  }
70 
71  return result;
72 }
const char * find(const char *key) const
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
virtual ossimObject * createObject(const ossimString &typeName) const
createObject that takes a class name (eg.

◆ getTypeNameList()

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

Adds ossimLasWriter to the typeList.

Parameters
typeListList to add to.

Implements ossimObjectFactory.

Definition at line 74 of file ossimOpenCvObjectFactory.cpp.

75 {
76  typeList.push_back(ossimString("ossimTieMeasurementGenerator"));
77 }

◆ instance()

ossimOpenCvObjectFactory * ossimOpenCvObjectFactory::instance ( )
static

static method to return instance (the only one) of this class.

Returns
pointer to instance of this class.

Definition at line 33 of file ossimOpenCvObjectFactory.cpp.

References ossimOpenCvObjectFactory(), and theInstance.

Referenced by ossimSharedLibraryFinalize(), and ossimSharedLibraryInitialize().

34 {
35  if(!theInstance)
36  {
38  }
39  return theInstance;
40 }
ossimOpenCvObjectFactory()
hidden from use default constructor
static ossimOpenCvObjectFactory * theInstance
static instance of this class

◆ operator=()

const ossimOpenCvObjectFactory & ossimOpenCvObjectFactory::operator= ( const ossimOpenCvObjectFactory )
protected

hidden from use copy constructor

Definition at line 87 of file ossimOpenCvObjectFactory.cpp.

88 {
89  return *this;
90 }

Member Data Documentation

◆ theInstance

ossimOpenCvObjectFactory * ossimOpenCvObjectFactory::theInstance = 0
staticprotected

static instance of this class

Definition at line 66 of file ossimOpenCvObjectFactory.h.

Referenced by instance(), and ~ossimOpenCvObjectFactory().


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