Named routes for filter virt_db. Example in etc/config2.xml
[metaproxy-moved-to-github.git] / src / router_flexml.hpp
1 /* $Id: router_flexml.hpp,v 1.13 2006-01-11 11:51:50 adam Exp $
2    Copyright (c) 2005, Index Data.
3
4    %LICENSE%
5 */
6
7 #ifndef ROUTER_FLEXML_HPP
8 #define ROUTER_FLEXML_HPP
9
10 #include "router.hpp"
11
12 #include "factory_filter.hpp"
13
14 #include <stdexcept>
15
16 #include <boost/scoped_ptr.hpp>
17
18 namespace yp2 
19 {
20     class RouterFleXML : public yp2::Router 
21     {
22         class Rep;
23         class Route;
24         class Pos;
25     public:
26         RouterFleXML(std::string xmlconf, yp2::FactoryFilter &factory);
27         RouterFleXML(xmlDocPtr doc, yp2::FactoryFilter &factory);
28         
29         ~RouterFleXML();
30
31         virtual RoutePos *createpos() const;
32         class XMLError1 : public std::runtime_error {
33         public:
34             XMLError1(const std::string msg) :
35                 std::runtime_error("XMLError : " + msg) {} ;
36         };
37     private:
38         boost::scoped_ptr<Rep> m_p;
39     };
40  
41 };
42 #endif
43
44 /*
45  * Local variables:
46  * c-basic-offset: 4
47  * indent-tabs-mode: nil
48  * c-file-style: "stroustrup"
49  * End:
50  * vim: shiftwidth=4 tabstop=8 expandtab
51  */