/extlibs/Boost/include/boost/exception/detail/error_info_impl.hpp

https://bitbucket.org/hugoruscitti/pilascpp · C++ Header · 75 lines · 56 code · 16 blank · 3 comment · 3 complexity · 1a5a9ee6a3be18b0114ab1f1b3ffc902 MD5 · raw file

  1. //Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc.
  2. //Distributed under the Boost Software License, Version 1.0. (See accompanying
  3. //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. #ifndef UUID_CE6983AC753411DDA764247956D89593
  5. #define UUID_CE6983AC753411DDA764247956D89593
  6. #if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
  7. #pragma GCC system_header
  8. #endif
  9. #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
  10. #pragma warning(push,1)
  11. #endif
  12. #include <string>
  13. namespace
  14. boost
  15. {
  16. namespace
  17. exception_detail
  18. {
  19. class
  20. error_info_base
  21. {
  22. public:
  23. virtual std::string tag_typeid_name() const = 0;
  24. virtual std::string value_as_string() const = 0;
  25. protected:
  26. ~error_info_base() throw()
  27. {
  28. }
  29. };
  30. }
  31. template <class Tag,class T>
  32. class
  33. error_info:
  34. public exception_detail::error_info_base
  35. {
  36. public:
  37. typedef T value_type;
  38. error_info( value_type const & value );
  39. ~error_info() throw();
  40. value_type const &
  41. value() const
  42. {
  43. return value_;
  44. }
  45. value_type &
  46. value()
  47. {
  48. return value_;
  49. }
  50. private:
  51. std::string tag_typeid_name() const;
  52. std::string value_as_string() const;
  53. value_type value_;
  54. };
  55. }
  56. #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
  57. #pragma warning(pop)
  58. #endif
  59. #endif