fw4spl
IFactory.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2016.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #ifndef __FWMEMORY_STREAM_IN_IFACTORY_HPP__
8 #define __FWMEMORY_STREAM_IN_IFACTORY_HPP__
9 
10 #include "fwMemory/config.hpp"
11 
12 #include <fwCore/macros.hpp>
13 
14 #include <istream>
15 
16 namespace fwMemory
17 {
18 namespace stream
19 {
20 namespace in
21 {
22 
23 class FWMEMORY_CLASS_API IFactory
24 {
25 public:
26  virtual ~IFactory()
27  {
28  }
29 
30  SPTR(std::istream) operator()()
31  {
32  return this->get();
33  }
34 
35 protected:
36 
37  virtual SPTR(std::istream) get() = 0;
38 
39 };
40 
41 } // namespace in
42 } // namespace stream
43 } // namespace fwMemory
44 
45 #endif // __FWMEMORY_STREAM_IN_IFACTORY_HPP__
46 
47 
#define SPTR(_cls_)
The namespace fwMemory contains tools to manage memory. Use for dump.
Definition: SReader.hpp:20
This file defines fwCore base macros.