Year 2007.
[metaproxy-moved-to-github.git] / src / router.hpp
1 /* $Id: router.hpp,v 1.13 2007-01-25 14:05:54 adam Exp $
2    Copyright (c) 2005-2007, Index Data.
3
4    See the LICENSE file for details
5  */
6
7 #ifndef ROUTER_HPP
8 #define ROUTER_HPP
9
10 #include <boost/noncopyable.hpp>
11 #include <string>
12 #include <stdexcept>
13
14 namespace metaproxy_1 
15 {
16     namespace filter {
17         class Base;
18     }
19     class RoutePos;
20     
21     class RouterException : public std::runtime_error {
22     public:
23         RouterException(const std::string message)
24             : std::runtime_error("RouterException: " + message){};
25     };
26       
27     class Router : boost::noncopyable {
28     public:
29         Router(){};
30         virtual ~Router(){};
31
32         virtual RoutePos *createpos() const = 0;
33     };
34
35     class RoutePos : boost::noncopyable {
36     public:
37         virtual const filter::Base *move(const char *route) = 0;
38         virtual RoutePos *clone() = 0;
39         virtual ~RoutePos() {};
40     };
41 }
42 #endif
43 /*
44  * Local variables:
45  * c-basic-offset: 4
46  * indent-tabs-mode: nil
47  * c-file-style: "stroustrup"
48  * End:
49  * vim: shiftwidth=4 tabstop=8 expandtab
50  */