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
23class PODOFO_API PdfMemoryObjectStream final : public PdfObjectStreamProvider
24{
25 friend class PdfObject;
26 friend class PdfIndirectObjectList;
27 PODOFO_PRIVATE_FRIEND(class PdfImmediateWriter);
28
29private:
31
32public:
33 void Init(PdfObject& obj) override;
34
35 void Clear() override;
36
37 bool TryCopyFrom(const PdfObjectStreamProvider& rhs) override;
38
39 bool TryMoveFrom(PdfObjectStreamProvider&& rhs) override;
40
41 std::unique_ptr<InputStream> GetInputStream(PdfObject& obj) override;
42
43 std::unique_ptr<OutputStream> GetOutputStream(PdfObject& obj) override;
44
45 void Write(OutputStream& stream, const PdfStatefulEncrypt* encrypt) override;
46
47 size_t GetLength() const override;
48
49 const charbuff& GetBuffer() const { return m_buffer; }
50
51 private:
52 charbuff m_buffer;
53};
54
55};
56
57#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:15
A list of PdfObjects that constitutes the indirect object list of the document The PdfParser will rea...
Definition PdfIndirectObjectList.h:28
A PDF stream can be appended to any PdfObject and can contain arbitrary data.
Definition PdfMemoryObjectStream.h:24
This class represents a PDF indirect Object in memory.
Definition PdfObject.h:31
Convenient type for char array storage and/or buffer with std::string compatibility.
Definition basetypes.h:30
All classes, functions, types and enums of PoDoFo are members of these namespace.
Definition basetypes.h:13