|
|
| BlobRef (const BlobRef &) |
Definition at line 23 of file BlobRef.h.
◆ BlobRef()
| Magick::BlobRef::BlobRef |
( |
const void * | data_, |
|
|
const size_t | length_ ) |
Definition at line 20 of file BlobRef.cpp.
21 : allocator(Magick::Blob::NewAllocator),
22 length(length_),
23 data((void*) NULL),
24 _mutexLock(),
25 _refCount(1)
26{
27 if (data_ != (const void*) NULL)
28 {
29 data=new unsigned char[length_];
30 memcpy(data,data_,length_);
31 }
32}
◆ ~BlobRef()
| Magick::BlobRef::~BlobRef |
( |
void | | ) |
|
Definition at line 34 of file BlobRef.cpp.
35{
36 if (allocator == Magick::Blob::NewAllocator)
37 {
38 delete[] static_cast<unsigned char*>(data);
39 data=(void *) NULL;
40 }
41 else if (allocator == Magick::Blob::MallocAllocator)
42 data=(void *) RelinquishMagickMemory(data);
43}
◆ decrease()
| size_t Magick::BlobRef::decrease |
( |
| ) |
|
Definition at line 45 of file BlobRef.cpp.
46{
47 size_t
48 count;
49
50 _mutexLock.lock();
51 if (_refCount == 0)
52 {
53 _mutexLock.unlock();
54 throwExceptionExplicit(MagickCore::OptionError,
55 "Invalid call to decrease");
56 return(0);
57 }
58 count=--_refCount;
59 _mutexLock.unlock();
60 return(count);
61}
◆ increase()
| void Magick::BlobRef::increase |
( |
| ) |
|
Definition at line 63 of file BlobRef.cpp.
64{
65 _mutexLock.lock();
66 _refCount++;
67 _mutexLock.unlock();
68}
◆ _mutexLock
◆ _refCount
| size_t Magick::BlobRef::_refCount |
|
private |
◆ allocator
| Blob::Allocator Magick::BlobRef::allocator |
◆ data
| void* Magick::BlobRef::data |
◆ length
| size_t Magick::BlobRef::length |
The documentation for this class was generated from the following files:
- /home/cristy/Attic/Build/ImageMagick-7.1.2/rpmbuild/BUILD/ImageMagick-7.1.2-build/ImageMagick-7.1.2-32/Magick++/lib/Magick++/BlobRef.h
- /home/cristy/Attic/Build/ImageMagick-7.1.2/rpmbuild/BUILD/ImageMagick-7.1.2-build/ImageMagick-7.1.2-32/Magick++/lib/BlobRef.cpp