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_keyvalue.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 FXJS_CFX_KEYVALUE_H_
8#define FXJS_CFX_KEYVALUE_H_
9
10#include <memory>
11#include <vector>
12
13#include "core/fxcrt/bytestring.h"
14
15class CFX_KeyValue;
16
17class CFX_Value {
18 public:
19 enum class DataType : uint8_t {
20 kNumber = 0,
22 kString,
23 kObject,
24 kNull
25 };
26
29
31 bool bData = false;
32 double dData = 0.0;
33 ByteString sData;
35};
36
37class CFX_KeyValue : public CFX_Value {
38 public:
41
42 ByteString sKey;
43};
44
45#endif // FXJS_CFX_KEYVALUE_H_
virtual ~Delegate()=default
virtual absl::optional< pdfium::span< uint8_t > > LoadBuffer()=0
virtual bool StoreBuffer(pdfium::span< const uint8_t > pBuffer)=0
virtual void BufferDone()=0
bool SetGlobalVariablePersistent(ByteString propname, bool bPersistent)
Element * GetAt(int index)
void SetGlobalVariableObject(ByteString propname, std::vector< std::unique_ptr< CFX_KeyValue > > array)
void SetGlobalVariableNull(ByteString propname)
void SetGlobalVariableNumber(ByteString propname, double dData)
bool DeleteGlobalVariable(ByteString propname)
static CFX_GlobalData * GetRetainedInstance(Delegate *pDelegate)
void SetGlobalVariableBoolean(ByteString propname, bool bData)
Element * GetGlobalVariable(const ByteString &sPropname)
void SetGlobalVariableString(ByteString propname, const ByteString &sData)
int32_t GetSize() const
ByteString sKey
std::vector< std::unique_ptr< CFX_KeyValue > > objData
ByteString sData
double dData
DataType nType
void AppendUint16(uint16_t value)
void AppendSpan(pdfium::span< const uint8_t > span)
pdfium::span< const uint8_t > GetSpan() const
void AppendDouble(double value)
void AppendString(const ByteString &str)
void AppendUint32(uint32_t value)
pdfium::span< uint8_t > GetMutableSpan()