OpenDaVINCI  4.16.0
StreamFactory.h
Go to the documentation of this file.
1 
20 #ifndef OPENDAVINCI_CORE_IO_STREAMFACTORY_H_
21 #define OPENDAVINCI_CORE_IO_STREAMFACTORY_H_
22 
23 #include <vector>
24 
26 #include <memory>
30 
31 namespace odcore {
32  namespace io {
33 
34  using namespace std;
35 
40  private:
47 
53  StreamFactory& operator=(const StreamFactory &);
54 
55  private:
56  StreamFactory();
57 
58  public:
59  virtual ~StreamFactory();
60 
66  static StreamFactory& getInstance();
67 
75  std::shared_ptr<istream> getInputStream(const URL &url) throw (odcore::exceptions::InvalidArgumentException);
76 
84  std::shared_ptr<ostream> getOutputStream(const URL &url) throw (odcore::exceptions::InvalidArgumentException);
85 
86  private:
87  static base::Mutex m_singletonMutex;
88  static StreamFactory* m_singleton;
89 
90  vector<std::shared_ptr<istream> > m_listOfInputStreams;
91  vector<std::shared_ptr<ostream> > m_listOfOutputStreams;
92  };
93 
94  }
95 } // odcore::io
96 
97 #endif /*OPENDAVINCI_CORE_IO_STREAMFACTORY_H_*/
Definition: URL.h:38
Definition: base/Mutex.h:49
#define OPENDAVINCI_API
Definition: opendavinci.h:67
Definition: StreamFactory.h:39