OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimInfoFactoryRegistry.h
Go to the documentation of this file.
1 //---
2 //
3 // License: MIT
4 //
5 // Author: David Burken
6 //
7 // Description: Class declaration of Registry (singleton) for info factories.
8 //
9 //---
10 // $Id$
11 
12 #ifndef ossimInfoFactoryRegistry_HEADER
13 #define ossimInfoFactoryRegistry_HEADER 1
14 
15 #include <ossim/base/ossimConstants.h> /* for OSSIM_DLL macro */
16 #include <ossim/base/ossimIosFwd.h>
18 #include <memory>
19 #include <vector>
20 #include <mutex>
21 
22 // Forward class declarations.
24 class ossimInfoBase;
25 class ossimFilename;
26 
28 {
29 public:
30 
33 
39  static ossimInfoFactoryRegistry* instance();
40 
45  void registerFactory(ossimInfoFactoryInterface* factory);
46 
51  void registerFactoryToFront( ossimInfoFactoryInterface* factory );
52 
58  void unregisterFactory(ossimInfoFactoryInterface* factory);
59 
68  std::shared_ptr<ossimInfoBase> create(const ossimFilename& file) const;
69 
78  std::shared_ptr<ossimInfoBase> create( std::shared_ptr<ossim::istream>& str,
79  const std::string& connectionString) const;
80 
81 protected:
82 
88 
91 
93  const ossimInfoFactoryRegistry& operator=(
94  const ossimInfoFactoryRegistry& rhs);
95 
96  std::vector<ossimInfoFactoryInterface*> m_factoryList;
97 
98  std::mutex m_mutex;
99 
101 };
102 
103 #endif /* #ifndef ossimInfoFactoryRegistry_HEADER */
std::vector< ossimInfoFactoryInterface * > m_factoryList
Info Base.
Definition: ossimInfoBase.h:32
#define OSSIM_DLL
static ossimInfoFactoryRegistry * m_instance