7#include "fxjs/xfa/cfxjse_mapmodule.h"
9#include "third_party/base/containers/contains.h"
10#include "xfa/fxfa/parser/cxfa_measurement.h"
17 m_StringMap.erase(key);
18 m_MeasurementMap.erase(key);
19 m_ValueMap[key] = value;
23 m_ValueMap.erase(key);
24 m_MeasurementMap.erase(key);
25 m_StringMap[key] = wsString;
30 m_ValueMap.erase(key);
31 m_StringMap.erase(key);
32 m_MeasurementMap[key] = measurement;
36 auto it = m_ValueMap.find(key);
37 if (it == m_ValueMap.end())
43 auto it = m_StringMap.find(key);
44 if (it == m_StringMap.end())
51 auto it = m_MeasurementMap.find(key);
52 if (it == m_MeasurementMap.end())
58 return pdfium::Contains(m_ValueMap, key) ||
59 pdfium::Contains(m_StringMap, key) ||
60 pdfium::Contains(m_MeasurementMap, key);
64 m_ValueMap.erase(key);
65 m_StringMap.erase(key);
66 m_MeasurementMap.erase(key);
70 for (
const auto& pair : pSrc->m_ValueMap)
71 SetValue(pair.first, pair.second);
73 for (
const auto& pair : pSrc->m_StringMap)
74 SetString(pair.first, pair.second);
76 for (
const auto& pair : pSrc->m_MeasurementMap)
77 SetMeasurement(pair.first, pair.second);
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)
void SetString(uint32_t key, const WideString &wsString)
void RemoveKey(uint32_t key)
bool HasKey(uint32_t key) const