~ubuntu-branches/ubuntu/intrepid/graphicsmagick/intrepid

« back to all changes in this revision

Viewing changes to Magick++/lib/Magick++/BlobRef.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Kobras
  • Date: 2006-05-06 16:28:08 UTC
  • Revision ID: james.westby@ubuntu.com-20060506162808-vt2ni3r5nytcszms
Tags: upstream-1.1.7
ImportĀ upstreamĀ versionĀ 1.1.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// This may look like C code, but it is really -*- C++ -*-
 
2
//
 
3
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002
 
4
//
 
5
// Blob reference class
 
6
//
 
7
// This is an internal implementation class that should not be
 
8
// accessed by users.
 
9
//
 
10
 
 
11
#if !defined(Magick_Blob_header)
 
12
#define Magick_Blob_header
 
13
 
 
14
#include "Magick++/Include.h"
 
15
#include "Magick++/Thread.h"
 
16
#include "Magick++/Blob.h"
 
17
 
 
18
namespace Magick
 
19
{
 
20
 
 
21
  class BlobRef {
 
22
  public:
 
23
    // There are no public methods in this class
 
24
 
 
25
    // Construct with data, making private copy of data
 
26
    BlobRef ( const void* data_, size_t length_ );
 
27
 
 
28
    // Destructor (actually destroys data)
 
29
    ~BlobRef ( void );
 
30
 
 
31
  private:
 
32
    // Copy constructor and assignment are not supported
 
33
    BlobRef (const BlobRef&);
 
34
    BlobRef& operator= (const BlobRef&);
 
35
 
 
36
  public:
 
37
    void *          _data;      // Blob data
 
38
    size_t          _length;    // Blob length
 
39
    Blob::Allocator _allocator; // Memory allocation system in use
 
40
    int             _refCount;  // Reference count
 
41
    MutexLock       _mutexLock; // Mutex lock
 
42
  };
 
43
 
 
44
} // namespace Magick
 
45
 
 
46
#endif // Magick_Blob_header