Václav Kubernát | 7edb537 | 2019-12-13 12:40:49 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2019 CESNET, https://photonics.cesnet.cz/ |
| 3 | * |
| 4 | * Written by Václav Kubernát <kubervac@fit.cvut.cz> |
| 5 | * |
| 6 | */ |
| 7 | #include "ast_values.hpp" |
| 8 | |
| 9 | enum_::enum_() = default; |
| 10 | |
| 11 | enum_::enum_(const std::string& value) |
| 12 | : m_value(value) |
| 13 | { |
| 14 | } |
| 15 | |
| 16 | identityRef_::identityRef_() = default; |
| 17 | |
| 18 | identityRef_::identityRef_(const std::string& value) |
| 19 | : m_value(value) |
| 20 | { |
| 21 | } |
| 22 | |
| 23 | identityRef_::identityRef_(const std::string& module, const std::string& value) |
| 24 | : m_prefix(module_{module}) |
| 25 | , m_value(value) |
| 26 | { |
| 27 | } |
| 28 | |
| 29 | binary_::binary_() = default; |
| 30 | |
| 31 | binary_::binary_(const std::string& value) |
| 32 | : m_value(value) |
| 33 | { |
| 34 | } |
| 35 | |
| 36 | bool identityRef_::operator==(const identityRef_& b) const |
| 37 | { |
| 38 | return this->m_prefix == b.m_prefix && this->m_value == b.m_value; |
| 39 | } |
| 40 | |
| 41 | bool binary_::operator==(const binary_& b) const |
| 42 | { |
| 43 | return this->m_value == b.m_value; |
| 44 | } |
| 45 | |
| 46 | bool enum_::operator==(const enum_& b) const |
| 47 | { |
| 48 | return this->m_value == b.m_value; |
| 49 | } |
| 50 | |