blob: a4a9e082cd71bba760d76eba105aefcd2fdc249a [file] [log] [blame]
Václav Kubernát24df80e2018-06-06 15:18:03 +02001/*
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#include "ast_commands.hpp"
9
Václav Kubernátebca2552018-06-08 19:06:02 +020010enum_::enum_() = default;
11
12enum_::enum_(const std::string& value)
13 : m_value(value)
14{
15}
Václav Kubernát24df80e2018-06-06 15:18:03 +020016
Václav Kubernáteeb38842019-03-20 19:46:05 +010017identityRef_::identityRef_() = default;
18
19identityRef_::identityRef_(const std::string& value)
20 : m_value(value)
21{
22}
23
24identityRef_::identityRef_(const std::string& module, const std::string& value)
25 : m_prefix(module_{module})
26 , m_value(value)
27{
28}
29
Václav Kubernátab538992019-03-06 15:30:50 +010030binary_::binary_() = default;
31
32binary_::binary_(const std::string& value)
33 : m_value(value)
34{
35}
36
Václav Kubernát24df80e2018-06-06 15:18:03 +020037bool set_::operator==(const set_& b) const
38{
39 return this->m_path == b.m_path && this->m_data == b.m_data;
40}
41
42bool cd_::operator==(const cd_& b) const
43{
44 return this->m_path == b.m_path;
45}
46
Václav Kubernát11afac72018-07-18 14:59:53 +020047bool ls_::operator==(const ls_& b) const
48{
Václav Kubernáte7d4aea2018-09-11 18:15:48 +020049 return this->m_path == b.m_path && this->m_options == b.m_options;
Václav Kubernát11afac72018-07-18 14:59:53 +020050}
51
Václav Kubernáteeb38842019-03-20 19:46:05 +010052bool identityRef_::operator==(const identityRef_& b) const
53{
54 return this->m_prefix == b.m_prefix && this->m_value == b.m_value;
55}
56
Václav Kubernátab538992019-03-06 15:30:50 +010057bool binary_::operator==(const binary_& b) const
58{
59 return this->m_value == b.m_value;
60}
61
Václav Kubernátebca2552018-06-08 19:06:02 +020062bool enum_::operator==(const enum_& b) const
63{
64 return this->m_value == b.m_value;
65}
66
Václav Kubernát24df80e2018-06-06 15:18:03 +020067bool create_::operator==(const create_& b) const
68{
69 return this->m_path == b.m_path;
70}
71
72bool delete_::operator==(const delete_& b) const
73{
74 return this->m_path == b.m_path;
75}