OSSIA
Open Scenario System for Interactive Application
Loading...
Searching...
No Matches
json_parser.hpp
1#pragma once
3#include <ossia/network/oscquery/detail/json_reader_detail.hpp>
4#include <ossia/network/oscquery/host_info.hpp>
5
6#include <memory>
7
8namespace ossia::oscquery
9{
11struct OSSIA_EXPORT json_parser
12{
13 static std::shared_ptr<rapidjson::Document> parse(const std::string& message);
14 static std::shared_ptr<rapidjson::Document> parse(const char* data, std::size_t N);
15
16 static int get_port(const rapidjson::Value& obj);
17
18 static ossia::oscquery::message_type message_type(const rapidjson::Value& obj);
19
20 static host_info parse_host_info(const rapidjson::Value& obj);
21 static void parse_namespace(ossia::net::node_base& root, const rapidjson::Value& obj);
22 static void parse_value(ossia::net::parameter_base& addr, const rapidjson::Value& obj);
23 static void parse_parameter_value(
24 ossia::net::node_base& root, const rapidjson::Value& obj,
26 static void parse_path_added(
27 ossia::net::node_base& map, const std::string& full_path,
28 const rapidjson::Value& obj);
29 static void parse_path_removed(
30 ossia::net::node_base& map, const rapidjson::Value& obj,
31 bool zombie_on_removed = true);
32 static void
33 parse_path_renamed(ossia::net::node_base& map, const rapidjson::Value& obj);
34 static void
35 parse_path_changed(ossia::net::node_base& map, const rapidjson::Value& mess);
36 static void parse_attributes_changed(
37 ossia::net::node_base& map, const rapidjson::Value& obj,
38 ossia::net::parameter_base*& request_value);
39};
40}
Root of a device tree.
Definition ossia/network/base/device.hpp:58
The node_base class.
Definition node.hpp:48
The parameter_base class.
Definition ossia/network/base/parameter.hpp:48
The message struct.
Definition message.hpp:29
Represents the capabilities of an OSCQuery server.
Definition host_info.hpp:12
Functions to parse replies to OSCQuery json requests.
Definition json_parser.hpp:12