PoDoFo 1.2.0
Loading...
Searching...
No Matches
PdfMemoryObjectStream.h
1// SPDX-FileCopyrightText: 2007 Dominik Seichter <domseichter@web.de>
2// SPDX-FileCopyrightText: 2020 Francesco Pretto <ceztko@gmail.com>
3// SPDX-License-Identifier: LGPL-2.0-or-later OR MPL-2.0
4
5#ifndef PDF_MEMORY_OBJECT_STREAM_H
6#define PDF_MEMORY_OBJECT_STREAM_H
7
8#include "PdfDeclarations.h"
9
10#include "PdfObjectStreamProvider.h"
11
12namespace PoDoFo {
13
24class PODOFO_API PdfMemoryObjectStream final : public PdfObjectStreamProvider
25{
26 friend class PdfObject;
27 friend class PdfIndirectObjectList;
28 PODOFO_PRIVATE_FRIEND(class PdfImmediateWriter);
29
30private:
32
33public:
34 void Init(PdfObject& obj) override;
35
36 void Clear() override;
37
38 bool TryCopyFrom(const PdfObjectStreamProvider& rhs) override;
39
40 bool TryMoveFrom(PdfObjectStreamProvider&& rhs) override;
41
42 std::unique_ptr<InputStream> GetInputStream(PdfObject& obj) override;
43
44 std::unique_ptr<OutputStream> GetOutputStream(PdfObject& obj) override;
45
46 void Write(OutputStream& stream, const PdfStatefulEncrypt* encrypt) override;
47
48 size_t GetLength() const override;
49
50 const charbuff& GetBuffer() const { return m_buffer; }
51
52 private:
53 charbuff m_buffer;
54};
55
56};
57
58#endif // PDF_MEMORY_OBJECT_STREAM_H
This file should be included as the FIRST file in every header of PoDoFo lib.
An interface for writing blocks of data to a data source.
Definition OutputStream.h:16
A list of PdfObjects that constitutes the indirect object list of the document The PdfParser will rea...
Definition PdfIndirectObjectList.h:29
A PDF stream can be appended to any PdfObject and can contain arbitrary data.
Definition PdfMemoryObjectStream.h:25
This class represents a PDF indirect Object in memory.
Definition PdfObject.h:33
Convenient type for char array storage and/or buffer with std::string compatibility.
Definition basetypes.h:35
All classes, functions, types and enums of PoDoFo are members of these namespace.
Definition basetypes.h:13