fw4spl
BufferInfo.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2017.
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_BUFFERINFO_HPP__
8 #define __FWMEMORY_BUFFERINFO_HPP__
9 
10 #include "fwMemory/BufferAllocationPolicy.hpp"
11 #include "fwMemory/FileFormat.hpp"
12 #include "fwMemory/FileHolder.hpp"
13 #include "fwMemory/config.hpp"
14 #include "fwMemory/stream/in/IFactory.hpp"
15 
16 #include <fwCore/LogicStamp.hpp>
17 #include <fwCore/macros.hpp>
18 
19 #include <boost/filesystem/path.hpp>
20 
21 namespace fwMemory
22 {
23 
24 struct FWMEMORY_CLASS_API BufferInfo
25 {
26 
27  typedef size_t SizeType;
28  typedef WPTR ( void ) CounterType;
29 
30  FWMEMORY_API BufferInfo();
31 
32  FWMEMORY_API void clear();
33  //------------------------------------------------------------------------------
34 
35  long lockCount() const
36  {
37  return lockCounter.use_count();
38  }
39 
40  SizeType size;
42  bool loaded;
43  bool userStreamFactory;
44 
45  FileHolder fsFile;
46  FileFormatType fileFormat;
47 
48  CounterType lockCounter;
49 
50  ::fwCore::LogicStamp lastAccess;
51  ::fwMemory::BufferAllocationPolicy::sptr bufferPolicy;
52 
53  SPTR( ::fwMemory::stream::in::IFactory ) istreamFactory;
54 
55 };
56 
57 } // namespace fwMemory
58 
59 #endif // __FWMEMORY_BUFFERINFO_HPP__
60 
#define SPTR(_cls_)
The namespace fwMemory contains tools to manage memory. Use for dump.
Definition: SReader.hpp:20
#define WPTR(_cls_)
This file defines fwCore base macros.
bool loaded
true if &#39;buffer&#39; is loaded
Definition: BufferInfo.hpp:42
Provides a Logical timestamp system.
Definition: LogicStamp.hpp:22