1
// This may look like C code, but it is really -*- C++ -*-
3
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002
5
// Definition of an Image reference
7
// This is a private implementation class which should never be
8
// referenced by any user code.
11
#if !defined(Magick_ImageRef_header)
12
#define Magick_ImageRef_header
14
#include "Magick++/Include.h"
15
#include "Magick++/Thread.h"
22
// Reference counted access to Image *
24
class MagickDLLDecl ImageRef {
27
// Construct with an image pointer and default options
28
ImageRef ( MagickLib::Image * image_ );
29
// Construct with an image pointer and options
30
ImageRef ( MagickLib::Image * image_, const Options * options_ );
31
// Construct with null image and default options
33
// Destroy image and options
36
// Copy constructor and assignment are not supported
37
ImageRef(const ImageRef&);
38
ImageRef& operator=(const ImageRef&);
40
void image ( MagickLib::Image * image_ );
41
MagickLib::Image *& image ( void );
43
void options ( Options * options_ );
44
Options * options ( void );
46
void id ( const long id_ );
47
long id ( void ) const;
49
MagickLib::Image * _image; // ImageMagick Image
50
Options * _options; // User-specified options
51
long _id; // Registry ID (-1 if not registered)
52
int _refCount; // Reference count
53
MutexLock _mutexLock;// Mutex lock
56
} // end of namespace Magick
62
// Retrieve image from reference
63
inline MagickLib::Image *& Magick::ImageRef::image ( void )
68
// Retrieve Options from reference
69
inline Magick::Options * Magick::ImageRef::options ( void )
74
// Retrieve registration id from reference
75
inline long Magick::ImageRef::id ( void ) const
80
#endif // Magick_ImageRef_header