BlobRef.h
Go to the documentation of this file.
// This may look like C code, but it is really -*- C++ -*-
//
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002
//
// Copyright @ 2014 ImageMagick Studio LLC, a non-profit organization
// dedicated to making software imaging solutions freely available.
//
// Blob reference class
//
// This is an internal implementation class that should not be
// accessed by users.
//
#if !defined(Magick_Blob_header)
#define Magick_Blob_header
#include "Magick++/Include.h"
#include "Magick++/Thread.h"
#include "Magick++/Blob.h"
namespace Magick
{
class BlobRef
{
public:
// Construct with data, making private copy of data
BlobRef(const void* data_,const size_t length_);
// Destructor (actually destroys data)
~BlobRef(void);
// Decreases reference count and return the new count
size_t decrease();
// Increases reference count
void increase();
Blob::Allocator allocator; // Memory allocation system in use
size_t length; // Blob length
void* data; // Blob data
private:
// Copy constructor and assignment are not supported
BlobRef(const BlobRef&);
BlobRef& operator=(const BlobRef&);
MutexLock _mutexLock; // Mutex lock
size_t _refCount; // Reference count
};
} // namespace Magick
#endif // Magick_Blob_header
Magick::BlobRef::BlobRef
BlobRef(const void *data_, const size_t length_)
Definition: BlobRef.cpp:21
Magick::BlobRef::allocator
Blob::Allocator allocator
Definition: BlobRef.h:39
Magick::BlobRef::data
void * data
Definition: BlobRef.h:41
Magick::MutexLock
Definition: Thread.h:29
Thread.h
Magick::BlobRef::increase
void increase()
Definition: BlobRef.cpp:64
Magick::BlobRef::decrease
size_t decrease()
Definition: BlobRef.cpp:46
Include.h
Magick::BlobRef::length
size_t length
Definition: BlobRef.h:40
Magick::BlobRef
Definition: BlobRef.h:23
Magick::Blob::Allocator
Allocator
Definition: Blob.h:26
Magick
Definition: Blob.h:17
Blob.h
Magick::BlobRef::~BlobRef
~BlobRef(void)
Definition: BlobRef.cpp:35