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
cpdf_security_handler.h
Go to the documentation of this file.
1// Copyright 2016 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// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#ifndef CORE_FPDFAPI_PARSER_CPDF_SECURITY_HANDLER_H_
8#define CORE_FPDFAPI_PARSER_CPDF_SECURITY_HANDLER_H_
9
10#include <stddef.h>
11#include <stdint.h>
12
13#include <memory>
14
15#include "core/fpdfapi/parser/cpdf_crypto_handler.h"
16#include "core/fxcrt/bytestring.h"
17#include "core/fxcrt/retain_ptr.h"
18
19class CPDF_Array;
20class CPDF_Dictionary;
21
22class CPDF_SecurityHandler final : public Retainable {
23 public:
25
26 bool OnInit(const CPDF_Dictionary* pEncryptDict,
27 RetainPtr<const CPDF_Array> pIdArray,
28 const ByteString& password);
29 void OnCreate(CPDF_Dictionary* pEncryptDict,
30 const CPDF_Array* pIdArray,
31 const ByteString& password);
32
33 // When `get_owner_perms` is true, returns full permissions if unlocked by
34 // owner.
35 uint32_t GetPermissions(bool get_owner_perms) const;
36 bool IsMetadataEncrypted() const;
37
39 return m_pCryptoHandler.get();
40 }
41
42 // Take |password| and encode it, if necessary, based on the password encoding
43 // conversion.
44 ByteString GetEncodedPassword(ByteStringView password) const;
45
46 private:
47 enum PasswordEncodingConversion {
48 kUnknown,
49 kNone,
50 kLatin1ToUtf8,
51 kUtf8toLatin1,
52 };
53
54 CPDF_SecurityHandler();
56
57 bool LoadDict(const CPDF_Dictionary* pEncryptDict);
58 bool LoadDict(const CPDF_Dictionary* pEncryptDict,
60 size_t* key_len);
61
62 ByteString GetUserPassword(const ByteString& owner_password) const;
63 bool CheckPassword(const ByteString& user_password, bool bOwner);
64 bool CheckPasswordImpl(const ByteString& password, bool bOwner);
65 bool CheckUserPassword(const ByteString& password, bool bIgnoreEncryptMeta);
66 bool CheckOwnerPassword(const ByteString& password);
67 bool AES256_CheckPassword(const ByteString& password, bool bOwner);
68 void AES256_SetPassword(CPDF_Dictionary* pEncryptDict,
69 const ByteString& password);
70 void AES256_SetPerms(CPDF_Dictionary* pEncryptDict);
71 bool CheckSecurity(const ByteString& password);
72
73 void InitCryptoHandler();
74
75 bool m_bOwnerUnlocked = false;
76 int m_Version = 0;
77 int m_Revision = 0;
78 uint32_t m_Permissions = 0;
79 size_t m_KeyLen = 0;
81 PasswordEncodingConversion m_PasswordEncodingConversion = kUnknown;
82 ByteString m_FileId;
83 RetainPtr<const CPDF_Dictionary> m_pEncryptDict;
84 std::unique_ptr<CPDF_CryptoHandler> m_pCryptoHandler;
85 uint8_t m_EncryptKey[32] = {};
86};
87
88#endif // CORE_FPDFAPI_PARSER_CPDF_SECURITY_HANDLER_H_
uint32_t FX_HashCode_GetLoweredAsIfW(ByteStringView str)
uint32_t FX_HashCode_GetLoweredA(ByteStringView str)
uint32_t FX_HashCode_GetAsIfW(ByteStringView str)
uint32_t FX_HashCode_GetA(ByteStringView str)
CPDF_ArrayLocker(RetainPtr< CPDF_Array > pArray)
const_iterator begin() const
Definition cpdf_array.h:176
const_iterator end() const
Definition cpdf_array.h:180
CPDF_ArrayLocker(const CPDF_Array *pArray)
CPDF_ArrayLocker(RetainPtr< const CPDF_Array > pArray)
size_t size() const
Definition cpdf_array.h:41
void Append(RetainPtr< CPDF_Stream > stream)=delete
bool GetBooleanAt(size_t index, bool bDefault) const
void SetAt(size_t index, RetainPtr< CPDF_Object > object)
RetainPtr< CPDF_Dictionary > GetMutableDictAt(size_t index)
RetainPtr< CPDF_Object > CloneNonCyclic(bool bDirect, std::set< const CPDF_Object * > *pVisited) const override
bool IsEmpty() const
Definition cpdf_array.h:40
RetainPtr< const CPDF_Object > GetDirectObjectAt(size_t index) const
RetainPtr< const CPDF_Stream > GetStreamAt(size_t index) const
Type GetType() const override
absl::optional< size_t > Find(const CPDF_Object *pThat) const
CPDF_Array * AsMutableArray() override
RetainPtr< const CPDF_Object > GetObjectAt(size_t index) const
RetainPtr< CPDF_Object > GetMutableObjectAt(size_t index)
std::enable_if<!CanInternStrings< T >::value, RetainPtr< T > >::type AppendNew(Args &&... args)
Definition cpdf_array.h:85
WideString GetUnicodeTextAt(size_t index) const
RetainPtr< CPDF_Array > GetMutableArrayAt(size_t index)
RetainPtr< CPDF_Object > Clone() const override
std::enable_if< CanInternStrings< T >::value, RetainPtr< T > >::type AppendNew(Args &&... args)
Definition cpdf_array.h:91
RetainPtr< const CPDF_Dictionary > GetDictAt(size_t index) const
std::enable_if<!CanInternStrings< T >::value, RetainPtr< T > >::type InsertNewAt(size_t index, Args &&... args)
Definition cpdf_array.h:109
bool IsLocked() const
Definition cpdf_array.h:141
RetainPtr< CPDF_Stream > GetMutableStreamAt(size_t index)
bool Contains(const CPDF_Object *pThat) const
void ConvertToIndirectObjectAt(size_t index, CPDF_IndirectObjectHolder *pHolder)
std::enable_if< CanInternStrings< T >::value, RetainPtr< T > >::type InsertNewAt(size_t index, Args &&... args)
Definition cpdf_array.h:115
std::enable_if<!CanInternStrings< T >::value, RetainPtr< T > >::type SetNewAt(size_t index, Args &&... args)
Definition cpdf_array.h:97
bool WriteTo(IFX_ArchiveStream *archive, const CPDF_Encryptor *encryptor) const override
RetainPtr< CPDF_Object > GetMutableDirectObjectAt(size_t index)
CFX_Matrix GetMatrix() const
~CPDF_Array() override
int GetIntegerAt(size_t index) const
void SetAt(size_t index, RetainPtr< CPDF_Stream > stream)=delete
void InsertAt(size_t index, RetainPtr< CPDF_Object > object)
ByteString GetByteStringAt(size_t index) const
std::enable_if< CanInternStrings< T >::value, RetainPtr< T > >::type SetNewAt(size_t index, Args &&... args)
Definition cpdf_array.h:103
void Append(RetainPtr< CPDF_Object > object)
RetainPtr< const CPDF_String > GetStringAt(size_t index) const
RetainPtr< const CPDF_Array > GetArrayAt(size_t index) const
RetainPtr< const CPDF_Number > GetNumberAt(size_t index) const
CFX_FloatRect GetRect() const
void InsertAt(size_t index, RetainPtr< CPDF_Stream > stream)=delete
void RemoveAt(size_t index)
float GetFloatAt(size_t index) const
CPDF_Creator(CPDF_Document *pDoc, RetainPtr< IFX_RetainableWriteStream > archive)
bool SetFileVersion(int32_t fileVersion)
void RemoveSecurity()
bool Create(uint32_t flags)
CPDF_Dictionary * GetMutableTrailerForTesting()
void SetFree(uint32_t obj_num)
const CPDF_Dictionary * trailer() const
const ObjectInfo * GetObjectInfo(uint32_t obj_num) const
CPDF_CrossRefTable(RetainPtr< CPDF_Dictionary > trailer, uint32_t trailer_object_number)
void Update(std::unique_ptr< CPDF_CrossRefTable > new_cross_ref)
const std::map< uint32_t, ObjectInfo > & objects_info() const
static std::unique_ptr< CPDF_CrossRefTable > MergeUp(std::unique_ptr< CPDF_CrossRefTable > current, std::unique_ptr< CPDF_CrossRefTable > top)
void AddCompressed(uint32_t obj_num, uint32_t archive_obj_num, uint32_t archive_obj_index)
uint32_t trailer_object_number() const
void AddNormal(uint32_t obj_num, uint16_t gen_num, bool is_object_stream, FX_FILESIZE pos)
void SetTrailer(RetainPtr< CPDF_Dictionary > trailer, uint32_t trailer_object_number)
void SetObjectMapSize(uint32_t size)
bool DecryptObjectTree(RetainPtr< CPDF_Object > object)
static bool IsSignatureDictionary(const CPDF_Dictionary *dictionary)
CPDF_CryptoHandler(Cipher cipher, const uint8_t *key, size_t keylen)
size_t EncryptGetSize(pdfium::span< const uint8_t > source) const
void EncryptContent(uint32_t objnum, uint32_t gennum, pdfium::span< const uint8_t > source, uint8_t *dest_buf, size_t &dest_size) const
const_iterator end() const
CPDF_DictionaryLocker(const CPDF_Dictionary *pDictionary)
const_iterator begin() const
CPDF_DictionaryLocker(RetainPtr< const CPDF_Dictionary > pDictionary)
CPDF_DictionaryLocker(RetainPtr< CPDF_Dictionary > pDictionary)
Type GetType() const override
bool KeyExist(const ByteString &key) const
int GetIntegerFor(const ByteString &key) const
RetainPtr< const CPDF_Stream > GetStreamFor(const ByteString &key) const
RetainPtr< const CPDF_Number > GetNumberFor(const ByteString &key) const
void SetFor(const ByteString &key, RetainPtr< CPDF_Object > object)
ByteString GetByteStringFor(const ByteString &key, const ByteString &default_str) const
std::enable_if< CanInternStrings< T >::value, RetainPtr< T > >::type SetNewFor(const ByteString &key, Args &&... args)
RetainPtr< CPDF_Object > RemoveFor(ByteStringView key)
RetainPtr< CPDF_Array > GetOrCreateArrayFor(const ByteString &key)
void SetMatrixFor(const ByteString &key, const CFX_Matrix &matrix)
RetainPtr< CPDF_Stream > GetMutableStreamFor(const ByteString &key)
RetainPtr< CPDF_Object > GetMutableDirectObjectFor(const ByteString &key)
RetainPtr< const CPDF_Dictionary > GetDictFor(const ByteString &key) const
RetainPtr< CPDF_Array > GetMutableArrayFor(const ByteString &key)
float GetFloatFor(const ByteString &key) const
RetainPtr< CPDF_Dictionary > GetOrCreateDictFor(const ByteString &key)
void ConvertToIndirectObjectFor(const ByteString &key, CPDF_IndirectObjectHolder *pHolder)
WideString GetUnicodeTextFor(const ByteString &key) const
RetainPtr< CPDF_Object > Clone() const override
const CPDF_Dictionary * GetDictInternal() const override
RetainPtr< CPDF_Object > CloneNonCyclic(bool bDirect, std::set< const CPDF_Object * > *visited) const override
CPDF_Dictionary * AsMutableDictionary() override
std::vector< ByteString > GetKeys() const
bool GetBooleanFor(const ByteString &key, bool bDefault) const
ByteString GetByteStringFor(const ByteString &key) const
int GetDirectIntegerFor(const ByteString &key) const
RetainPtr< const CPDF_String > GetStringFor(const ByteString &key) const
WeakPtr< ByteStringPool > GetByteStringPool() const
void SetRectFor(const ByteString &key, const CFX_FloatRect &rect)
RetainPtr< CPDF_Dictionary > GetMutableDictFor(const ByteString &key)
RetainPtr< const CPDF_Object > GetDirectObjectFor(const ByteString &key) const
bool WriteTo(IFX_ArchiveStream *archive, const CPDF_Encryptor *encryptor) const override
RetainPtr< const CPDF_Array > GetArrayFor(const ByteString &key) const
size_t size() const
RetainPtr< const CPDF_Object > GetObjectFor(const ByteString &key) const
int GetIntegerFor(const ByteString &key, int default_int) const
~CPDF_Dictionary() override
bool IsLocked() const
void SetFor(const ByteString &key, RetainPtr< CPDF_Stream > stream)=delete
CFX_FloatRect GetRectFor(const ByteString &key) const
std::enable_if<!CanInternStrings< T >::value &&!std::is_same< T, CPDF_Stream >::value, RetainPtr< T > >::type SetNewFor(const ByteString &key, Args &&... args)
ByteString GetNameFor(const ByteString &key) const
CFX_Matrix GetMatrixFor(const ByteString &key) const
RetainPtr< CPDF_Object > GetMutableObjectFor(const ByteString &key)
void ReplaceKey(const ByteString &oldkey, const ByteString &newkey)
virtual void DeletePage(int page_index)=0
virtual ~Extension()=default
virtual bool ContainsExtensionForm() const =0
virtual bool ContainsExtensionFullForm() const =0
virtual int GetPageCount() const =0
virtual bool ContainsExtensionForegroundForm() const =0
virtual ~LinkListIface()=default
void SetDocument(CPDF_Document *pDoc)
CPDF_Document * GetDocument() const
virtual void MaybePurgeImage(uint32_t objnum)=0
virtual void ClearStockFont()=0
virtual RetainPtr< CPDF_StreamAcc > GetFontFileStreamAcc(RetainPtr< const CPDF_Stream > pFontStream)=0
virtual void MaybePurgeFontFileStreamAcc(RetainPtr< CPDF_StreamAcc > &&pStreamAcc)=0
void SetDocument(CPDF_Document *pDoc)
CPDF_Document * GetDocument() const
~CPDF_Document() override
bool has_valid_cross_reference_table() const
JBig2_DocumentContext * GetOrCreateCodecContext()
CPDF_Parser::Error LoadLinearizedDoc(RetainPtr< CPDF_ReadValidator > validator, const ByteString &password)
RetainPtr< CPDF_Object > ParseIndirectObject(uint32_t objnum) override
uint32_t GetParsedPageCountForTesting()
bool IsPageLoaded(int iPage) const
RetainPtr< const CPDF_Dictionary > GetPageDictionary(int iPage)
int GetPageCount() const
RetainPtr< CPDF_Dictionary > CreateNewPage(int iPage)
void DeletePage(int iPage)
void SetExtension(std::unique_ptr< Extension > pExt)
void SetLinksContext(std::unique_ptr< LinkListIface > pContext)
PageDataIface * GetPageData() const
bool IsModifiedAPStream(const CPDF_Stream *stream) const
RetainPtr< const CPDF_Array > GetFileIdentifier() const
void MaybePurgeImage(uint32_t objnum)
void MaybePurgeFontFileStreamAcc(RetainPtr< CPDF_StreamAcc > &&pStreamAcc)
RetainPtr< CPDF_Dictionary > GetMutableRoot()
RetainPtr< CPDF_Dictionary > GetInfo()
RenderDataIface * GetRenderData() const
LinkListIface * GetLinksContext() const
CPDF_Document(std::unique_ptr< RenderDataIface > pRenderData, std::unique_ptr< PageDataIface > pPageData)
CPDF_Parser::Error LoadDoc(RetainPtr< IFX_SeekableReadStream > pFileAccess, const ByteString &password)
void ResizePageListForTesting(size_t size)
CPDF_Parser * GetParser() const
RetainPtr< CPDF_Dictionary > GetMutablePageDictionary(int iPage)
bool MovePages(pdfium::span< const int > page_indices, int dest_page_index)
int GetPageIndex(uint32_t objnum)
Extension * GetExtension() const
uint32_t GetUserPermissions(bool get_owner_perms) const
RetainPtr< CPDF_StreamAcc > GetFontFileStreamAcc(RetainPtr< const CPDF_Stream > pFontStream)
void SetRootForTesting(RetainPtr< CPDF_Dictionary > root)
bool TryInit() override
static bool IsValidPageObject(const CPDF_Object *obj)
const CPDF_Dictionary * GetRoot() const
void SetParser(std::unique_ptr< CPDF_Parser > pParser)
static constexpr int kPageMaxNum
void SetPageObjNum(int iPage, uint32_t objNum)
void IncrementParsedPageCount()
RetainPtr< CPDF_Stream > CreateModifiedAPStream()
CPDF_Encryptor(const CPDF_CryptoHandler *pHandler, int objnum)
DataVector< uint8_t > Encrypt(pdfium::span< const uint8_t > src_data) const
bool WriteDictTo(IFX_ArchiveStream *archive, const CPDF_Encryptor *encryptor) const
pdfium::span< const uint8_t > GetSpan() const
CPDF_FlateEncoder(RetainPtr< const CPDF_Stream > pStream, bool bFlateEncode)
void UpdateLength(size_t size)
RetainPtr< const CPDF_Object > GetIndirectObject(uint32_t objnum) const
std::enable_if<!CanInternStrings< T >::value, RetainPtr< T > >::type New(Args &&... args)
RetainPtr< T > NewIndirect(Args &&... args)
RetainPtr< CPDF_Object > GetOrParseIndirectObject(uint32_t objnum)
WeakPtr< ByteStringPool > GetByteStringPool() const
std::enable_if< CanInternStrings< T >::value, RetainPtr< T > >::type New(Args &&... args)
virtual RetainPtr< CPDF_Object > ParseIndirectObject(uint32_t objnum)
RetainPtr< CPDF_Object > GetMutableIndirectObject(uint32_t objnum)
uint32_t AddIndirectObject(RetainPtr< CPDF_Object > pObj)
bool ReplaceIndirectObjectIfHigherGeneration(uint32_t objnum, RetainPtr< CPDF_Object > pObj)
bool WriteTo(IFX_ArchiveStream *archive, const CPDF_Encryptor *encryptor) const override
float GetNumber() const override
bool IsInteger() const
Definition cpdf_number.h:30
int GetInteger() const override
RetainPtr< CPDF_Object > Clone() const override
void SetString(const ByteString &str) override
~CPDF_Number() override
ByteString GetString() const override
CPDF_Number * AsMutableNumber() override
Type GetType() const override
void SetGenNum(uint32_t gennum)
Definition cpdf_object.h:68
RetainPtr< const CPDF_Dictionary > GetDict() const
bool IsInline() const
Definition cpdf_object.h:69
uint32_t GetGenNum() const
Definition cpdf_object.h:67
virtual Type GetType() const =0
virtual WideString GetUnicodeText() const
virtual ByteString GetString() const
RetainPtr< const CPDF_Object > GetDirect() const
uint32_t m_GenNum
bool IsName() const
virtual CPDF_Null * AsMutableNull()
const CPDF_Name * AsName() const
bool IsArray() const
const CPDF_Boolean * AsBoolean() const
virtual void SetString(const ByteString &str)
const CPDF_Null * AsNull() const
bool IsDictionary() const
bool IsStream() const
virtual RetainPtr< CPDF_Reference > MakeReference(CPDF_IndirectObjectHolder *holder) const
RetainPtr< CPDF_Object > GetMutableDirect()
const CPDF_Array * AsArray() const
virtual int GetInteger() const
CPDF_Object()=default
virtual float GetNumber() const
bool IsNull() const
bool IsBoolean() const
uint32_t GetObjNum() const
Definition cpdf_object.h:65
const CPDF_Dictionary * AsDictionary() const
virtual bool WriteTo(IFX_ArchiveStream *archive, const CPDF_Encryptor *encryptor) const =0
RetainPtr< CPDF_Object > CloneDirectObject() const
virtual CPDF_Stream * AsMutableStream()
bool IsString() const
virtual CPDF_Number * AsMutableNumber()
virtual CPDF_Dictionary * AsMutableDictionary()
virtual RetainPtr< CPDF_Object > Clone() const =0
bool IsNumber() const
virtual CPDF_Reference * AsMutableReference()
uint32_t m_ObjNum
CPDF_Object(const CPDF_Object &src)=delete
const CPDF_Stream * AsStream() const
static constexpr uint32_t kInvalidObjNum
Definition cpdf_object.h:52
virtual const CPDF_Object * GetDirectInternal() const
virtual CPDF_Name * AsMutableName()
bool IsReference() const
void SetObjNum(uint32_t objnum)
Definition cpdf_object.h:66
const CPDF_String * AsString() const
uint64_t KeyForCache() const
virtual CPDF_Array * AsMutableArray()
const CPDF_Reference * AsReference() const
virtual RetainPtr< CPDF_Object > CloneNonCyclic(bool bDirect, std::set< const CPDF_Object * > *pVisited) const
virtual CPDF_String * AsMutableString()
const CPDF_Number * AsNumber() const
RetainPtr< CPDF_Dictionary > GetMutableDict()
RetainPtr< CPDF_Object > CloneObjectNonCyclic(bool bDirect) const
virtual const CPDF_Dictionary * GetDictInternal() const
~CPDF_Object() override
virtual CPDF_Boolean * AsMutableBoolean()
bool IsObjectFreeOrNull(uint32_t objnum) const
void SetSyntaxParserForTesting(std::unique_ptr< CPDF_SyntaxParser > parser)
bool RebuildCrossRef()
uint32_t GetPermissions(bool get_owner_perms) const
const CPDF_Dictionary * GetTrailer() const
FX_FILESIZE GetObjectPositionOrZero(uint32_t objnum) const
void SetLinearizedHeaderForTesting(std::unique_ptr< CPDF_LinearizedHeader > pLinearized)
int GetFileVersion() const
Error StartLinearizedParse(RetainPtr< CPDF_ReadValidator > validator, const ByteString &password)
uint32_t GetRootObjNum() const
RetainPtr< const CPDF_Array > GetIDArray() const
RetainPtr< const CPDF_Dictionary > GetEncryptDict() const
std::vector< unsigned int > GetTrailerEnds()
CPDF_Parser(ParsedObjectsHolder *holder)
FX_FILESIZE GetLastXRefOffset() const
Definition cpdf_parser.h:85
RetainPtr< const CPDF_Dictionary > GetRoot() const
bool WriteToArchive(IFX_ArchiveStream *archive, FX_FILESIZE src_size)
void SetPassword(const ByteString &password)
Definition cpdf_parser.h:70
const CPDF_LinearizedHeader * GetLinearizedHeader() const
ByteString GetPassword() const
Definition cpdf_parser.h:71
static constexpr size_t kInvalidPos
Definition cpdf_parser.h:59
CPDF_Dictionary * GetMutableTrailerForTesting()
uint32_t GetTrailerObjectNumber() const
RetainPtr< CPDF_Object > ParseIndirectObjectAt(FX_FILESIZE pos, uint32_t objnum)
static constexpr uint32_t kMaxObjectNumber
Definition cpdf_parser.h:57
bool IsXRefStream() const
uint32_t GetFirstPageNo() const
Error StartParseInternal()
ByteString GetEncodedPassword() const
FX_FILESIZE GetDocumentSize() const
bool IsValidObjectNumber(uint32_t objnum) const
Error StartParse(RetainPtr< IFX_SeekableReadStream > pFile, const ByteString &password)
const CPDF_CrossRefTable * GetCrossRefTable() const
std::unique_ptr< CPDF_LinearizedHeader > ParseLinearizedHeader()
FX_FILESIZE ParseStartXRef()
bool IsObjectFree(uint32_t objnum) const
RetainPtr< CPDF_Dictionary > GetCombinedTrailer() const
uint32_t GetLastObjNum() const
const RetainPtr< CPDF_SecurityHandler > & GetSecurityHandler() const
RetainPtr< CPDF_Object > ParseIndirectObject(uint32_t objnum)
bool LoadCrossRefV4(FX_FILESIZE pos, bool bSkip)
uint32_t GetInfoObjNum() const
bool xref_table_rebuilt() const
CPDF_CryptoHandler * GetCryptoHandler() const
bool OnInit(const CPDF_Dictionary *pEncryptDict, RetainPtr< const CPDF_Array > pIdArray, const ByteString &password)
~CPDF_SecurityHandler() override
uint32_t GetPermissions(bool get_owner_perms) const
void OnCreate(CPDF_Dictionary *pEncryptDict, const CPDF_Array *pIdArray, const ByteString &password)
ByteString GetEncodedPassword(ByteStringView password) const
bool IsInteger() const
Definition fx_number.cpp:86
FX_Number(int32_t value)
Definition fx_number.cpp:20
FX_Number(float value)
Definition fx_number.cpp:22
FX_Number(uint32_t value)=delete
int32_t GetSigned() const
Definition fx_number.cpp:96
float GetFloat() const
bool IsSigned() const
Definition fx_number.cpp:91
FX_Number(ByteStringView str)
Definition fx_number.cpp:24
virtual FX_FILESIZE CurrentOffset() const =0
static RetainPtr< IFX_SeekableReadStream > CreateFromFilename(const char *filename)
Definition fx_stream.cpp:68
virtual size_t ReadBlock(pdfium::span< uint8_t > buffer)
Definition fx_stream.cpp:88
virtual FX_FILESIZE GetPosition()
Definition fx_stream.cpp:84
virtual bool ReadBlockAtOffset(pdfium::span< uint8_t > buffer, FX_FILESIZE offset)=0
virtual bool IsEOF()
Definition fx_stream.cpp:80
bool WriteBlock(pdfium::span< const uint8_t > buffer) override
Definition fx_stream.cpp:92
virtual bool WriteBlockAtOffset(pdfium::span< const uint8_t > data, FX_FILESIZE offset)=0
bool WriteBlock(pdfium::span< const uint8_t > buffer) override
Definition fx_stream.cpp:76
virtual bool Flush()=0
virtual FX_FILESIZE GetSize()=0
bool WriteFilesize(FX_FILESIZE size)
Definition fx_stream.cpp:61
bool WriteByte(uint8_t byte)
Definition fx_stream.cpp:51
bool WriteString(ByteStringView str)
Definition fx_stream.cpp:47
virtual ~IFX_WriteStream()=default
bool WriteDWord(uint32_t i)
Definition fx_stream.cpp:55
virtual bool WriteBlock(pdfium::span< const uint8_t > data)=0
virtual size_t GetLength() const
void AppendUint8(uint8_t value)
BinaryBuffer & operator=(const BinaryBuffer &that)=delete
void AppendUint16(uint16_t value)
virtual ~BinaryBuffer()
DataVector< uint8_t > m_buffer
void AppendSpan(pdfium::span< const uint8_t > span)
size_t GetSize() const
pdfium::span< const uint8_t > GetSpan() const
void DeleteBuf(size_t start_index, size_t count)
void AppendDouble(double value)
void ExpandBuf(size_t size)
bool IsEmpty() const
void AppendString(const ByteString &str)
void EstimateSize(size_t size)
BinaryBuffer & operator=(BinaryBuffer &&that) noexcept
BinaryBuffer(BinaryBuffer &&that) noexcept
void AppendUint32(uint32_t value)
BinaryBuffer(const BinaryBuffer &that)=delete
pdfium::span< uint8_t > GetMutableSpan()
DataVector< uint8_t > DetachBuffer()
void SetAllocStep(size_t step)
void TrimLeft(ByteStringView targets)
bool IsValidLength(size_t length) const
Definition bytestring.h:121
bool Contains(ByteStringView lpszSub, size_t start=0) const
Definition bytestring.h:187
const_iterator begin() const
Definition bytestring.h:102
bool IsValidIndex(size_t index) const
Definition bytestring.h:120
static ByteString FormatFloat(float f)
ByteStringView AsStringView() const
Definition bytestring.h:87
uint32_t GetID() const
Definition bytestring.h:213
void Reserve(size_t len)
ByteString(const char *ptr)
bool EqualNoCase(ByteStringView str) const
static ByteString Format(const char *pFormat,...)
ByteString & operator+=(const ByteString &str)
bool operator!=(ByteStringView str) const
Definition bytestring.h:131
size_t GetLength() const
Definition bytestring.h:115
ByteString Substr(size_t first, size_t count) const
size_t GetStringLength() const
Definition bytestring.h:116
size_t InsertAtBack(char ch)
Definition bytestring.h:162
bool operator==(ByteStringView str) const
pdfium::span< const uint8_t > raw_span() const
Definition bytestring.h:97
void AllocCopy(ByteString &dest, size_t nCopyLen, size_t nCopyIndex) const
void AssignCopy(const char *pSrcData, size_t nSrcLen)
bool Contains(char ch, size_t start=0) const
Definition bytestring.h:191
absl::optional< size_t > ReverseFind(char ch) const
intptr_t ReferenceCountForTesting() const
size_t Delete(size_t index, size_t count=1)
const_reverse_iterator rend() const
Definition bytestring.h:111
ByteString & operator+=(char ch)
const uint8_t * raw_str() const
Definition bytestring.h:80
void ReallocBeforeWrite(size_t nNewLen)
ByteString(ByteStringView bstrc)
RetainPtr< StringData > m_pData
Definition bytestring.h:225
static ByteString FormatInteger(int i)
pdfium::span< char > GetBuffer(size_t nMinBufLength)
void Trim(char target)
bool operator==(const ByteString &other) const
bool operator==(const char *ptr) const
const_iterator end() const
Definition bytestring.h:103
ByteString(const ByteString &other)
size_t Remove(char ch)
ByteString(const char *pStr, size_t len)
bool operator<(ByteStringView str) const
ByteString(wchar_t)=delete
ByteString & operator+=(const char *str)
ByteString & operator+=(ByteStringView str)
ByteString(const uint8_t *pStr, size_t len)
size_t Replace(ByteStringView pOld, ByteStringView pNew)
absl::optional< size_t > Find(ByteStringView subStr, size_t start=0) const
bool operator!=(const ByteString &other) const
Definition bytestring.h:132
void SetAt(size_t index, char c)
ByteString & operator=(ByteStringView str)
ByteString(ByteStringView str1, ByteStringView str2)
void Trim(ByteStringView targets)
ByteString & operator=(const char *str)
static ByteString FormatV(const char *pFormat, va_list argList)
void TrimRight(char target)
const char * c_str() const
Definition bytestring.h:76
ByteString Substr(size_t offset) const
ByteString & operator=(const ByteString &that)
ByteString & operator=(ByteString &&that) noexcept
bool IsEmpty() const
Definition bytestring.h:119
void TrimRight(ByteStringView targets)
bool operator<(const ByteString &other) const
ByteString(const std::initializer_list< ByteStringView > &list)
CharType operator[](const size_t index) const
Definition bytestring.h:150
const_reverse_iterator rbegin() const
Definition bytestring.h:108
CharType Back() const
Definition bytestring.h:156
CharType Front() const
Definition bytestring.h:155
bool operator!=(const char *ptr) const
Definition bytestring.h:130
int Compare(ByteStringView str) const
size_t Insert(size_t index, char ch)
void ReleaseBuffer(size_t nNewLength)
ByteString(const fxcrt::ostringstream &outStream)
void TrimLeft(char target)
size_t InsertAtFront(char ch)
Definition bytestring.h:161
ByteString First(size_t count) const
void AllocBeforeWrite(size_t nNewLen)
bool operator<(const char *ptr) const
void Concat(const char *pSrcData, size_t nSrcLen)
absl::optional< size_t > Find(char ch, size_t start=0) const
ByteString(ByteString &&other) noexcept
ByteString Last(size_t count) const
virtual void OnObservableDestroyed()=0
virtual ~ObserverIface()=default
Observable(const Observable &that)=delete
void AddObserver(ObserverIface *pObserver)
size_t ActiveObserversForTesting() const
void RemoveObserver(ObserverIface *pObserver)
Observable & operator=(const Observable &that)=delete
ObservedPtr(T *pObservable)
ObservedPtr()=default
ObservedPtr & operator=(const ObservedPtr &that)
bool operator==(const ObservedPtr &that) const
void OnObservableDestroyed() override
bool HasObservable() const
~ObservedPtr() override
void Reset(T *pObservable=nullptr)
T & operator*() const
ObservedPtr(const ObservedPtr &that)
bool operator!=(const ObservedPtr &that) const
bool operator!=(const U *that) const
bool operator==(const U *that) const
T * operator->() const
U * AsRaw() const
Definition retain_ptr.h:107
RetainPtr & operator=(const RetainPtr< U > &that)
Definition retain_ptr.h:89
operator bool() const
Definition retain_ptr.h:149
void Unleak(T *ptr)
Definition retain_ptr.h:130
RetainPtr(std::nullptr_t ptr)
Definition retain_ptr.h:35
void Reset(T *obj=nullptr)
Definition retain_ptr.h:116
bool operator!=(const RetainPtr &that) const
Definition retain_ptr.h:133
void Swap(RetainPtr &that)
Definition retain_ptr.h:126
RetainPtr() noexcept=default
RetainPtr(RetainPtr &&that) noexcept
Definition retain_ptr.h:48
bool operator!=(const U &that) const
Definition retain_ptr.h:141
RetainPtr & operator=(const RetainPtr &that)
Definition retain_ptr.h:72
bool operator==(const RetainPtr &that) const
Definition retain_ptr.h:132
T & operator*() const
Definition retain_ptr.h:150
bool operator==(const U &that) const
Definition retain_ptr.h:136
RetainPtr & operator=(RetainPtr &&that) noexcept
Definition retain_ptr.h:80
T * operator->() const
Definition retain_ptr.h:151
RetainPtr & operator=(RetainPtr< U > &&that) noexcept
Definition retain_ptr.h:99
RetainPtr(const RetainPtr< U > &that)
Definition retain_ptr.h:54
T * Get() const noexcept
Definition retain_ptr.h:123
~RetainPtr()=default
bool operator<(const RetainPtr &that) const
Definition retain_ptr.h:145
RetainPtr(const RetainPtr &that) noexcept
Definition retain_ptr.h:44
operator T*() const noexcept
Definition retain_ptr.h:122
RetainPtr & operator=(std::nullptr_t) noexcept
Definition retain_ptr.h:65
UnownedPtr< T > BackPointer() const
Definition retain_ptr.h:125
RetainPtr(RetainPtr< U > &&that) noexcept
Definition retain_ptr.h:60
RetainPtr< U > As() const
Definition retain_ptr.h:112
RetainPtr(T *pObj) noexcept
Definition retain_ptr.h:37
bool HasOneRef() const
Definition retain_ptr.h:162
Retainable()=default
virtual ~Retainable()=default
void CopyContents(const CharType *pStr, size_t nLen)
static StringDataTemplate * Create(size_t nLen)
void CopyContents(const StringDataTemplate &other)
bool CanOperateInPlace(size_t nTotalLen) const
static StringDataTemplate * Create(const CharType *pStr, size_t nLen)
void CopyContentsAt(size_t offset, const CharType *pStr, size_t nLen)
StringType Intern(const StringType &str)
absl::optional< size_t > Find(CharType ch) const
bool operator>(const StringViewTemplate &that) const
StringViewTemplate(const CharType *ptr) noexcept
bool operator<(const StringViewTemplate &that) const
constexpr StringViewTemplate(const UnsignedType *ptr, size_t size) noexcept
bool IsValidLength(size_t length) const
constexpr StringViewTemplate(const CharType *ptr, size_t size) noexcept
bool operator!=(const CharType *ptr) const
StringViewTemplate TrimmedRight(CharType ch) const
pdfium::span< const UnsignedType > m_Span
bool EqualsASCII(const StringViewTemplate< char > &that) const
const CharType * unterminated_c_str() const
bool operator==(const CharType *ptr) const
bool Contains(CharType ch) const
bool EqualsASCIINoCase(const StringViewTemplate< char > &that) const
pdfium::span< const UnsignedType > raw_span() const
StringViewTemplate Substr(size_t first, size_t count) const
bool operator==(const StringViewTemplate &other) const
const_iterator end() const
const UnsignedType & operator[](const size_t index) const
StringViewTemplate Last(size_t count) const
CharType CharAt(const size_t index) const
bool operator!=(const StringViewTemplate &other) const
StringViewTemplate First(size_t count) const
constexpr StringViewTemplate(const pdfium::span< const CharType > &other) noexcept
constexpr StringViewTemplate(const StringViewTemplate &src) noexcept=default
const_iterator begin() const
StringViewTemplate & operator=(const StringViewTemplate &src)
const_reverse_iterator rend() const
StringViewTemplate & operator=(const CharType *src)
StringViewTemplate Substr(size_t offset) const
constexpr StringViewTemplate() noexcept=default
constexpr StringViewTemplate(const CharType &ch) noexcept
const_reverse_iterator rbegin() const
const UnsignedType * raw_str() const
bool IsValidIndex(size_t index) const
constexpr StringViewTemplate(const pdfium::span< const UnsignedType > &other) noexcept
T * get() const noexcept
UnownedPtr(const UnownedPtr< U > &that)
Definition unowned_ptr.h:98
bool operator==(const UnownedPtr &that) const
operator T*() const noexcept
UnownedPtr(UnownedPtr< U > &&that) noexcept
UnownedPtr & operator=(UnownedPtr< U > &&that) noexcept
constexpr UnownedPtr(const UnownedPtr &that) noexcept=default
constexpr UnownedPtr(T *pObj) noexcept
Definition unowned_ptr.h:83
UnownedPtr & operator=(T *that) noexcept
bool operator==(std::nullptr_t ptr) const
UnownedPtr & operator=(UnownedPtr &&that) noexcept
UnownedPtr & operator=(std::nullptr_t) noexcept
UnownedPtr & operator=(const UnownedPtr< U > &that) noexcept
T * operator->() const
constexpr UnownedPtr() noexcept=default
bool operator<(const UnownedPtr &that) const
UnownedPtr & operator=(const UnownedPtr &that) noexcept=default
T & operator*() const
constexpr UnownedPtr(UnownedPtr &&that) noexcept
Definition unowned_ptr.h:91
constexpr UnownedPtr(std::nullptr_t ptr)
Definition unowned_ptr.h:81
bool operator==(const WeakPtr &that) const
Definition weak_ptr.h:40
void Swap(WeakPtr &that)
Definition weak_ptr.h:56
T * operator->()
Definition weak_ptr.h:34
void Reset()
Definition weak_ptr.h:52
T * Get() const
Definition weak_ptr.h:45
WeakPtr()=default
void Reset(std::unique_ptr< T, D > pObj)
Definition weak_ptr.h:53
WeakPtr(std::unique_ptr< T, D > pObj)
Definition weak_ptr.h:25
WeakPtr(const WeakPtr &that)
Definition weak_ptr.h:23
WeakPtr & operator=(const WeakPtr &that)
Definition weak_ptr.h:36
WeakPtr(std::nullptr_t arg)
Definition weak_ptr.h:30
operator bool() const
Definition weak_ptr.h:32
void DeleteObject()
Definition weak_ptr.h:46
const T * operator->() const
Definition weak_ptr.h:35
bool HasOneRef() const
Definition weak_ptr.h:33
WeakPtr(WeakPtr &&that) noexcept
Definition weak_ptr.h:24
bool operator!=(const WeakPtr &that) const
Definition weak_ptr.h:43
WideString(char)=delete
WideString(const std::initializer_list< WideStringView > &list)
WideString & operator+=(const WideString &str)
WideString(wchar_t ch)
bool operator==(const WideString &other) const
size_t Insert(size_t index, wchar_t ch)
ByteString ToUTF8() const
static WideString Format(const wchar_t *pFormat,...)
WideString(WideString &&other) noexcept
WideString(const wchar_t *pStr, size_t len)
WideString & operator=(WideString &&that) noexcept
WideString(WideStringView str1, WideStringView str2)
WideString First(size_t count) const
static WideString FromUTF8(ByteStringView str)
WideString & operator+=(const wchar_t *str)
const_reverse_iterator rbegin() const
Definition widestring.h:103
void Trim(WideStringView targets)
pdfium::span< wchar_t > GetBuffer(size_t nMinBufLength)
bool operator==(const wchar_t *ptr) const
WideString & operator+=(wchar_t ch)
size_t Replace(WideStringView pOld, WideStringView pNew)
void TrimLeft(wchar_t target)
WideStringView AsStringView() const
Definition widestring.h:85
void TrimLeft(WideStringView targets)
void SetAt(size_t index, wchar_t c)
bool operator<(WideStringView str) const
bool EqualsASCIINoCase(ByteStringView that) const
Definition widestring.h:219
CharType operator[](const size_t index) const
Definition widestring.h:146
bool IsEmpty() const
Definition widestring.h:118
CharType Front() const
Definition widestring.h:151
const wchar_t * c_str() const
Definition widestring.h:81
void TrimRight(WideStringView targets)
static WideString FromDefANSI(ByteStringView str)
void AssignCopy(const wchar_t *pSrcData, size_t nSrcLen)
WideString(const WideString &other)
int GetInteger() const
int CompareNoCase(const wchar_t *str) const
void AllocCopy(WideString &dest, size_t nCopyLen, size_t nCopyIndex) const
WideString(const wchar_t *ptr)
bool IsValidIndex(size_t index) const
Definition widestring.h:119
absl::optional< size_t > Find(wchar_t ch, size_t start=0) const
bool Contains(char ch, size_t start=0) const
Definition widestring.h:208
static size_t WStringLength(const unsigned short *str)
static WideString FromLatin1(ByteStringView str)
size_t InsertAtBack(wchar_t ch)
Definition widestring.h:167
bool IsASCII() const
Definition widestring.h:215
size_t InsertAtFront(wchar_t ch)
Definition widestring.h:166
bool operator==(WideStringView str) const
bool operator!=(const WideString &other) const
Definition widestring.h:140
ByteString ToLatin1() const
intptr_t ReferenceCountForTesting() const
bool Contains(WideStringView lpszSub, size_t start=0) const
Definition widestring.h:204
static WideString FromUTF16BE(pdfium::span< const uint8_t > data)
bool operator<(const WideString &other) const
int Compare(const wchar_t *str) const
size_t GetLength() const
Definition widestring.h:114
WideString & operator=(const WideString &that)
void TrimRight(wchar_t target)
WideString EncodeEntities() const
void ReallocBeforeWrite(size_t nNewLength)
ByteString ToASCII() const
static WideString FromASCII(ByteStringView str)
WideString & operator+=(WideStringView str)
const_iterator end() const
Definition widestring.h:98
static WideString FromUTF16LE(pdfium::span< const uint8_t > data)
void ReleaseBuffer(size_t nNewLength)
size_t GetStringLength() const
Definition widestring.h:115
WideString Last(size_t count) const
int Compare(const WideString &str) const
const_reverse_iterator rend() const
Definition widestring.h:106
WideString & operator=(const wchar_t *str)
void Concat(const wchar_t *pSrcData, size_t nSrcLen)
WideString Substr(size_t offset) const
const_iterator begin() const
Definition widestring.h:97
WideString(WideStringView str)
void Trim(wchar_t target)
size_t Remove(wchar_t ch)
CharType Back() const
Definition widestring.h:152
absl::optional< size_t > ReverseFind(wchar_t ch) const
bool operator!=(const wchar_t *ptr) const
Definition widestring.h:138
static WideString FormatV(const wchar_t *lpszFormat, va_list argList)
ByteString ToUTF16LE() const
static WideString FormatInteger(int i)
size_t Delete(size_t index, size_t count=1)
bool EqualsASCII(ByteStringView that) const
Definition widestring.h:216
ByteString ToDefANSI() const
void Reserve(size_t len)
bool operator<(const wchar_t *ptr) const
void AllocBeforeWrite(size_t nNewLength)
WideString Substr(size_t first, size_t count) const
bool IsValidLength(size_t length) const
Definition widestring.h:120
absl::optional< size_t > Find(WideStringView subStr, size_t start=0) const
bool operator!=(WideStringView str) const
Definition widestring.h:139
WideString & operator=(WideStringView str)
RetainPtr< StringData > m_pData
Definition widestring.h:246
CPDF_Array * ToArray(CPDF_Object *obj)
Definition cpdf_array.h:189
const CPDF_Array * ToArray(const CPDF_Object *obj)
Definition cpdf_array.h:193
RetainPtr< CPDF_Array > ToArray(RetainPtr< CPDF_Object > obj)
Definition cpdf_array.h:197
#define FPDFCREATE_INCREMENTAL
#define FPDFCREATE_NO_ORIGINAL
const CPDF_Dictionary * ToDictionary(const CPDF_Object *obj)
RetainPtr< CPDF_Dictionary > ToDictionary(RetainPtr< CPDF_Object > obj)
CPDF_Dictionary * ToDictionary(CPDF_Object *obj)
const CPDF_Number * ToNumber(const CPDF_Object *obj)
Definition cpdf_number.h:46
RetainPtr< CPDF_Number > ToNumber(RetainPtr< CPDF_Object > obj)
Definition cpdf_number.h:50
CPDF_Number * ToNumber(CPDF_Object *obj)
Definition cpdf_number.h:42
NOINLINE void FX_OutOfMemoryTerminate(size_t size)
Definition fx_memory.cpp:37
void FXMEM_DefaultFree(void *pointer)
Definition fx_memory.cpp:33
void * FXMEM_DefaultAlloc(size_t byte_size)
Definition fx_memory.cpp:21
void * FXMEM_DefaultCalloc(size_t num_elems, size_t byte_size)
Definition fx_memory.cpp:25
void * FXMEM_DefaultRealloc(void *pointer, size_t new_size)
Definition fx_memory.cpp:29
void * FX_ArrayBufferAllocate(size_t length)
void FX_InitializeMemoryAllocators()
void FX_ArrayBufferFree(void *data)
void * FX_ArrayBufferAllocateUninitialized(size_t length)
void * FX_Random_MT_Start(uint32_t dwSeed)
Definition fx_random.cpp:85
uint32_t FX_Random_MT_Generate(void *pContext)
Definition fx_random.cpp:96
void FX_Random_MT_Close(void *pContext)
size_t FloatToString(float f, pdfium::span< char > buf)
constexpr uint32_t FXBSTR_ID(uint8_t c1, uint8_t c2, uint8_t c3, uint8_t c4)
Definition fx_string.h:19
double StringToDouble(WideStringView wsStr)
float StringToFloat(ByteStringView str)
ByteString FX_UTF8Encode(WideStringView wsStr)
Definition fx_string.cpp:69
std::u16string FX_UTF16Encode(WideStringView wsStr)
Definition fx_string.cpp:77
size_t DoubleToString(double d, pdfium::span< char > buf)
float StringToFloat(WideStringView wsStr)
double StringToDouble(ByteStringView str)
#define FX_FILESIZE
Definition fx_types.h:19
bool operator==(const char *lhs, const ByteString &rhs)
Definition bytestring.h:233
bool operator<(const ByteStringView &lhs, const char *rhs)
Definition bytestring.h:251
WideString operator+(const wchar_t *str1, WideStringView str2)
Definition widestring.h:260
ByteString operator+(const ByteString &str1, const ByteString &str2)
Definition bytestring.h:270
ByteString operator+(ByteStringView str1, const char *str2)
Definition bytestring.h:258
bool operator<(const ByteStringView &lhs, const ByteString &rhs)
Definition bytestring.h:248
bool operator==(const wchar_t *lhs, const WideString &rhs)
Definition widestring.h:290
WideString operator+(const WideString &str1, const WideString &str2)
Definition widestring.h:269
WideString operator+(const WideString &str1, WideStringView str2)
Definition widestring.h:284
WideString operator+(const WideString &str1, wchar_t ch)
Definition widestring.h:272
bool operator==(const T *lhs, const StringViewTemplate< T > &rhs)
bool operator<(const T *lhs, const StringViewTemplate< T > &rhs)
bool operator!=(const U *lhs, const ObservedPtr< T > &rhs)
ByteString operator+(const ByteString &str1, char ch)
Definition bytestring.h:273
WideString operator+(WideStringView str1, const WideString &str2)
Definition widestring.h:287
ByteString operator+(const ByteString &str1, const char *str2)
Definition bytestring.h:279
std::vector< StrType > Split(const StrType &that, typename StrType::CharType ch)
Definition fx_string.h:38
void PrintTo(const ByteString &str, std::ostream *os)
bool operator!=(const T *lhs, const StringViewTemplate< T > &rhs)
ByteString operator+(char ch, const ByteString &str2)
Definition bytestring.h:276
ByteString operator+(const ByteString &str1, ByteStringView str2)
Definition bytestring.h:285
ByteString operator+(const char *str1, const ByteString &str2)
Definition bytestring.h:282
bool operator!=(WideStringView lhs, const WideString &rhs)
Definition widestring.h:299
bool operator!=(ByteStringView lhs, const ByteString &rhs)
Definition bytestring.h:242
bool operator!=(const char *lhs, const ByteString &rhs)
Definition bytestring.h:239
ByteString operator+(ByteStringView str1, ByteStringView str2)
Definition bytestring.h:255
ByteString operator+(ByteStringView str1, char ch)
Definition bytestring.h:264
bool operator<(const char *lhs, const ByteString &rhs)
Definition bytestring.h:245
bool operator==(WideStringView lhs, const WideString &rhs)
Definition widestring.h:293
bool operator!=(const wchar_t *lhs, const WideString &rhs)
Definition widestring.h:296
ByteString operator+(char ch, ByteStringView str2)
Definition bytestring.h:267
WideString operator+(WideStringView str1, const wchar_t *str2)
Definition widestring.h:257
WideString operator+(WideStringView str1, wchar_t ch)
Definition widestring.h:263
void PrintTo(const WideString &str, std::ostream *os)
ByteString operator+(ByteStringView str1, const ByteString &str2)
Definition bytestring.h:288
WideString operator+(WideStringView str1, WideStringView str2)
Definition widestring.h:254
WideString operator+(wchar_t ch, WideStringView str2)
Definition widestring.h:266
ByteString operator+(const char *str1, ByteStringView str2)
Definition bytestring.h:261
WideString operator+(wchar_t ch, const WideString &str2)
Definition widestring.h:275
WideString operator+(const wchar_t *str1, const WideString &str2)
Definition widestring.h:281
bool operator<(const wchar_t *lhs, const WideString &rhs)
Definition widestring.h:302
bool operator==(ByteStringView lhs, const ByteString &rhs)
Definition bytestring.h:236
bool operator==(const U *lhs, const ObservedPtr< T > &rhs)
WideString operator+(const WideString &str1, const wchar_t *str2)
Definition widestring.h:278
void * CallocOrDie2D(size_t w, size_t h, size_t member_size)
Definition fx_memory.cpp:79
void * AllocOrDie2D(size_t w, size_t h, size_t member_size)
Definition fx_memory.cpp:65
void * StringAllocOrDie(size_t num_members, size_t member_size)
Definition fx_memory.cpp:94
void * Alloc(size_t num_members, size_t member_size)
void * StringAlloc(size_t num_members, size_t member_size)
void * ReallocOrDie(void *ptr, size_t num_members, size_t member_size)
Definition fx_memory.cpp:86
void * Realloc(void *ptr, size_t num_members, size_t member_size)
void StringDealloc(void *ptr)
void * AllocOrDie(size_t num_members, size_t member_size)
Definition fx_memory.cpp:57
void * Calloc(size_t num_members, size_t member_size)
void * CallocOrDie(size_t num_members, size_t member_size)
Definition fx_memory.cpp:71
void Dealloc(void *ptr)
UnownedPtr< T > WrapUnowned(T *that)
RetainPtr< T > MakeRetain(Args &&... args)
Definition retain_ptr.h:209
RetainPtr< T > WrapRetain(T *that)
Definition retain_ptr.h:216
#define CHECK(cvref)
#define CONSTRUCT_VIA_MAKE_RETAIN
Definition retain_ptr.h:224
static constexpr bool value
void operator()(void *ptr) const
pointer allocate(size_type n, const void *hint=0)
void deallocate(pointer p, size_type n)
const_pointer address(const_reference x) const noexcept
FxPartitionAllocAllocator() noexcept=default
size_type max_size() const noexcept
~FxPartitionAllocAllocator()=default
pointer address(reference x) const noexcept
FxPartitionAllocAllocator(const FxPartitionAllocAllocator< U, Alloc, Free > &other) noexcept
bool operator!=(const FxPartitionAllocAllocator &that)
void construct(U *p, Args &&... args)
bool operator==(const FxPartitionAllocAllocator &that)
FxPartitionAllocAllocator(const FxPartitionAllocAllocator &other) noexcept=default
void operator()(T *ptr) const
Definition retain_ptr.h:24
size_t operator()(const ByteString &str) const
Definition bytestring.h:315
size_t operator()(const WideString &str) const
Definition widestring.h:329
#define UNOWNED_PTR_EXCLUSION
uint32_t FX_HashCode_GetLoweredW(WideStringView str)
uint32_t FX_HashCode_GetW(WideStringView str)