PoDoFo
0.9.6
|
#include <PdfRefCountedBuffer.h>
Public Member Functions | |
PdfRefCountedBuffer () | |
PdfRefCountedBuffer (char *pBuffer, size_t lSize) | |
PdfRefCountedBuffer (size_t lSize) | |
PdfRefCountedBuffer (const PdfRefCountedBuffer &rhs) | |
~PdfRefCountedBuffer () | |
char * | GetBuffer () const |
size_t | GetSize () const |
void | Resize (size_t lSize) |
const PdfRefCountedBuffer & | operator= (const PdfRefCountedBuffer &rhs) |
void | SetTakePossesion (bool bTakePossession) |
bool | TakePossesion () const |
bool | operator== (const PdfRefCountedBuffer &rhs) const |
bool | operator< (const PdfRefCountedBuffer &rhs) const |
bool | operator> (const PdfRefCountedBuffer &rhs) const |
A reference counted buffer object which is deleted as soon as the last object having access to it is deleted.
The attached memory object can be resized.
|
inline |
Created an empty reference counted buffer The buffer will be initialized to NULL
PoDoFo::PdfRefCountedBuffer::PdfRefCountedBuffer | ( | char * | pBuffer, |
size_t | lSize | ||
) |
Created an reference counted buffer and use an exiting buffer The buffer will be owned by this object.
pBuffer | a pointer to an allocated buffer |
lSize | size of the allocated buffer |
|
inline |
Create a new PdfRefCountedBuffer.
lSize | buffer size |
|
inline |
Copy an existing PdfRefCountedBuffer and increase the reference count
rhs | the PdfRefCountedBuffer to copy |
|
inline |
Decrease the reference count and delete the buffer if this is the last owner
|
inline |
Get access to the buffer
|
inline |
Return the buffer size.
bool PoDoFo::PdfRefCountedBuffer::operator< | ( | const PdfRefCountedBuffer & | rhs | ) | const |
Compare to buffers.
rhs | compare to this buffer |
const PdfRefCountedBuffer & PoDoFo::PdfRefCountedBuffer::operator= | ( | const PdfRefCountedBuffer & | rhs | ) |
Copy an existing PdfRefCountedBuffer and increase the reference count
rhs | the PdfRefCountedBuffer to copy |
bool PoDoFo::PdfRefCountedBuffer::operator== | ( | const PdfRefCountedBuffer & | rhs | ) | const |
Compare to buffers.
rhs | compare to this buffer |
bool PoDoFo::PdfRefCountedBuffer::operator> | ( | const PdfRefCountedBuffer & | rhs | ) | const |
Compare to buffers.
rhs | compare to this buffer |
|
inline |
Resize the buffer to hold at least lSize bytes.
lSize | the size of bytes the buffer can at least hold |
If the buffer is larger no operation is performed.
|
inline |
If the PdfRefCountedBuffer has no possession on its buffer, it won't delete the buffer. By default the buffer is owned and deleted by the PdfRefCountedBuffer object.
bTakePossession | if false the buffer will not be deleted. |
|
inline |