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
cfxjse_mapmodule.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// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#ifndef FXJS_XFA_CFXJSE_MAPMODULE_H_
8#define FXJS_XFA_CFXJSE_MAPMODULE_H_
9
10#include <stdint.h>
11
12#include <map>
13
14#include "core/fxcrt/widestring.h"
15#include "third_party/abseil-cpp/absl/types/optional.h"
16
18
20 public:
23
24 CFXJSE_MapModule(const CFXJSE_MapModule& that) = delete;
26
27 void SetValue(uint32_t key, int32_t value);
28 void SetString(uint32_t key, const WideString& wsString);
29 void SetMeasurement(uint32_t key, const CXFA_Measurement& measurement);
30 absl::optional<int32_t> GetValue(uint32_t key) const;
31 absl::optional<WideString> GetString(uint32_t key) const;
32 absl::optional<CXFA_Measurement> GetMeasurement(uint32_t key) const;
33 bool HasKey(uint32_t key) const;
34 void RemoveKey(uint32_t key);
35 void MergeDataFrom(const CFXJSE_MapModule* pSrc);
36
37 private:
38 // keyed by result of GetMapKey_*().
39 std::map<uint32_t, int32_t> m_ValueMap;
40 std::map<uint32_t, WideString> m_StringMap;
41 std::map<uint32_t, CXFA_Measurement> m_MeasurementMap;
42};
43
44#endif // FXJS_XFA_CFXJSE_MAPMODULE_H_
absl::optional< int32_t > GetValue(uint32_t key) const
absl::optional< WideString > GetString(uint32_t key) const
absl::optional< CXFA_Measurement > GetMeasurement(uint32_t key) const
void MergeDataFrom(const CFXJSE_MapModule *pSrc)
void SetValue(uint32_t key, int32_t value)
void SetMeasurement(uint32_t key, const CXFA_Measurement &measurement)
CFXJSE_MapModule & operator=(const CFXJSE_MapModule &that)=delete
void SetString(uint32_t key, const WideString &wsString)
void RemoveKey(uint32_t key)
CFXJSE_MapModule(const CFXJSE_MapModule &that)=delete
bool HasKey(uint32_t key) const