RVNGBinaryData.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2/* librevenge
3 * Version: MPL 2.0 / LGPLv2.1+
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * Major Contributor(s):
10 * Copyright (C) 2007 Fridrich Strba (fridrich.strba@bluewin.ch)
11 *
12 * For minor contributions see the git repository.
13 *
14 * Alternatively, the contents of this file may be used under the terms
15 * of the GNU Lesser General Public License Version 2.1 or later
16 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
17 * applicable instead of those above.
18 */
19
20#ifndef RVNGBINARYDATA_H
21#define RVNGBINARYDATA_H
22
23#include "librevenge-api.h"
24
26
27#include "RVNGString.h"
28
29namespace librevenge
30{
31
33
37{
38public:
42 RVNGBinaryData(const unsigned char *buffer, const unsigned long bufferSize);
43 explicit RVNGBinaryData(const RVNGString &base64);
44 explicit RVNGBinaryData(const char *base64);
46
47 void append(const RVNGBinaryData &data);
48 void append(const unsigned char *buffer, const unsigned long bufferSize);
49 void append(const unsigned char c);
50 void appendBase64Data(const RVNGString &base64);
51 void appendBase64Data(const char *base64);
52
55 void clear();
56
61 unsigned long size() const;
62
67 bool empty() const;
68
76 const unsigned char *getDataBuffer() const;
77
82 const RVNGString getBase64Data() const;
83
95
102
103private:
105};
106
107}
108
109#endif
110/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
RVNGBinaryData & operator=(const RVNGBinaryData &)
Assign the content of another RVNGBinaryData object.
Definition RVNGBinaryData.cpp:228
RVNGInputStream * getDataStream() const
Create a stream for the data.
Definition RVNGBinaryData.cpp:255
const unsigned char * getDataBuffer() const
Get the data buffer.
Definition RVNGBinaryData.cpp:240
bool empty() const
Test if the content is empty.
Definition RVNGBinaryData.cpp:223
RVNGBinaryData()
Definition RVNGBinaryData.cpp:110
const RVNGString getBase64Data() const
Get the content encoded as base64.
Definition RVNGBinaryData.cpp:247
void append(const RVNGBinaryData &data)
Definition RVNGBinaryData.cpp:159
void clear()
Remove current content.
Definition RVNGBinaryData.cpp:211
void appendBase64Data(const RVNGString &base64)
Definition RVNGBinaryData.cpp:169
unsigned long size() const
Get the size of the content in bytes.
Definition RVNGBinaryData.cpp:219
RVNGBinaryDataImpl * m_binaryDataImpl
Definition RVNGBinaryData.h:104
Definition RVNGStream.h:34
UTF-8 string.
Definition RVNGString.h:35
#define REVENGE_API
Definition librevenge-api.h:34
Definition RVNGBinaryData.cpp:41
Definition RVNGBinaryData.cpp:82

Generated for librevenge by doxygen 1.18.0