1 /* This file is part of Metaproxy.
2 Copyright (C) 2005-2013 Index Data
4 Metaproxy is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2, or (at your option) any later
9 Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #include <metaproxy/router_xml.hpp>
21 #include "router_flexml.hpp"
22 #include "factory_static.hpp"
24 namespace mp = metaproxy_1;
26 namespace metaproxy_1 {
27 class RouterXML::Rep {
29 Rep(xmlDocPtr, bool, const char *);
30 Rep(std::string, bool);
32 FactoryStatic m_factory;
33 boost::scoped_ptr<Router> m_flexml;
37 mp::RouterXML::Rep::Rep(xmlDocPtr doc, bool test_only,
38 const char *include_path)
40 m_flexml(new RouterFleXML(doc, m_factory, test_only, include_path))
44 mp::RouterXML::Rep::Rep(std::string xmlconf, bool test_only)
46 m_flexml(new RouterFleXML(xmlconf, m_factory, test_only))
50 mp::RouterXML::Rep::~Rep()
54 mp::RouterXML::RouterXML(xmlDocPtr doc,
55 bool test_only, const char *file_include_path)
56 : m_p(new Rep(doc, test_only, file_include_path))
60 mp::RouterXML::RouterXML(std::string xmlconf, bool test_only)
61 : m_p(new Rep(xmlconf, test_only))
65 mp::RouterXML::~RouterXML()
69 mp::RoutePos *mp::RouterXML::createpos() const
71 return m_p->m_flexml->createpos();
74 void mp::RouterXML::start()
76 m_p->m_flexml->start();
79 void mp::RouterXML::stop(int signo)
81 m_p->m_flexml->stop(signo);
87 * c-file-style: "Stroustrup"
88 * indent-tabs-mode: nil
90 * vim: shiftwidth=4 tabstop=8 expandtab