]> git.lyx.org Git - features.git/blob - boost/boost/exception/detail/error_info_impl.hpp
boost: add eol property
[features.git] / boost / boost / exception / detail / error_info_impl.hpp
1 //Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
2
3 //Distributed under the Boost Software License, Version 1.0. (See accompanying
4 //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6 #ifndef UUID_CE6983AC753411DDA764247956D89593
7 #define UUID_CE6983AC753411DDA764247956D89593
8
9 #include <string>
10
11 namespace
12 boost
13     {
14     namespace
15     exception_detail
16         {
17         class
18         error_info_base
19             {
20             public:
21
22             virtual char const * tag_typeid_name() const = 0;
23             virtual std::string value_as_string() const = 0;
24
25             protected:
26
27             virtual
28             ~error_info_base() throw()
29                 {
30                 }
31             };
32         }
33
34     template <class Tag,class T>
35     class
36     error_info:
37         public exception_detail::error_info_base
38         {
39         public:
40
41         typedef T value_type;
42
43         error_info( value_type const & value );
44         ~error_info() throw();
45
46         value_type const &
47         value() const
48             {
49             return value_;
50             }
51
52         value_type &
53         value()
54             {
55             return value_;
56             }
57
58         private:
59
60         char const * tag_typeid_name() const;
61         std::string value_as_string() const;
62
63         value_type value_;
64         };
65     }
66
67 #endif