blob: b8ca68d3583dfa80c4381f570cc9810a5d603f58 [file] [log] [blame]
Václav Kubernát7edb5372019-12-13 12:40:49 +01001/*
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
9enum_::enum_() = default;
10
11enum_::enum_(const std::string& value)
12 : m_value(value)
13{
14}
15
16identityRef_::identityRef_() = default;
17
18identityRef_::identityRef_(const std::string& value)
19 : m_value(value)
20{
21}
22
23identityRef_::identityRef_(const std::string& module, const std::string& value)
24 : m_prefix(module_{module})
25 , m_value(value)
26{
27}
28
29binary_::binary_() = default;
30
31binary_::binary_(const std::string& value)
32 : m_value(value)
33{
34}
35
36bool identityRef_::operator==(const identityRef_& b) const
37{
38 return this->m_prefix == b.m_prefix && this->m_value == b.m_value;
39}
40
41bool binary_::operator==(const binary_& b) const
42{
43 return this->m_value == b.m_value;
44}
45
46bool enum_::operator==(const enum_& b) const
47{
48 return this->m_value == b.m_value;
49}
50