Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cfx_read_only_string_stream.h
Go to the documentation of this file.
1// Copyright 2022 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CORE_FXCRT_CFX_READ_ONLY_STRING_STREAM_H_
6#define CORE_FXCRT_CFX_READ_ONLY_STRING_STREAM_H_
7
8#include "core/fxcrt/bytestring.h"
9#include "core/fxcrt/fx_stream.h"
10#include "core/fxcrt/retain_ptr.h"
11
12class CFX_ReadOnlySpanStream;
13
14class CFX_ReadOnlyStringStream final : public IFX_SeekableReadStream {
15 public:
17
18 // IFX_SeekableReadStream:
19 FX_FILESIZE GetSize() override;
20 bool ReadBlockAtOffset(pdfium::span<uint8_t> buffer,
21 FX_FILESIZE offset) override;
22
23 private:
24 explicit CFX_ReadOnlyStringStream(ByteString data);
26
27 const ByteString data_;
28 const RetainPtr<CFX_ReadOnlySpanStream> stream_;
29};
30
31#endif // CORE_FXCRT_CFX_READ_ONLY_STRING_STREAM_H_
~CFX_ReadOnlyStringStream() override
bool ReadBlockAtOffset(pdfium::span< uint8_t > buffer, FX_FILESIZE offset) override
bool GetPagePos(uint32_t index, FX_FILESIZE *szPageStartPos, FX_FILESIZE *szPageLength, uint32_t *dwObjNum) const
CPDF_LinearizedHeader(const CPDF_Dictionary *pDict, FX_FILESIZE szLastXRefOffset)
static RetainPtr< IFX_SeekableReadStream > CreateFromFilename(const char *filename)
Definition fx_stream.cpp:68
TEST_F(CPDF_CIDFontTest, BUG_920636)
#define FX_FILESIZE
Definition fx_types.h:19
#define CHECK(cvref)
#define CONSTRUCT_VIA_MAKE_RETAIN
Definition retain_ptr.h:224