GPL v2.
[metaproxy-moved-to-github.git] / src / router_flexml.hpp
1 /* $Id: router_flexml.hpp,v 1.17 2007-05-09 21:23:09 adam Exp $
2    Copyright (c) 2005-2007, Index Data.
3
4 This file is part of Metaproxy.
5
6 Metaproxy is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 2, or (at your option) any later
9 version.
10
11 Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with Metaproxy; see the file LICENSE.  If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
19 02111-1307, USA.
20  */
21
22 #ifndef ROUTER_FLEXML_HPP
23 #define ROUTER_FLEXML_HPP
24
25 #include "router.hpp"
26
27 #include "factory_filter.hpp"
28
29 #include <stdexcept>
30
31 #include <boost/scoped_ptr.hpp>
32
33 namespace metaproxy_1 
34 {
35     class RouterFleXML : public metaproxy_1::Router 
36     {
37         class Rep;
38         class Route;
39         class Pos;
40     public:
41         RouterFleXML(std::string xmlconf, metaproxy_1::FactoryFilter &factory);
42         RouterFleXML(xmlDocPtr doc, metaproxy_1::FactoryFilter &factory);
43         
44         ~RouterFleXML();
45
46         virtual RoutePos *createpos() const;
47         class XMLError1 : public std::runtime_error {
48         public:
49             XMLError1(const std::string msg) :
50                 std::runtime_error("XMLError : " + msg) {} ;
51         };
52     private:
53         boost::scoped_ptr<Rep> m_p;
54     };
55  
56 };
57 #endif
58
59 /*
60  * Local variables:
61  * c-basic-offset: 4
62  * indent-tabs-mode: nil
63  * c-file-style: "stroustrup"
64  * End:
65  * vim: shiftwidth=4 tabstop=8 expandtab
66  */