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