metaproxy  1.21.0
router_xml.cpp
Go to the documentation of this file.
1 /* This file is part of Metaproxy.
2  Copyright (C) Index Data
3 
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
7 version.
8 
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
12 for more details.
13 
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
17 */
18 
19 #include "config.hpp"
20 #include <metaproxy/router_xml.hpp>
21 #include "router_flexml.hpp"
22 #include "factory_static.hpp"
23 
24 namespace mp = metaproxy_1;
25 
26 namespace 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 
37 mp::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 
44 mp::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 
50 mp::RouterXML::Rep::~Rep()
51 {
52 }
53 
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))
57 {
58 }
59 
60 mp::RouterXML::RouterXML(std::string xmlconf, bool test_only)
61  : m_p(new Rep(xmlconf, test_only))
62 {
63 }
64 
65 mp::RouterXML::~RouterXML()
66 {
67 }
68 
69 mp::RoutePos *mp::RouterXML::createpos() const
70 {
71  return m_p->m_flexml->createpos();
72 }
73 
74 void mp::RouterXML::start()
75 {
76  m_p->m_flexml->start();
77 }
78 
79 void 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 
Rep(xmlDocPtr, bool, const char *)
Definition: router_xml.cpp:37
boost::scoped_ptr< Router > m_flexml
Definition: router_xml.cpp:33