blob: a6ff52a2e714cb77251d4feffb82735abc5b205d [file] [log] [blame]
// Copyright 2016 The PDFium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#ifndef FXJS_CFX_KEYVALUE_H_
#define FXJS_CFX_KEYVALUE_H_
#include <memory>
#include <vector>
#include "core/fxcrt/bytestring.h"
class CFX_KeyValue;
class CFX_Value {
public:
enum class DataType : uint8_t {
kNumber = 0,
kBoolean,
kString,
kObject,
kNull
};
CFX_Value();
~CFX_Value();
DataType nType = DataType::kNull;
bool bData = false;
double dData = 0.0;
ByteString sData;
std::vector<std::unique_ptr<CFX_KeyValue>> objData;
};
class CFX_KeyValue : public CFX_Value {
public:
CFX_KeyValue();
~CFX_KeyValue();
ByteString sKey;
};
#endif // FXJS_CFX_KEYVALUE_H_