librevenge::RVNGBinaryData Class Reference

A representation of arbitrary binary data. More...

#include <RVNGBinaryData.h>

List of all members.

Public Member Functions

 RVNGBinaryData ()
 RVNGBinaryData (const RVNGBinaryData &)
 RVNGBinaryData (const unsigned char *buffer, const unsigned long bufferSize)
 RVNGBinaryData (const RVNGString &base64)
 RVNGBinaryData (const char *base64)
 ~RVNGBinaryData ()
void append (const RVNGBinaryData &data)
void append (const unsigned char *buffer, const unsigned long bufferSize)
void append (const unsigned char c)
void appendBase64Data (const RVNGString &base64)
void appendBase64Data (const char *base64)
void clear ()
 Remove current content.
unsigned long size () const
 Get the size of the content in bytes.
bool empty () const
 Test if the content is empty.
const unsigned char * getDataBuffer () const
 Get the data buffer.
const RVNGString getBase64Data () const
 Get the content encoded as base64.
RVNGInputStreamgetDataStream () const
 Create a stream for the data.
RVNGBinaryDataoperator= (const RVNGBinaryData &)
 Assign the content of another RVNGBinaryData object.

Private Attributes

RVNGBinaryDataImplm_binaryDataImpl

Detailed Description

A representation of arbitrary binary data.


Constructor & Destructor Documentation

librevenge::RVNGBinaryData::RVNGBinaryData ( const unsigned char *  buffer,
const unsigned long  bufferSize 
)
librevenge::RVNGBinaryData::RVNGBinaryData ( const char *  base64) [explicit]

Member Function Documentation

void librevenge::RVNGBinaryData::append ( const unsigned char *  buffer,
const unsigned long  bufferSize 
)
void librevenge::RVNGBinaryData::append ( const unsigned char  c)
void librevenge::RVNGBinaryData::appendBase64Data ( const char *  base64)

Remove current content.

Test if the content is empty.

Returns:
true if the content is emtpy, false otherwise.

Get the content encoded as base64.

Returns:
a string containing a base64 representation of the content

Referenced by librevenge::RVNGBinaryDataProperty::getStr().

const unsigned char * librevenge::RVNGBinaryData::getDataBuffer ( ) const

Get the data buffer.

The buffer is managed internally, so it shall not be deleted. If this object is empty, 0 is returned.

Returns:
the data buffer or 0 if emtpy

Create a stream for the data.

The stream is managed internally, so it shall not be deleted. If this object is empty, 0 is returned.

Warning:
The stream is destroyed (and the pointer thus becomes invalid) when this object is either deleted or changed.
Returns:
a stream or 0
RVNGBinaryData & librevenge::RVNGBinaryData::operator= ( const RVNGBinaryData dataBuf)

Assign the content of another RVNGBinaryData object.

Returns:
this object
unsigned long librevenge::RVNGBinaryData::size ( ) const

Get the size of the content in bytes.

Returns:
the size of the content.

Member Data Documentation


The documentation for this class was generated from the following files: