OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimRegToolFactory.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 
9 #include "ossimRegTool.h"
10 #include "ossimRegToolFactory.h"
11 
12 using namespace std;
13 
15 
17 {
18  if (!s_instance)
19  s_instance = new ossimRegToolFactory;
20  return s_instance;
21 }
22 
24 {
25 }
26 
28 {
30 }
31 
32 ossimTool* ossimRegToolFactory::createTool(const std::string& argName) const
33 {
34  ossimString utilName (argName);
35  utilName.downcase();
36 
37  if ((utilName == "registration") || (argName == "ossimRegUtil"))
38  return new ossimRegTool;
39 
40  return 0;
41 }
42 
43 void ossimRegToolFactory::getCapabilities(std::map<std::string, std::string>& capabilities) const
44 {
45  capabilities.insert(pair<string, string>("registration", ossimRegTool::DESCRIPTION));
46 }
47 
48 std::map<std::string, std::string> ossimRegToolFactory::getCapabilities() const
49 {
50  std::map<std::string, std::string> result;
51  getCapabilities(result);
52  return result;
53 }
54 
55 void ossimRegToolFactory::getTypeNameList(vector<ossimString>& typeList) const
56 {
57  typeList.push_back("ossimRegUtil");
58 }
virtual std::map< std::string, std::string > getCapabilities() const
static ossimRegToolFactory * instance()
virtual ossimTool * createTool(const std::string &typeName) const
virtual void getTypeNameList(std::vector< ossimString > &typeList) const
static ossimToolRegistry * instance()
void unregisterFactory(T *factory)
Will remove the factory from the registry.
static ossimRegToolFactory * s_instance
static instance of this class
static ossimString downcase(const ossimString &aString)
Definition: ossimString.cpp:48
static const char * DESCRIPTION
Definition: ossimRegTool.h:18