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