载入中...
搜索中...
未找到
JsonDocument.h
浏览该文件的文档.
1#pragma once
2
3#include <Poco/Dynamic/Var.h>
4#include <Poco/JSON/Array.h>
5#include <Poco/JSON/Object.h>
6
7namespace eve {
8namespace data {
9
12public:
16 explicit JsonDocument(Poco::Dynamic::Var root);
18 JsonDocument& operator=(JsonDocument&&) noexcept;
19 JsonDocument(const JsonDocument&) = delete;
20 ~JsonDocument() = default;
21
23 bool empty() const;
25 bool isObject() const;
26 bool isArray() const;
27
29 Poco::Dynamic::Var& root();
30 const Poco::Dynamic::Var& root() const;
31
33 Poco::JSON::Object::Ptr object();
34 Poco::JSON::Array::Ptr array();
35
36private:
37 Poco::Dynamic::Var root_;
38};
39
40} // namespace data
41} // namespace eve
Light2D::Data * data
Object is the base class for all game objects. It provides reference counting and dirty flag for upda...
Definition Object.h:18
Thin RAII wrapper over a Poco JSON value (object/array/scalar).
bool empty() const
True when the root value is empty.
JsonDocument()
Creates an empty document.
JsonDocument(JsonDocument &&) noexcept
Poco::JSON::Array::Ptr array()
bool isObject() const
Root type predicates.
Poco::Dynamic::Var & root()
Underlying Poco dynamic value.
Definition Build.cpp:11
@ Array
OT_ARRAY (not yet editable).