librevenge::RVNGBinaryData Class Reference documentation

librevenge::RVNGBinaryData Class Reference

A representation of arbitrary binary data. More...

`#include <RVNGBinaryData.h>`

## 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.
RVNGInputStream * | getDataStream () const
| Create a stream for the data.
RVNGBinaryData & | operator= (const RVNGBinaryData &)
| Assign the content of another `RVNGBinaryData` object.

## Private Attributes
RVNGBinaryDataImpl * | m_binaryDataImpl

## Detailed Description

A representation of arbitrary binary data.

## Constructor & Destructor Documentation

## ◆ RVNGBinaryData() [1/5]

librevenge::RVNGBinaryData::RVNGBinaryData | ( |  | ) |

Referenced by append(), operator=(), and RVNGBinaryData().

## ◆ RVNGBinaryData() [2/5]

librevenge::RVNGBinaryData::RVNGBinaryData | ( | const RVNGBinaryData & | data | ) |

## ◆ RVNGBinaryData() [3/5]

librevenge::RVNGBinaryData::RVNGBinaryData | ( | const unsigned char * | buffer,
|  | const unsigned long | bufferSize )

## ◆ RVNGBinaryData() [4/5]

librevenge::RVNGBinaryData::RVNGBinaryData | ( | const RVNGString & | base64 | ) |
| explicit

## ◆ RVNGBinaryData() [5/5]

librevenge::RVNGBinaryData::RVNGBinaryData | ( | const char * | base64 | ) |
| explicit

## ◆ ~RVNGBinaryData()

librevenge::RVNGBinaryData::~RVNGBinaryData | ( |  | ) |

## Member Function Documentation

## ◆ append() [1/3]

void librevenge::RVNGBinaryData::append | ( | const RVNGBinaryData & | data | ) |

Referenced by appendBase64Data(), and appendBase64Data().

## ◆ append() [2/3]

void librevenge::RVNGBinaryData::append | ( | const unsigned char * | buffer,
|  | const unsigned long | bufferSize )

## ◆ append() [3/3]

void librevenge::RVNGBinaryData::append | ( | const unsigned char | c | ) |

## ◆ appendBase64Data() [1/2]

void librevenge::RVNGBinaryData::appendBase64Data | ( | const char * | base64 | ) |

## ◆ appendBase64Data() [2/2]

void librevenge::RVNGBinaryData::appendBase64Data | ( | const RVNGString & | base64 | ) |

## ◆ clear()

void librevenge::RVNGBinaryData::clear | ( |  | ) |

Remove current content.

## ◆ empty()

bool librevenge::RVNGBinaryData::empty | ( |  | ) | const

Test if the content is empty.

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

## ◆ getBase64Data()

const RVNGString librevenge::RVNGBinaryData::getBase64Data | ( |  | ) | const

Get the content encoded as base64.

Returns
  a string containing a base64 representation of the content

## ◆ getDataBuffer()

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

## ◆ getDataStream()

RVNGInputStream * librevenge::RVNGBinaryData::getDataStream | ( |  | ) | const

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

## ◆ operator=()

RVNGBinaryData & librevenge::RVNGBinaryData::operator= | ( | const RVNGBinaryData & | dataBuf | ) |

Assign the content of another `RVNGBinaryData` object.

Returns
  `this` object

## ◆ size()

unsigned long librevenge::RVNGBinaryData::size | ( |  | ) | const

Get the size of the content in bytes.

Returns
  the size of the content.

## Member Data Documentation

## ◆ m_binaryDataImpl

RVNGBinaryDataImpl* librevenge::RVNGBinaryData::m_binaryDataImpl
| private

Referenced by append(), append(), append(), clear(), empty(), getBase64Data(), getDataBuffer(), getDataStream(), operator=(), RVNGBinaryData(), RVNGBinaryData(), RVNGBinaryData(), RVNGBinaryData(), RVNGBinaryData(), size(), and ~RVNGBinaryData().

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

- RVNGBinaryData.h
- RVNGBinaryData.cpp