metaproxy 1.22.1
router_xml.cpp
Go to the documentation of this file.
1/* This file is part of Metaproxy.
2 Copyright (C) Index Data
3
4Metaproxy is free software; you can redistribute it and/or modify it under
5the terms of the GNU General Public License as published by the Free
6Software Foundation; either version 2, or (at your option) any later
7version.
8
9Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
10WARRANTY; without even the implied warranty of MERCHANTABILITY or
11FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program; if not, write to the Free Software
16Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17*/
18
19#include "config.hpp"
20#include <metaproxy/router_xml.hpp>
21#include "router_flexml.hpp"
22#include "factory_static.hpp"
23
24namespace mp = metaproxy_1;
25
26namespace metaproxy_1 {
28 public:
29 Rep(xmlDocPtr, bool, const char *);
30 Rep(std::string, bool);
31 ~Rep();
33 boost::scoped_ptr<Router> m_flexml;
34 };
35}
36
37mp::RouterXML::Rep::Rep(xmlDocPtr doc, bool test_only,
38 const char *include_path)
39 : m_factory(),
40 m_flexml(new RouterFleXML(doc, m_factory, test_only, include_path))
41{
42}
43
44mp::RouterXML::Rep::Rep(std::string xmlconf, bool test_only)
45 : m_factory(),
46 m_flexml(new RouterFleXML(xmlconf, m_factory, test_only))
47{
48}
49
50mp::RouterXML::Rep::~Rep()
51{
52}
53
54mp::RouterXML::RouterXML(xmlDocPtr doc,
55 bool test_only, const char *file_include_path)
56 : m_p(new Rep(doc, test_only, file_include_path))
57{
58}
59
60mp::RouterXML::RouterXML(std::string xmlconf, bool test_only)
61 : m_p(new Rep(xmlconf, test_only))
62{
63}
64
65mp::RouterXML::~RouterXML()
66{
67}
68
69mp::RoutePos *mp::RouterXML::createpos() const
70{
71 return m_p->m_flexml->createpos();
72}
73
74void mp::RouterXML::start()
75{
76 m_p->m_flexml->start();
77}
78
79void mp::RouterXML::stop(int signo)
80{
81 m_p->m_flexml->stop(signo);
82}
83
84/*
85 * Local variables:
86 * c-basic-offset: 4
87 * c-file-style: "Stroustrup"
88 * indent-tabs-mode: nil
89 * End:
90 * vim: shiftwidth=4 tabstop=8 expandtab
91 */
92
boost::scoped_ptr< Router > m_flexml