Powered by Pair ImageMagick logo
Image Magick
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages

Magick::BlobRef Class Reference

#include <BlobRef.h>

Collaboration diagram for Magick::BlobRef:

Collaboration graph
[legend]

Public Member Functions

 BlobRef (const void *data_, size_t length_)
 ~BlobRef (void)

Data Fields

void * _data
size_t _length
Blob::Allocator _allocator
int _refCount
MutexLock _mutexLock

Private Member Functions

 BlobRef (const BlobRef &)
BlobRefoperator= (const BlobRef &)

Constructor & Destructor Documentation

Magick::BlobRef::BlobRef const void *  data_,
size_t  length_
 

Definition at line 21 of file BlobRef.cpp.

References _data, BlobRef(), and memcpy.

Referenced by BlobRef().

00023 : _data(0), 00024 _length(length_), 00025 _allocator(Magick::Blob::NewAllocator), 00026 _refCount(1), 00027 _mutexLock() 00028 { 00029 if( data_ ) 00030 { 00031 _data = new unsigned char[length_]; 00032 memcpy( _data, data_, length_ ); 00033 } 00034 }

Here is the call graph for this function:

Magick::BlobRef::~BlobRef void   ) 
 

Definition at line 37 of file BlobRef.cpp.

References _allocator, _data, and RelinquishMagickMemory().

00038 { 00039 if ( _allocator == Magick::Blob::NewAllocator ) 00040 { 00041 delete [] static_cast<unsigned char*>(_data); 00042 _data=0; 00043 } 00044 else if ( _allocator == Magick::Blob::MallocAllocator ) 00045 { 00046 _data=(void *) RelinquishMagickMemory(_data); 00047 } 00048 }

Here is the call graph for this function:

Magick::BlobRef::BlobRef const BlobRef  )  [private]
 


Member Function Documentation

BlobRef& Magick::BlobRef::operator= const BlobRef  )  [private]
 


Field Documentation

Blob::Allocator Magick::BlobRef::_allocator
 

Definition at line 39 of file BlobRef.h.

Referenced by Magick::Blob::updateNoCopy(), and ~BlobRef().

void* Magick::BlobRef::_data
 

Definition at line 37 of file BlobRef.h.

Referenced by BlobRef(), Magick::Blob::data(), Magick::Blob::updateNoCopy(), and ~BlobRef().

size_t Magick::BlobRef::_length
 

Definition at line 38 of file BlobRef.h.

Referenced by Magick::Blob::length(), and Magick::Blob::updateNoCopy().

MutexLock Magick::BlobRef::_mutexLock
 

Definition at line 41 of file BlobRef.h.

Referenced by Magick::Blob::Blob(), Magick::Blob::operator=(), Magick::Blob::update(), Magick::Blob::updateNoCopy(), and Magick::Blob::~Blob().

int Magick::BlobRef::_refCount
 

Definition at line 40 of file BlobRef.h.

Referenced by Magick::Blob::Blob(), Magick::Blob::operator=(), Magick::Blob::update(), Magick::Blob::updateNoCopy(), and Magick::Blob::~Blob().


The documentation for this class was generated from the following files:
Generated on Mon Oct 25 13:48:28 2004 for ImageMagick by doxygen 1.3.7
ImageMagick Copyright © 2004, ImageMagick Studio LLC