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

Factory for Kml SuperOverlay reader. More...

#include <ossimKmlSuperOverlayReaderFactory.h>

Inheritance diagram for ossimKmlSuperOverlayReaderFactory:
ossimImageHandlerFactoryBase ossimObjectFactory ossimObject ossimReferenced

Public Member Functions

virtual ~ossimKmlSuperOverlayReaderFactory ()
 virtual destructor More...
 
virtual ossimImageHandleropen (const ossimFilename &fileName, bool openOverview=true) const
 open that takes a file name. More...
 
virtual ossimImageHandleropen (const ossimKeywordlist &kwl, const char *prefix=0) const
 open that takes a keyword list and prefix. More...
 
virtual ossimObjectcreateObject (const ossimString &typeName) const
 createObject that takes a class name (ossimKmlSuperOverlayReader) More...
 
virtual ossimObjectcreateObject (const ossimKeywordlist &kwl, const char *prefix=0) const
 Creates and object given a keyword list and prefix. More...
 
virtual void getTypeNameList (std::vector< ossimString > &typeList) const
 Adds ossimKmlSuperOverlayReader to the typeList. More...
 
virtual void getSupportedExtensions (ossimImageHandlerFactoryBase::UniqueStringList &extensionList) const
 Method to add supported extension to the list, like "kml" or "kmz". More...
 
- Public Member Functions inherited from ossimImageHandlerFactoryBase
virtual ossimRefPtr< ossimImageHandleropen (std::shared_ptr< ossim::istream > &str, const std::string &connectionString, bool openOverview=true) const
 Open method that takes a stream. More...
 
virtual ossimRefPtr< ossimImageHandleropen (std::shared_ptr< ossim::ImageHandlerState > state) const
 
virtual ossimRefPtr< ossimImageHandleropenOverview (const ossimFilename &file) const
 Open overview that takes a file name. More...
 
virtual ossimRefPtr< ossimImageHandleropenOverview (std::shared_ptr< ossim::istream > &str, const ossimString &connectionString) const
 Open method that takes a stream. More...
 
virtual void getImageHandlersBySuffix (ImageHandlerList &result, const ossimString &ext) const
 
virtual void getImageHandlersByMimeType (ImageHandlerList &result, const ossimString &mimeType) const
 
- 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 ossimKmlSuperOverlayReaderFactoryinstance ()
 static method to return instance (the only one) of this class. More...
 

Protected Member Functions

bool hasExcludedExtension (const ossimFilename &file) const
 Method to weed out extensions that this plugin knows it does not support. More...
 
 ossimKmlSuperOverlayReaderFactory ()
 hidden from use default constructor More...
 
 ossimKmlSuperOverlayReaderFactory (const ossimKmlSuperOverlayReaderFactory &)
 hidden from use copy constructor More...
 
void operator= (const ossimKmlSuperOverlayReaderFactory &)
 hidden from use copy constructor More...
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 

Static Protected Attributes

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

Additional Inherited Members

- Public Types inherited from ossimImageHandlerFactoryBase
typedef UniqueList< ossimStringUniqueStringList
 
typedef std::vector< ossimRefPtr< ossimImageHandler > > ImageHandlerList
 

Detailed Description

Factory for Kml SuperOverlay reader.

Definition at line 21 of file ossimKmlSuperOverlayReaderFactory.h.

Constructor & Destructor Documentation

◆ ~ossimKmlSuperOverlayReaderFactory()

ossimKmlSuperOverlayReaderFactory::~ossimKmlSuperOverlayReaderFactory ( )
virtual

virtual destructor

Definition at line 31 of file ossimKmlSuperOverlayReaderFactory.cpp.

References theInstance.

32 {
33  theInstance = 0;
34 }
static ossimKmlSuperOverlayReaderFactory * theInstance
static instance of this class

◆ ossimKmlSuperOverlayReaderFactory() [1/2]

ossimKmlSuperOverlayReaderFactory::ossimKmlSuperOverlayReaderFactory ( )
protected

hidden from use default constructor

Definition at line 148 of file ossimKmlSuperOverlayReaderFactory.cpp.

Referenced by instance().

148 {}

◆ ossimKmlSuperOverlayReaderFactory() [2/2]

ossimKmlSuperOverlayReaderFactory::ossimKmlSuperOverlayReaderFactory ( const ossimKmlSuperOverlayReaderFactory )
protected

hidden from use copy constructor

Definition at line 150 of file ossimKmlSuperOverlayReaderFactory.cpp.

150 {}

Member Function Documentation

◆ createObject() [1/2]

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

createObject that takes a class name (ossimKmlSuperOverlayReader)

Parameters
typeNameShould be "ossimKmlSuperOverlayReader".
Returns
pointer to image writer on success, NULL on failure.

Implements ossimObjectFactory.

Definition at line 104 of file ossimKmlSuperOverlayReaderFactory.cpp.

References ossimRefPtr< T >::release().

106 {
107  ossimRefPtr<ossimObject> result = 0;
108  if(typeName == "ossimKmlSuperOverlayReader")
109  {
110  result = new ossimKmlSuperOverlayReader;
111  }
112 
113  return result.release();
114 }
T * release()
Definition: ossimRefPtr.h:93

◆ createObject() [2/2]

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

Creates and object given a keyword list and prefix.

Parameters
kwlThe keyword list.
prefixthe keyword list prefix.
Returns
pointer to image handler on success, NULL on failure.

Implements ossimObjectFactory.

Definition at line 116 of file ossimKmlSuperOverlayReaderFactory.cpp.

References open().

