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
ossimplugins::ossimPluginReaderFactory Class Reference

Image handler factory for ossim plugins plugin. More...

#include <ossimPluginReaderFactory.h>

Inheritance diagram for ossimplugins::ossimPluginReaderFactory:
ossimImageHandlerFactoryBase ossimObjectFactory ossimObject ossimReferenced

Public Member Functions

virtual ~ossimPluginReaderFactory ()
 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. 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 ossimTerraSarTiffReader to the typeList. More...
 
virtual void getSupportedExtensions (ossimImageHandlerFactoryBase::UniqueStringList &extensionList) const
 Method to add supported extension to the list, like "png". 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 ossimPluginReaderFactoryinstance ()
 static method to return instance (the only one) of this class. More...
 

Protected Member Functions

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

Static Protected Attributes

static ossimPluginReaderFactorytheInstance = 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

Image handler factory for ossim plugins plugin.

Definition at line 27 of file ossimPluginReaderFactory.h.

Constructor & Destructor Documentation

◆ ~ossimPluginReaderFactory()

ossimplugins::ossimPluginReaderFactory::~ossimPluginReaderFactory ( )
virtual

virtual destructor

Definition at line 36 of file ossimPluginReaderFactory.cpp.

References theInstance.

37  {
38  theInstance = 0;
39  }
static ossimPluginReaderFactory * theInstance
static instance of this class

◆ ossimPluginReaderFactory() [1/2]

ossimplugins::ossimPluginReaderFactory::ossimPluginReaderFactory ( )
protected

hidden from use default constructor

Definition at line 173 of file ossimPluginReaderFactory.cpp.

Referenced by instance().

173 {}

◆ ossimPluginReaderFactory() [2/2]

ossimplugins::ossimPluginReaderFactory::ossimPluginReaderFactory ( const ossimPluginReaderFactory )
protected

hidden from use copy constructor

Definition at line 175 of file ossimPluginReaderFactory.cpp.

175 {}

Member Function Documentation

◆ createObject() [1/2]

ossimObject * ossimplugins::ossimPluginReaderFactory::createObject ( const ossimString typeName) const
virtual

createObject that takes a class name.

Parameters
typeNameThe name of the class..
Returns
pointer to image writer on success, 0 on failure.

Implements ossimObjectFactory.

Definition at line 138 of file ossimPluginReaderFactory.cpp.

References ossimRefPtr< T >::release().

140  {
141  ossimRefPtr<ossimObject> result = 0;
142  if(typeName == "ossimRadarSat2TiffReader")
143  {
144  result = new ossimRadarSat2TiffReader;
145  }
146  else if(typeName == "ossimTerraSarTiffReader")
147  {
148  result = new ossimTerraSarTiffReader;
149  }
150 
151  return result.release();
152  }
T * release()
Definition: ossimRefPtr.h:93

◆ createObject() [2/2]

ossimObject * ossimplugins::ossimPluginReaderFactory::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, 0 on failure.

Implements ossimObjectFactory.

Definition at line 154 of file ossimPluginReaderFactory.cpp.

References open().

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

◆ getSupportedExtensions()

void ossimplugins::ossimPluginReaderFactory::getSupportedExtensions ( ossimImageHandlerFactoryBase::UniqueStringList extensionList) const
virtual

Method to add supported extension to the list, like "png".

Parameters
extensionListThe list to add to.

Implements ossimImageHandlerFactoryBase.

Definition at line 167 of file ossimPluginReaderFactory.cpp.

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

169  {
170  extensionList.push_back(ossimString("xml"));
171  }

◆ getTypeNameList()

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

Adds ossimTerraSarTiffReader to the typeList.

Parameters
typeListList to add to.

Implements ossimObjectFactory.

Definition at line 160 of file ossimPluginReaderFactory.cpp.

Referenced by ossimplugins::ossimSharedLibraryInitialize().

162  {
163  typeList.push_back(ossimString("ossimRadarSat2TiffReader"));
164  typeList.push_back(ossimString("ossimTerraSarTiffReader"));
165  }

◆ instance()

ossimPluginReaderFactory * ossimplugins::ossimPluginReaderFactory::instance ( )
static

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

Returns
pointer to instance of this class.

Definition at line 41 of file ossimPluginReaderFactory.cpp.

References ossimPluginReaderFactory(), and theInstance.

