RVNGBinaryData.h Source File documentation

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

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
25 #include <librevenge-stream/librevenge-stream.h>
26
27 #include "RVNGString.h"
28
29 namespace librevenge
30 {
31
32 struct RVNGBinaryDataImpl;
33
36 class REVENGE_API RVNGBinaryData
37 {
38 public:
39 RVNGBinaryData();
40 RVNGBinaryData(const RVNGBinaryData &);
41 RVNGBinaryData(const unsigned char *buffer, const unsigned long bufferSize);
42 explicit RVNGBinaryData(const RVNGString &base64);
43 explicit RVNGBinaryData(const char *base64);
44 ~RVNGBinaryData();
45
46 void append(const RVNGBinaryData &data);
47 void append(const unsigned char *buffer, const unsigned long bufferSize);
48 void append(const unsigned char c);
49 void appendBase64Data(const RVNGString &base64);
50 void appendBase64Data(const char *base64);
51
54 void clear();
55
60 unsigned long size() const;
61
66 bool empty() const;
67
75 const unsigned char *getDataBuffer() const;
76
81 const RVNGString getBase64Data() const;
82
93 RVNGInputStream *getDataStream() const;
94
99 RVNGBinaryData &operator=(const RVNGBinaryData &);
100
101 private:
102 RVNGBinaryDataImpl *m_binaryDataImpl;
103 };
104
105 }
106
107 #endif
108 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
librevenge
Definition: RVNGBinaryData.cpp:38
RVNGString.h
REVENGE_API
#define REVENGE_API
Definition: librevenge-api.h:34
librevenge::RVNGBinaryData
A representation of arbitrary binary data.
Definition: RVNGBinaryData.h:36
librevenge::RVNGBinaryDataImpl
Definition: RVNGBinaryData.cpp:79
librevenge-api.h
librevenge::RVNGInputStream
Definition: RVNGStream.h:33
librevenge::RVNGBinaryData::m_binaryDataImpl
RVNGBinaryDataImpl * m_binaryDataImpl
Definition: RVNGBinaryData.h:102
librevenge::RVNGString
UTF-8 string.
Definition: RVNGString.h:33
librevenge-stream.h