119 {
120  return this->open(kwl, prefix);
121 }
virtual ossimImageHandler * open(const ossimFilename &fileName, bool openOverview=true) const
open that takes a file name.

◆ getSupportedExtensions()

void ossimKmlSuperOverlayReaderFactory::getSupportedExtensions ( ossimImageHandlerFactoryBase::UniqueStringList extensionList) const
virtual

Method to add supported extension to the list, like "kml" or "kmz".

Parameters
extensionListThe list to add to.

Implements ossimImageHandlerFactoryBase.

Definition at line 129 of file ossimKmlSuperOverlayReaderFactory.cpp.

References ossimImageHandlerFactoryBase::UniqueList< T >::push_back().

131 {
132  extensionList.push_back(ossimString("kml"));
133  extensionList.push_back(ossimString("kmz"));
134 }

◆ getTypeNameList()

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

Adds ossimKmlSuperOverlayReader to the typeList.

Parameters
typeListList to add to.

Implements ossimObjectFactory.

Definition at line 123 of file ossimKmlSuperOverlayReaderFactory.cpp.

125 {
126  typeList.push_back(ossimString("ossimKmlSuperOverlayReader"));
127 }

◆ hasExcludedExtension()

bool ossimKmlSuperOverlayReaderFactory::hasExcludedExtension ( const ossimFilename file) const
protected

Method to weed out extensions that this plugin knows it does not support.

This is to avoid a costly open on say a tiff or jpeg that is not handled by this plugin.

Returns
true if extension, false if not.

Definition at line 136 of file ossimKmlSuperOverlayReaderFactory.cpp.

References ossimString::downcase(), and ossimFilename::ext().

138 {
139  bool result = true;
140  ossimString ext = file.ext().downcase();
141  if (ext == "kml" || ext == "kmz") //only include the file with .kml or .kmz extension and exclude any other files
142  {
143  result = false;
144  }
145  return result;
146 }
static ossimString downcase(const ossimString &aString)
Definition: ossimString.cpp:48
ossimString ext() const

◆ instance()

ossimKmlSuperOverlayReaderFactory * ossimKmlSuperOverlayReaderFactory::instance ( )
static

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

Returns
pointer to instance of this class.

Definition at line 36 of file ossimKmlSuperOverlayReaderFactory.cpp.

References ossimKmlSuperOverlayReaderFactory(), and theInstance.

37 {
38  if(!theInstance)
39  {
41  }
42  return theInstance;
43 }
ossimKmlSuperOverlayReaderFactory()
hidden from use default constructor
static ossimKmlSuperOverlayReaderFactory * theInstance
static instance of this class

◆ open() [1/2]

ossimImageHandler * ossimKmlSuperOverlayReaderFactory::open ( const ossimFilename fileName,
bool  openOverview = true 
) const
virtual

open that takes a file name.

Parameters
fileThe file to open.
Returns
pointer to image handler on success, NULL on failure.

Implements ossimImageHandlerFactoryBase.

Definition at line 45 of file ossimKmlSuperOverlayReaderFactory.cpp.

Referenced by createObject().

47 {
48  if(traceDebug())
49  {
51  << "ossimKmlSuperOverlayReaderFactory::open(filename) DEBUG: entered..."
52  << "\ntrying ossimKakaduNitfReader"
53  << std::endl;
54  }
55 
57 
58  if ( hasExcludedExtension(fileName) == false )
59  {
60  reader = new ossimKmlSuperOverlayReader;
61  if(reader->open(fileName) == false)
62  {
63  reader = 0;
64  }
65  }
66 
67  if(traceDebug())
68  {
70  << "ossimKmlSuperOverlayReaderFactory::open(filename) DEBUG: leaving..."
71  << std::endl;
72  }
73 
74  return reader.release();
75 }
virtual bool open()=0
Pure virtual open.
bool hasExcludedExtension(const ossimFilename &file) const
Method to weed out extensions that this plugin knows it does not support.
T * release()
Definition: ossimRefPtr.h:93
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ open() [2/2]

ossimImageHandler * ossimKmlSuperOverlayReaderFactory::open ( const ossimKeywordlist kwl,
const char *  prefix = 0 
) const
virtual

open that takes a keyword list and prefix.

Parameters
kwlThe keyword list.
prefixthe keyword list prefix.
Returns
pointer to image handler on success, NULL on failure.

Implements ossimImageHandlerFactoryBase.

Definition at line 77 of file ossimKmlSuperOverlayReaderFactory.cpp.

79 {
80  if(traceDebug())
81  {
83  << "ossimKmlSuperOverlayReaderFactory::open(kwl, prefix) DEBUG: entered..."
84  << "Trying ossimKakaduNitfReader"
85  << std::endl;
86  }
87 
89  if(reader->loadState(kwl, prefix) == false)
90  {
91  reader = 0;
92  }
93 
94  if(traceDebug())
95  {
97  << "ossimKmlSuperOverlayReaderFactory::open(kwl, prefix) DEBUG: leaving..."
98  << std::endl;
99  }
100 
101  return reader.release();
102 }
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
T * release()
Definition: ossimRefPtr.h:93
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ operator=()

void ossimKmlSuperOverlayReaderFactory::operator= ( const ossimKmlSuperOverlayReaderFactory )
protected

hidden from use copy constructor

Definition at line 152 of file ossimKmlSuperOverlayReaderFactory.cpp.

152 {}

Member Data Documentation

◆ theInstance

ossimKmlSuperOverlayReaderFactory * ossimKmlSuperOverlayReaderFactory::theInstance = 0
staticprotected

static instance of this class

Definition at line 101 of file ossimKmlSuperOverlayReaderFactory.h.

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


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