Referenced by ossimplugins::ossimSharedLibraryFinalize(), and ossimplugins::ossimSharedLibraryInitialize().

42  {
43  if(!theInstance)
44  {
46  }
47  return theInstance;
48  }
static ossimPluginReaderFactory * theInstance
static instance of this class
ossimPluginReaderFactory()
hidden from use default constructor

◆ open() [1/2]

ossimImageHandler * ossimplugins::ossimPluginReaderFactory::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, 0 on failure.

Implements ossimImageHandlerFactoryBase.

Definition at line 50 of file ossimPluginReaderFactory.cpp.

References ossimImageHandler::open(), ossimImageHandlerFactoryBase::openOverview(), ossimNotify(), ossimNotifyLevel_DEBUG, ossimRefPtr< T >::release(), ossimImageHandler::setOpenOverviewFlag(), and ossimRefPtr< T >::valid().

Referenced by createObject().

52  {
53  if(traceDebug())
54  {
56  << "ossimPluginReaderFactory::open(filename) DEBUG: entered..."
57  << "\ntrying ossimRadarSat2TiffReader"
58  << std::endl;
59  }
60 
61  ossimRefPtr<ossimImageHandler> reader = new ossimRadarSat2TiffReader();
63  if(reader->open(fileName) == false)
64  {
65  reader = 0;
66  }
67 
68  if ( !reader.valid() )
69  {
70  if(traceDebug())
71  {
73  << "\ntrying ossimTerraSarTiffReader"
74  << std::endl;
75  }
76 
77  reader = new ossimTerraSarTiffReader();
79  if(reader->open(fileName) == false)
80  {
81  reader = 0;
82  }
83  }
84 
85  if(traceDebug())
86  {
88  << "ossimPluginReaderFactory::open(filename) DEBUG: leaving..."
89  << std::endl;
90  }
91 
92  return reader.release();
93  }
virtual bool open()=0
Pure virtual open.
void setOpenOverviewFlag(bool flag)
Sets theOpenOverviewFlag.
bool valid() const
Definition: ossimRefPtr.h:75
virtual ossimRefPtr< ossimImageHandler > openOverview(const ossimFilename &file) const
Open overview that takes a file name.
T * release()
Definition: ossimRefPtr.h:93
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ open() [2/2]

ossimImageHandler * ossimplugins::ossimPluginReaderFactory::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, 0 on failure.

Implements ossimImageHandlerFactoryBase.

Definition at line 95 of file ossimPluginReaderFactory.cpp.

References ossimImageHandler::loadState(), ossimNotify(), ossimNotifyLevel_DEBUG, ossimRefPtr< T >::release(), and ossimRefPtr< T >::valid().

97  {
98  if(traceDebug())
99  {
101  << "ossimPluginReaderFactory::open(kwl, prefix) DEBUG: entered..."
102  << "Trying ossimRadarSat2TiffReader"
103  << std::endl;
104  }
105 
106  ossimRefPtr<ossimImageHandler> reader = new ossimRadarSat2TiffReader;
107  if(reader->loadState(kwl, prefix) == false)
108  {
109  reader = 0;
110  }
111 
112  if ( !reader.valid() )
113  {
114  if(traceDebug())
115  {
117  << "ossimPluginReaderFactory::open(kwl, prefix) DEBUG: entered..."
118  << "Trying ossimTerraSarTiffReader"
119  << std::endl;
120  }
121  reader = new ossimTerraSarTiffReader;
122  if(reader->loadState(kwl, prefix) == false)
123  {
124  reader = 0;
125  }
126  }
127 
128  if(traceDebug())
129  {
131  << "ossimPluginReaderFactory::open(kwl, prefix) DEBUG: leaving..."
132  << std::endl;
133  }
134 
135  return reader.release();
136  }
bool valid() const
Definition: ossimRefPtr.h:75
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 ossimplugins::ossimPluginReaderFactory::operator= ( const ossimPluginReaderFactory )
protected

hidden from use copy constructor

Definition at line 177 of file ossimPluginReaderFactory.cpp.

177 {}

Member Data Documentation

◆ theInstance

ossimPluginReaderFactory * ossimplugins::ossimPluginReaderFactory::theInstance = 0
staticprotected

static instance of this class

Definition at line 98 of file ossimPluginReaderFactory.h.

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


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