RouterFleXML now stores routes and filters internally.
[metaproxy-moved-to-github.git] / src / router_flexml.hpp
1 /* $Id: router_flexml.hpp,v 1.10 2006-01-05 16:39:37 adam Exp $
2    Copyright (c) 2005, Index Data.
3
4    %LICENSE%
5 */
6
7 #include "router.hpp"
8
9 #include "factory_filter.hpp"
10
11 #include <stdexcept>
12
13 #include <boost/scoped_ptr.hpp>
14
15 namespace yp2 
16 {
17     class RouterFleXML : public yp2::Router 
18     {
19         class Rep;
20         class Route;
21     public:
22         RouterFleXML(std::string xmlconf, yp2::FactoryFilter &factory);
23         
24         ~RouterFleXML();
25         
26         virtual const filter::Base *move(const filter::Base *filter,
27                                          const Package *package) const;
28         class XMLError : public std::runtime_error {
29         public:
30             XMLError(const std::string msg) :
31                 std::runtime_error("XMLError : " + msg) {} ;
32         };
33     private:
34         boost::scoped_ptr<Rep> m_p;
35     };
36  
37 };
38
39
40 /*
41  * Local variables:
42  * c-basic-offset: 4
43  * indent-tabs-mode: nil
44  * c-file-style: "stroustrup"
45  * End:
46  * vim: shiftwidth=4 tabstop=8 expandtab
47  */