1 #ifndef _MA_CODEC_JSON_H_
2 #define _MA_CODEC_JSON_H_
19 operator bool()
const override;
33 ma_err_t write(
const std::string& key, int8_t value)
override;
34 ma_err_t write(
const std::string& key, int16_t value)
override;
35 ma_err_t write(
const std::string& key, int32_t value)
override;
36 ma_err_t write(
const std::string& key, int64_t value)
override;
37 ma_err_t write(
const std::string& key, uint8_t value)
override;
38 ma_err_t write(
const std::string& key, uint16_t value)
override;
39 ma_err_t write(
const std::string& key, uint32_t value)
override;
40 ma_err_t write(
const std::string& key, uint64_t value)
override;
42 ma_err_t write(
const std::string& key,
double value)
override;
43 ma_err_t write(
const std::string& key,
const std::string& value)
override;
47 ma_err_t write(
const std::forward_list<ma_class_t>& value)
override;
48 ma_err_t write(
const std::forward_list<ma_point_t>& value)
override;
49 ma_err_t write(
const std::forward_list<ma_bbox_t>& value)
override;
50 ma_err_t write(
const std::forward_list<ma_keypoint3f_t>& value)
override;
52 ma_err_t write(
const std::vector<ma_model_t>& value)
override;
68 ma_err_t write(
int algo_id,
int cat,
int input_from,
int tscore,
int tiou)
override;
71 const std::string&
toString()
const override;
72 const void*
data()
const override;
73 const size_t size()
const override;
79 mutable std::string m_string;
88 operator bool()
const override;
96 std::string
name()
const override;
98 ma_err_t read(
const std::string& key, int8_t& value)
const override;
99 ma_err_t read(
const std::string& key, int16_t& value)
const override;
100 ma_err_t read(
const std::string& key, int32_t& value)
const override;
101 ma_err_t read(
const std::string& key, int64_t& value)
const override;
102 ma_err_t read(
const std::string& key, uint8_t& value)
const override;
103 ma_err_t read(
const std::string& key, uint16_t& value)
const override;
104 ma_err_t read(
const std::string& key, uint32_t& value)
const override;
105 ma_err_t read(
const std::string& key, uint64_t& value)
const override;
106 ma_err_t read(
const std::string& key,
float& value)
const override;
107 ma_err_t read(
const std::string& key,
double& value)
const override;
108 ma_err_t read(
const std::string& key, std::string& value)
const override;
110 ma_err_t read(std::forward_list<ma_class_t>& value)
override;
111 ma_err_t read(std::forward_list<ma_point_t>& value)
override;
112 ma_err_t read(std::forward_list<ma_bbox_t>& value)
override;
115 std::string m_string;
Definition: ma_codec_base.h:286
Definition: ma_codec_json.h:82
ma_msg_type_t type() const override
Definition: ma_codec_json.cpp:713
ma_err_t end() override
Definition: ma_codec_json.cpp:704
std::string name() const override
Definition: ma_codec_json.cpp:721
ma_err_t code() const override
Definition: ma_codec_json.cpp:717
~DecoderJSON()
Definition: ma_codec_json.cpp:639
ma_err_t begin(const void *data, size_t size) override
Definition: ma_codec_json.cpp:654
ma_err_t read(const std::string &key, int8_t &value) const override
Definition: ma_codec_json.cpp:725
DecoderJSON()
Definition: ma_codec_json.cpp:637
Definition: ma_codec_base.h:14
Definition: ma_codec_json.h:13
const std::string & toString() const override
Encoder type for convert to string.
Definition: ma_codec_json.cpp:143
ma_err_t begin() override
Encoder type for begin.
Definition: ma_codec_json.cpp:35
const void * data() const override
Encoder type for get data.
Definition: ma_codec_json.cpp:147
ma_err_t write(const std::string &key, const char *buffer, size_t size) override
Definition: ma_codec_json.cpp:548
ma_err_t write(const std::vector< Sensor * > &value) override
ma_err_t remove(const std::string &key) override
Encoder type for remove.
Definition: ma_codec_json.cpp:165
ma_err_t end() override
Encoder type for end.
Definition: ma_codec_json.cpp:119
~EncoderJSON()
Definition: ma_codec_json.cpp:25
EncoderJSON()
Definition: ma_codec_json.cpp:9
const size_t size() const override
Encoder type for get size.
Definition: ma_codec_json.cpp:151
ma_err_t reset() override
Reset the proto object.
Definition: ma_codec_json.cpp:155
Definition: ma_sensor.h:12
ma_msg_type_t
Definition: ma_types.h:252
ma_err_t
Definition: ma_types.h:21
Definition: ma_types.h:289
Definition: ma_types.h:314
Definition: ma_types.h:323
Definition: ma_types.h:138
Definition: ma_types.h:300