Update Json.
This commit is contained in:
parent
0a27c6d6af
commit
11da7a3155
10 changed files with 179 additions and 87 deletions
|
@ -1,12 +1,6 @@
|
|||
/* XMRig
|
||||
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
|
||||
* Copyright 2012-2014 pooler <pooler@litecoinpool.org>
|
||||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
|
||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -27,6 +21,8 @@
|
|||
|
||||
|
||||
#include "3rdparty/rapidjson/fwd.h"
|
||||
#include "base/tools/Object.h"
|
||||
#include "base/tools/String.h"
|
||||
|
||||
|
||||
namespace xmrig {
|
||||
|
@ -35,7 +31,10 @@ namespace xmrig {
|
|||
class IJsonReader
|
||||
{
|
||||
public:
|
||||
virtual ~IJsonReader() = default;
|
||||
XMRIG_DISABLE_COPY_MOVE(IJsonReader)
|
||||
|
||||
IJsonReader() = default;
|
||||
virtual ~IJsonReader() = default;
|
||||
|
||||
virtual bool getBool(const char *key, bool defaultValue = false) const = 0;
|
||||
virtual bool isEmpty() const = 0;
|
||||
|
@ -43,8 +42,11 @@ public:
|
|||
virtual const rapidjson::Value &getArray(const char *key) const = 0;
|
||||
virtual const rapidjson::Value &getObject(const char *key) const = 0;
|
||||
virtual const rapidjson::Value &getValue(const char *key) const = 0;
|
||||
virtual const rapidjson::Value &object() const = 0;
|
||||
virtual double getDouble(const char *key, double defaultValue = 0) const = 0;
|
||||
virtual int getInt(const char *key, int defaultValue = 0) const = 0;
|
||||
virtual int64_t getInt64(const char *key, int64_t defaultValue = 0) const = 0;
|
||||
virtual String getString(const char *key, size_t maxSize) const = 0;
|
||||
virtual uint64_t getUint64(const char *key, uint64_t defaultValue = 0) const = 0;
|
||||
virtual unsigned getUint(const char *key, unsigned defaultValue = 0) const = 0;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue