librevenge::RVNGBinaryData Class Reference documentation

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Private Attributes | List of all members
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. More...
unsigned long | size () const
| Get the size of the content in bytes. More...
bool | empty () const
| Test if the content is empty. More...
const unsigned char * | getDataBuffer () const
| Get the data buffer. More...
const RVNGString | getBase64Data () const
| Get the content encoded as base64. More...
RVNGInputStream * | getDataStream () const
| Create a stream for the data. More...
RVNGBinaryData & | operator= (const RVNGBinaryData &)
| Assign the content of another `RVNGBinaryData` object. More...

## Private Attributes
RVNGBinaryDataImpl * | m_binaryDataImpl

## Detailed Description

A representation of arbitrary binary data.

## Constructor & Destructor Documentation

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

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

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

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

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

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

## Member Function Documentation

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

Referenced by appendBase64Data().

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 RVNGString & | base64 | ) |

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

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

Remove current content.

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

Test if the content is empty.

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

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

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

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

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

RVNGBinaryDataImpl* librevenge::RVNGBinaryData::m_binaryDataImpl
| private

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

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

- RVNGBinaryData.h
- RVNGBinaryData.cpp