|
|
@ -116,35 +116,12 @@ namespace std
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* visitor to produc json representations of
|
|
|
|
* visitor to produce json representations of
|
|
|
|
* vallues stored in mstch::node
|
|
|
|
* values stored in mstch::node
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
class mstch_node_to_json: public boost::static_visitor<nlohmann::json> {
|
|
|
|
class mstch_node_to_json: public boost::static_visitor<nlohmann::json> {
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
// json operator()(const int& value) const {
|
|
|
|
|
|
|
|
// return json {value};
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// json operator()(const double& value) const {
|
|
|
|
|
|
|
|
// return json {value};
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// json operator()(const uint64_t& value) const {
|
|
|
|
|
|
|
|
// return json {value};
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// json operator()(const int64_t& value) const {
|
|
|
|
|
|
|
|
// return json {value};
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// json operator()(const uint32_t& value) const {
|
|
|
|
|
|
|
|
// return json {value};
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// json operator()(const bool& value) const {
|
|
|
|
|
|
|
|
// return json {value};
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// enabled for numeric types
|
|
|
|
// enabled for numeric types
|
|
|
|
template<typename T>
|
|
|
|
template<typename T>
|
|
|
|