OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimFftw3Factory.cpp
Go to the documentation of this file.
1 //**************************************************************************************************
2 //
3 // OSSIM Open Source Geospatial Data Processing Library
4 // See top level LICENSE.txt file for license information
5 //
6 //**************************************************************************************************
7 
8 
9 #include "ossimFftw3Factory.h"
10 #include "ossimFftw3Filter.h"
12 #include <ossim/base/ossimTrace.h>
13 
15 
16 static ossimTrace traceDebug("ossimImageSourceFactory:debug");
17 
19 
21 {
22  theInstance = NULL;
24 }
26 {
27  if(!theInstance)
28  {
30  }
31 
32  return theInstance;
33 }
34 
36 {
37 
38  // lets do the filters first
40  return new ossimFftw3Filter;
41 
42  return NULL;
43 }
44 
46  const char* prefix)const
47 {
48  static const char* MODULE = "ossimFftw3Factory::createSource";
49 
50  ossimString copyPrefix;
51  if (prefix)
52  {
53  copyPrefix = prefix;
54  }
55 
56  ossimObject* result = NULL;
57 
58  if(traceDebug())
59  {
60  CLOG << "looking up type keyword for prefix = " << copyPrefix << endl;
61  }
62 
63  const char* lookup = kwl.find(copyPrefix, "type");
64  if(lookup)
65  {
66  ossimString name = lookup;
67  result = createObject(name);
68 
69  if(result)
70  {
71  if(traceDebug())
72  {
73  CLOG << "found source " << result->getClassName() << " now loading state" << endl;
74  }
75  result->loadState(kwl, copyPrefix.c_str());
76  }
77  else
78  {
79  if(traceDebug())
80  {
81  CLOG << "type not found " << lookup << endl;
82  }
83  }
84  }
85  else
86  {
87  if(traceDebug())
88  {
89  CLOG << "type keyword not found" << endl;
90  }
91  }
92  return result;
93 }
94 
95 void ossimFftw3Factory::getTypeNameList(std::vector<ossimString>& typeList)const
96 {
97  typeList.push_back(STATIC_TYPE_NAME(ossimFftw3Filter));
98 }
99 
100 // Hide from use...
103 {}
104 
107 {}
108 
110 {
111  return *this;
112 }
#define CLOG
Definition: ossimTrace.h:23
RTTI_DEF1(ossimFftw3Factory, "ossimFftw3Factory", ossimImageSourceFactoryBase)
Represents serializable keyword/value map.
const char * find(const char *key) const
static ossimFftw3Factory * instance()
const ossimFftw3Factory & operator=(ossimFftw3Factory &)
virtual ossimObject * createObject(const ossimString &name) const
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
void unregisterFactory(ossimImageSourceFactoryBase *factory)
virtual ossimString getClassName() const
Definition: ossimObject.cpp:64
virtual void getTypeNameList(std::vector< ossimString > &typeList) const
#define STATIC_TYPE_NAME(T)
Definition: ossimRtti.h:325
static ossimFftw3Factory * theInstance
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396
static ossimImageSourceFactoryRegistry * instance()