www/api/Magick++/BlobRef_8h_source.html
| Magick++ 7.1.0 |
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 //
5 // Copyright @ 2014 ImageMagick Studio LLC, a non-profit organization
6 // dedicated to making software imaging solutions freely available.
7 //
8 // Blob reference class
9 //
10 // This is an internal implementation class that should not be
11 // accessed by users.
12 //
13
14 #if !defined(Magick_Blob_header)
15 #define Magick_Blob_header
16
17 #include "Magick++/Include.h"
18 #include "Magick++/Thread.h"
19 #include "Magick++/Blob.h"
20
21 namespace Magick
22 {
24 {
25public:
26
27// Construct with data, making private copy of data
28BlobRef(const void* data_,const size_t length_);
29
30// Destructor (actually destroys data)
31~BlobRef(void);
32
33// Decreases reference count and return the new count
34size_t decrease();
35
36// Increases reference count
37void increase();
38
39Blob::Allocator allocator; // Memory allocation system in use
40size_tlength; // Blob length
42
43private:
44// Copy constructor and assignment are not supported
46BlobRef& operator=(const BlobRef&);
47
48MutexLock _mutexLock; // Mutex lock
49size_t _refCount; // Reference count
50 };
51
52 } // namespace Magick
53
54 #endif // Magick_Blob_header
BlobRef(const void *data_, const size_t length_)
Definition: BlobRef.cpp:21
Blob::Allocator allocator
Definition: BlobRef.h:39
void * data
Definition: BlobRef.h:41
Definition: Thread.h:29
void increase()
Definition: BlobRef.cpp:64
size_t decrease()
Definition: BlobRef.cpp:46
size_t length
Definition: BlobRef.h:40
Definition: BlobRef.h:23
Allocator
Definition: Blob.h:26
Definition: Blob.h:17
~BlobRef(void)
Definition: BlobRef.cpp:35