blob: 5c132d1a965d2b6981d30f137d588ce0480e7dc6 [file] [log] [blame]
Václav Kubernát96344a12018-05-28 16:33:39 +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
Václav Kubernátb61336d2018-05-28 17:35:03 +02009#include <iostream>
Václav Kubernát96344a12018-05-28 16:33:39 +020010#include "interpreter.hpp"
11
12void Interpreter::operator()(const cd_& cd) const
13{
14 m_parser.changeNode(cd.m_path);
15}
16
Václav Kubernátb61336d2018-05-28 17:35:03 +020017void Interpreter::operator()(const create_& create) const
18{
19 std::cout << "Presence container " << boost::get<container_>(create.m_path.m_nodes.back()).m_name << " created." << std::endl;
20}
21
22void Interpreter::operator()(const delete_& delet) const
23{
24 std::cout << "Presence container " << boost::get<container_>(delet.m_path.m_nodes.back()).m_name << " deleted." << std::endl;
25}
26
27Interpreter::Interpreter(Parser& parser, Schema&)
Václav Kubernát96344a12018-05-28 16:33:39 +020028 : m_parser(parser)
29{
30}