Václav Kubernát | 8cd6342 | 2018-03-19 17:10:13 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2018 CESNET, https://photonics.cesnet.cz/ |
Václav Kubernát | d666296 | 2018-03-22 17:41:33 +0100 | [diff] [blame] | 3 | * Copyright (C) 2018 FIT CVUT, https://fit.cvut.cz/ |
Václav Kubernát | 8cd6342 | 2018-03-19 17:10:13 +0100 | [diff] [blame] | 4 | * |
| 5 | * Written by Václav Kubernát <kubervac@fit.cvut.cz> |
| 6 | * |
| 7 | */ |
| 8 | #include "ast.hpp" |
Václav Kubernát | b96eef7 | 2018-05-04 19:10:22 +0200 | [diff] [blame] | 9 | |
Václav Kubernát | b96eef7 | 2018-05-04 19:10:22 +0200 | [diff] [blame] | 10 | |
Václav Kubernát | d666296 | 2018-03-22 17:41:33 +0100 | [diff] [blame] | 11 | container_::container_(const std::string& name) |
| 12 | : m_name(name) |
Václav Kubernát | 8cd6342 | 2018-03-19 17:10:13 +0100 | [diff] [blame] | 13 | { |
Václav Kubernát | 8cd6342 | 2018-03-19 17:10:13 +0100 | [diff] [blame] | 14 | } |
| 15 | |
Václav Kubernát | d666296 | 2018-03-22 17:41:33 +0100 | [diff] [blame] | 16 | bool container_::operator==(const container_& b) const |
Václav Kubernát | 8cd6342 | 2018-03-19 17:10:13 +0100 | [diff] [blame] | 17 | { |
Václav Kubernát | d666296 | 2018-03-22 17:41:33 +0100 | [diff] [blame] | 18 | return this->m_name == b.m_name; |
Václav Kubernát | 8cd6342 | 2018-03-19 17:10:13 +0100 | [diff] [blame] | 19 | } |
| 20 | |
Václav Kubernát | b96eef7 | 2018-05-04 19:10:22 +0200 | [diff] [blame] | 21 | listElement_::listElement_(const std::string& listName, const std::map<std::string, std::string>& keys) |
Václav Kubernát | 0b76a04 | 2018-05-16 20:16:47 +0200 | [diff] [blame] | 22 | : m_name(listName) |
Václav Kubernát | b96eef7 | 2018-05-04 19:10:22 +0200 | [diff] [blame] | 23 | , m_keys(keys) |
| 24 | { |
| 25 | } |
| 26 | |
| 27 | bool listElement_::operator==(const listElement_& b) const |
| 28 | { |
Václav Kubernát | 0b76a04 | 2018-05-16 20:16:47 +0200 | [diff] [blame] | 29 | return (this->m_name == b.m_name && this->m_keys == b.m_keys); |
Václav Kubernát | b96eef7 | 2018-05-04 19:10:22 +0200 | [diff] [blame] | 30 | } |
| 31 | |
Václav Kubernát | d666296 | 2018-03-22 17:41:33 +0100 | [diff] [blame] | 32 | bool path_::operator==(const path_& b) const |
Václav Kubernát | 8cd6342 | 2018-03-19 17:10:13 +0100 | [diff] [blame] | 33 | { |
Václav Kubernát | d666296 | 2018-03-22 17:41:33 +0100 | [diff] [blame] | 34 | if (this->m_nodes.size() != b.m_nodes.size()) |
| 35 | return false; |
| 36 | return this->m_nodes == b.m_nodes; |
| 37 | } |
Václav Kubernát | 8cd6342 | 2018-03-19 17:10:13 +0100 | [diff] [blame] | 38 | |
Václav Kubernát | d666296 | 2018-03-22 17:41:33 +0100 | [diff] [blame] | 39 | bool cd_::operator==(const cd_& b) const |
| 40 | { |
| 41 | return this->m_path == b.m_path; |
| 42 | } |
Václav Kubernát | b61336d | 2018-05-28 17:35:03 +0200 | [diff] [blame^] | 43 | |
| 44 | bool create_::operator==(const create_& b) const |
| 45 | { |
| 46 | return this->m_path == b.m_path; |
| 47 | } |
| 48 | |
| 49 | bool delete_::operator==(const delete_& b) const |
| 50 | { |
| 51 | return this->m_path == b.m_path; |
| 52 | } |