Václav Kubernát | 627f615 | 2018-08-29 13:23:56 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2018 CESNET, https://photonics.cesnet.cz/ |
| 3 | * Copyright (C) 2018 FIT CVUT, https://fit.cvut.cz/ |
| 4 | * |
| 5 | * Written by Václav Kubernát <kubervac@fit.cvut.cz> |
| 6 | * |
| 7 | */ |
| 8 | #pragma once |
| 9 | |
| 10 | #include <boost/variant.hpp> |
| 11 | |
| 12 | struct enum_ { |
| 13 | enum_(); |
| 14 | enum_(const std::string& value); |
| 15 | bool operator==(const enum_& b) const; |
| 16 | std::string m_value; |
| 17 | }; |
| 18 | |
Václav Kubernát | ab53899 | 2019-03-06 15:30:50 +0100 | [diff] [blame^] | 19 | struct binary_ { |
| 20 | binary_(); |
| 21 | binary_(const std::string& value); |
| 22 | bool operator==(const binary_& b) const; |
| 23 | std::string m_value; |
| 24 | }; |
| 25 | |
Václav Kubernát | 627f615 | 2018-08-29 13:23:56 +0200 | [diff] [blame] | 26 | using leaf_data_ = boost::variant<enum_, |
Václav Kubernát | ab53899 | 2019-03-06 15:30:50 +0100 | [diff] [blame^] | 27 | binary_, |
Václav Kubernát | 627f615 | 2018-08-29 13:23:56 +0200 | [diff] [blame] | 28 | double, |
| 29 | bool, |
| 30 | int32_t, |
| 31 | uint32_t, |
| 32 | std::string>; |