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
autonuller.h
Go to the documentation of this file.
1// Copyright 2020 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_AUTONULLER_H_
6#define CORE_FXCRT_AUTONULLER_H_
7
8#include "core/fxcrt/fx_memory.h"
9#include "core/fxcrt/unowned_ptr.h"
10
11namespace fxcrt {
12
13template <typename T>
15 public:
16 FX_STACK_ALLOCATED();
17
18 explicit AutoNuller(T* location) : m_Location(location) {}
20 if (m_Location)
21 *m_Location = nullptr;
22 }
23 void AbandonNullification() { m_Location = nullptr; }
24
25 private:
26 UnownedPtr<T> m_Location;
27};
28
29} // namespace fxcrt
30
31using fxcrt::AutoNuller;
32
33#endif // CORE_FXCRT_AUTONULLER_H_
CFX_FloatRect(const CFX_FloatRect &that)=default
constexpr CFX_FloatRect()=default
void UpdateRect(const CFX_PointF &point)
void Intersect(const CFX_FloatRect &other_rect)
CFX_FloatRect & operator=(const CFX_FloatRect &that)=default
CFX_Matrix & operator=(const CFX_Matrix &other)=default
CFX_FloatRect TransformRect(const CFX_FloatRect &rect) const
CFX_Matrix(float a1, float b1, float c1, float d1, float e1, float f1)
bool IsIdentity() const
void Concat(const CFX_Matrix &right)
bool m_CloseFigure
Definition cfx_path.h:35
static RetainPtr< CPDF_ColorSpace > GetStockCS(Family family)
CPDF_DictionaryLocker(const CPDF_Dictionary *pDictionary)
uint32_t ComponentBits() const
bool CanReadCoords() const
bool CanReadFlag() const
void SkipBits(uint32_t nbits)
void AppendRect(float left, float bottom, float right, float top)
Definition cpdf_path.cpp:53
void Transform(const CFX_Matrix &matrix)
Definition cpdf_path.cpp:41
ShadingType GetShadingType() const
CPDF_StreamContentParser(CPDF_Document *pDoc, RetainPtr< CPDF_Dictionary > pPageResources, RetainPtr< CPDF_Dictionary > pParentResources, const CFX_Matrix *pmtContentToUser, CPDF_PageObjectHolder *pObjHolder, RetainPtr< CPDF_Dictionary > pResources, const CFX_FloatRect &rcBBox, const CPDF_AllStates *pStates, CPDF_Form::RecursionState *parse_state)
uint32_t Parse(pdfium::span< const uint8_t > pData, uint32_t start_offset, uint32_t max_cost, const std::vector< uint32_t > &stream_start_offsets)
static ByteStringView FindValueAbbreviationForTesting(ByteStringView abbr)
RetainPtr< CPDF_Font > FindFont(const ByteString &name)
static ByteStringView FindKeyAbbreviationForTesting(ByteStringView abbr)
void SetPos(uint32_t pos)
ElementType ParseNextElement()
const RetainPtr< CPDF_Object > & GetObject() const
uint32_t GetPos() const
RetainPtr< CPDF_Object > ReadNextObject(bool bAllowNestedArray, bool bInArray, uint32_t dwRecursionLevel)
RetainPtr< CPDF_Stream > ReadInlineStream(CPDF_Document *pDoc, RetainPtr< CPDF_Dictionary > pDict, const CPDF_Object *pCSObj)
CPDF_StreamParser(pdfium::span< const uint8_t > span, const WeakPtr< ByteStringPool > &pPool)
CPDF_StreamParser(pdfium::span< const uint8_t > span)
ByteStringView GetWord() const
float GetFloat() const
AutoNuller(T *location)
Definition autonuller.h:18
void AbandonNullification()
Definition autonuller.h:23
bool operator==(const char *ptr) const
bool IsEmpty() const
Definition bytestring.h:119
bool operator!=(const char *ptr) const
Definition bytestring.h:130
@ kCoonsPatchMeshShading
@ kTensorProductPatchMeshShading
@ kLatticeFormGouraudTriangleMeshShading
@ kFreeFormGouraudTriangleMeshShading
bool TextRenderingModeIsStrokeMode(const TextRenderingMode &mode)
TextRenderingMode
#define FX_FILESIZE
Definition fx_types.h:19
#define CHECK(cvref)