Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
cfx_read_only_vector_stream.cpp
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
#
include
"core/fxcrt/cfx_read_only_vector_stream.h"
6
7
#
include
<
utility
>
8
9
#
include
"core/fxcrt/cfx_read_only_span_stream.h"
10
#
include
"core/fxcrt/span.h"
11
12
CFX_ReadOnlyVectorStream::CFX_ReadOnlyVectorStream(DataVector<uint8_t> data)
13
: data_(std::move(data)),
14
stream_(pdfium::MakeRetain<CFX_ReadOnlySpanStream>(data_)) {}
15
16
CFX_ReadOnlyVectorStream::CFX_ReadOnlyVectorStream(
17
FixedSizeDataVector<uint8_t> data)
18
: fixed_data_(std::move(data)),
19
stream_(pdfium::MakeRetain<CFX_ReadOnlySpanStream>(fixed_data_)) {}
20
21
CFX_ReadOnlyVectorStream::~
CFX_ReadOnlyVectorStream
() =
default
;
22
23
FX_FILESIZE
CFX_ReadOnlyVectorStream::
GetSize
() {
24
return
stream_->GetSize();
25
}
26
27
bool
CFX_ReadOnlyVectorStream::
ReadBlockAtOffset
(pdfium::span<uint8_t> buffer,
28
FX_FILESIZE
offset) {
29
return
stream_->ReadBlockAtOffset(buffer, offset);
30
}
CFX_ReadOnlyVectorStream::GetSize
FX_FILESIZE GetSize() override
Definition
cfx_read_only_vector_stream.cpp:23
CFX_ReadOnlyVectorStream::~CFX_ReadOnlyVectorStream
~CFX_ReadOnlyVectorStream() override
CFX_ReadOnlyVectorStream::ReadBlockAtOffset
bool ReadBlockAtOffset(pdfium::span< uint8_t > buffer, FX_FILESIZE offset) override
Definition
cfx_read_only_vector_stream.cpp:27
FX_FILESIZE
#define FX_FILESIZE
Definition
fx_types.h:19
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fxcrt
cfx_read_only_vector_stream.cpp
Generated on
for Qt by
1.18.0