Merge c:/dyninst/pc_bluegene/dyninst into dyn_pc_integration
[dyninst.git] / external / boost / exception / detail / error_info_impl.hpp
1 //Copyright (c) 2006-2008 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         private:
53
54         char const * tag_typeid_name() const;
55         std::string value_as_string() const;
56
57         value_type const value_;
58         };
59     }
60
61 #endif