Magick++  6.9.3
BlobRef.h
Go to the documentation of this file.
1 // This may look like C code, but it is really -*- C++ -*-
2 //
3 // Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002
4 // Copyright Dirk Lemstra 2015
5 //
6 // Blob reference class
7 //
8 // This is an internal implementation class that should not be
9 // accessed by users.
10 //
11 
12 #if !defined(Magick_Blob_header)
13 #define Magick_Blob_header
14 
15 #include "Magick++/Include.h"
16 #include "Magick++/Thread.h"
17 #include "Magick++/Blob.h"
18 
19 namespace Magick
20 {
21  class BlobRef
22  {
23  public:
24  // Construct with data, making private copy of data
25  BlobRef(const void* data_,const size_t length_);
26 
27  // Destructor (actually destroys data)
28  ~BlobRef(void);
29 
30  void* _data; // Blob data
31  size_t _length; // Blob length
32  Blob::Allocator _allocator; // Memory allocation system in use
33  ::ssize_t _refCount; // Reference count
34  MutexLock _mutexLock; // Mutex lock
35 
36  private:
37  // Copy constructor and assignment are not supported
38  BlobRef(const BlobRef&);
39  BlobRef& operator=(const BlobRef&);
40  };
41 
42 } // namespace Magick
43 
44 #endif // Magick_Blob_header
Blob::Allocator _allocator
Definition: BlobRef.h:32
BlobRef(const void *data_, const size_t length_)
Definition: BlobRef.cpp:18
MutexLock _mutexLock
Definition: BlobRef.h:34
void * _data
Definition: BlobRef.h:30
::ssize_t _refCount
Definition: BlobRef.h:33
size_t _length
Definition: BlobRef.h:31
~BlobRef(void)
Definition: BlobRef.cpp:33