5#include <unordered_map>
9#ifndef MSGPACK_DEFINE_MAP
10#define MSGPACK_DEFINE_MAP(...)
23 std::map<std::string, double>
angles;
34 return !(*
this == other);
37 MSGPACK_NVP(
"or", origin_rot), MSGPACK_NVP(
"c", color),
38 MSGPACK_NVP(
"gt", geometry_type),
39 MSGPACK_NVP(
"gp", geometry_properties),
40 MSGPACK_NVP(
"fm", field_member),
41 MSGPACK_NVP(
"ff", field_field), MSGPACK_NVP(
"a", angles))
44 std::map<std::string, std::shared_ptr<Canvas3DComponentData>>
components;
50 std::map<std::string, std::shared_ptr<Canvas3DComponentData>>
data_diff;
51 std::optional<std::vector<SharedString>>
data_ids;
55 std::map<std::string, std::shared_ptr<Canvas3DComponentData>> data_diff,
56 std::optional<std::vector<SharedString>> data_ids)
57 : field(field), data_diff(std::move(data_diff)),
58 data_ids(std::move(data_ids)) {}
60 MSGPACK_NVP(
"l", data_ids))
64 std::map<std::string, std::shared_ptr<Canvas3DComponentData>>
data_diff;
65 std::size_t length = 0;
69 const std::unordered_map<
int, std::shared_ptr<Canvas3DComponentData>>
72 : field(field), data_diff(), length(length) {
73 for (
const auto &vc : data_diff) {
74 this->data_diff.emplace(std::to_string(vc.first), vc.second);
79 const std::map<std::string, std::shared_ptr<Canvas3DComponentData>>
82 : field(field), data_diff(data_diff), length(length) {}
84 MSGPACK_NVP(
"l", length))
88 :
public MessageBase<MessageKind::canvas3d + MessageKind::res> {
89 unsigned int req_id = 0;
91 std::map<std::string, std::shared_ptr<Canvas3DComponentData>>
data_diff;
92 std::optional<std::vector<SharedString>>
data_ids;
95 const std::map<std::string, std::shared_ptr<Canvas3DComponentData>>
97 const std::optional<std::vector<SharedString>> &data_ids)
98 : req_id(req_id), sub_field(sub_field), data_diff(data_diff),
101 MSGPACK_NVP(
"d", data_diff), MSGPACK_NVP(
"l", data_ids))
105 :
public MessageBase<MessageKind::canvas3d_old + MessageKind::res> {
106 unsigned int req_id = 0;
108 std::map<std::string, std::shared_ptr<Canvas3DComponentData>>
data_diff;
109 std::size_t length = 0;
112 const std::map<std::string, std::shared_ptr<Canvas3DComponentData>>
115 : req_id(req_id), sub_field(sub_field), data_diff(data_diff),
118 MSGPACK_NVP(
"d", data_diff), MSGPACK_NVP(
"l", length))
u8stringとstringとwstringをshared_ptrで持ち共有する
Definition encoding.h:69
#define MSGPACK_DEFINE_MAP(...)
Definition canvas2d.h:10
std::array< double, 3 > origin_rot
Definition canvas3d.h:18
std::optional< SharedString > field_field
Definition canvas3d.h:22
int color
Definition canvas3d.h:19
Canvas3DComponentData()=default
std::array< double, 3 > origin_pos
Definition canvas3d.h:18
std::optional< SharedString > field_member
Definition canvas3d.h:22
bool operator==(const Canvas3DComponentData &other) const
Definition canvas3d.h:25
std::optional< int > geometry_type
Definition canvas3d.h:20
int type
Definition canvas3d.h:17
std::map< std::string, double > angles
Definition canvas3d.h:23
bool operator!=(const Canvas3DComponentData &other) const
Definition canvas3d.h:33
std::vector< double > geometry_properties
Definition canvas3d.h:21
std::map< std::string, std::shared_ptr< Canvas3DComponentData > > components
Definition canvas3d.h:44
std::vector< SharedString > data_ids
Definition canvas3d.h:45
Canvas3DOld(const SharedString &field, const std::map< std::string, std::shared_ptr< Canvas3DComponentData > > &data_diff, std::size_t length)
Definition canvas3d.h:77
SharedString field
Definition canvas3d.h:63
Canvas3DOld(const SharedString &field, const std::unordered_map< int, std::shared_ptr< Canvas3DComponentData > > &data_diff, std::size_t length)
Definition canvas3d.h:67
std::map< std::string, std::shared_ptr< Canvas3DComponentData > > data_diff
Definition canvas3d.h:64
std::optional< std::vector< SharedString > > data_ids
Definition canvas3d.h:51
Canvas3D(const SharedString &field, std::map< std::string, std::shared_ptr< Canvas3DComponentData > > data_diff, std::optional< std::vector< SharedString > > data_ids)
Definition canvas3d.h:53
SharedString field
Definition canvas3d.h:49
std::map< std::string, std::shared_ptr< Canvas3DComponentData > > data_diff
Definition canvas3d.h:50
型からkindを取得するためだけのベースクラス
Definition base.h:53
SharedString sub_field
Definition canvas3d.h:107
std::map< std::string, std::shared_ptr< Canvas3DComponentData > > data_diff
Definition canvas3d.h:108
Res(unsigned int req_id, const SharedString &sub_field, const std::map< std::string, std::shared_ptr< Canvas3DComponentData > > &data_diff, std::size_t length)
Definition canvas3d.h:111
std::optional< std::vector< SharedString > > data_ids
Definition canvas3d.h:92
Res(unsigned int req_id, const SharedString &sub_field, const std::map< std::string, std::shared_ptr< Canvas3DComponentData > > &data_diff, const std::optional< std::vector< SharedString > > &data_ids)
Definition canvas3d.h:94
SharedString sub_field
Definition canvas3d.h:90
std::map< std::string, std::shared_ptr< Canvas3DComponentData > > data_diff
Definition canvas3d.h:91
#define WEBCFACE_NS_END
Definition webcface-config.h:104
#define WEBCFACE_NS_BEGIN
Definition webcface-config.h:103