summaryrefslogtreecommitdiff
path: root/contrib/utility/Utility/ExH
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/utility/Utility/ExH')
-rw-r--r--contrib/utility/Utility/ExH/Compound.hpp47
-rw-r--r--contrib/utility/Utility/ExH/Compound.tpp71
-rw-r--r--contrib/utility/Utility/ExH/Converter.hpp24
-rw-r--r--contrib/utility/Utility/ExH/Converter.tpp19
-rw-r--r--contrib/utility/Utility/ExH/ExH.hpp22
-rw-r--r--contrib/utility/Utility/ExH/Logic/DescriptiveException.hpp63
-rw-r--r--contrib/utility/Utility/ExH/Logic/DescriptiveException.ipp104
-rw-r--r--contrib/utility/Utility/ExH/Logic/DescriptiveException.tpp23
-rw-r--r--contrib/utility/Utility/ExH/Logic/Exception.hpp40
-rw-r--r--contrib/utility/Utility/ExH/Logic/Exception.ipp20
-rw-r--r--contrib/utility/Utility/ExH/StringStreamConverter.hpp26
-rw-r--r--contrib/utility/Utility/ExH/StringStreamConverter.ipp18
-rw-r--r--contrib/utility/Utility/ExH/System/DescriptiveException.hpp63
-rw-r--r--contrib/utility/Utility/ExH/System/DescriptiveException.ipp90
-rw-r--r--contrib/utility/Utility/ExH/System/DescriptiveException.tpp23
-rw-r--r--contrib/utility/Utility/ExH/System/Exception.hpp29
16 files changed, 0 insertions, 682 deletions
diff --git a/contrib/utility/Utility/ExH/Compound.hpp b/contrib/utility/Utility/ExH/Compound.hpp
deleted file mode 100644
index 664583fffb2..00000000000
--- a/contrib/utility/Utility/ExH/Compound.hpp
+++ /dev/null
@@ -1,47 +0,0 @@
-// file : Utility/ExH/Compound.hpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#ifndef UTILITY_EX_H_COMPOUND_HPP
-#define UTILITY_EX_H_COMPOUND_HPP
-
-#include <string>
-
-namespace Utility
-{
- namespace ExH
- {
- template <typename Type, typename Base>
- class Compound : public virtual Base
- {
- public:
- explicit
- Compound (char const* description) throw ();
-
- explicit
- Compound (std::string const& description) throw ();
-
- template <typename T>
- explicit
- Compound (T const& description) throw ();
-
- Compound (Compound const& src) throw ();
-
- virtual
- ~Compound () throw ();
-
- public:
- Compound&
- operator= (Compound const& src) throw ();
-
- protected:
- Compound () throw ();
- };
- }
-}
-
-#include "Utility/ExH/Compound.tpp"
-
-#endif // UTILITY_EX_H_COMPOUND_HPP
-//$Id$
diff --git a/contrib/utility/Utility/ExH/Compound.tpp b/contrib/utility/Utility/ExH/Compound.tpp
deleted file mode 100644
index a4c798d97cb..00000000000
--- a/contrib/utility/Utility/ExH/Compound.tpp
+++ /dev/null
@@ -1,71 +0,0 @@
-// file : Utility/ExH/Compound.tpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#include "Utility/ExH/Converter.hpp"
-
-namespace Utility
-{
- namespace ExH
- {
- // c-tor's & d-tor
- template <typename Type, typename Base>
- Compound<Type, Base>::
- Compound () throw ()
- {
- }
-
- template <typename Type, typename Base>
- Compound<Type, Base>::
- Compound (char const* description) throw ()
- {
- Base::init (description);
- }
-
- template <typename Type, typename Base>
- Compound<Type, Base>::
- Compound (std::string const& description) throw ()
- {
- try
- {
- Base::init (description.c_str ());
- }
- catch (...)
- {
- }
- }
-
- template <typename Type, typename Base>
- template <typename T>
- Compound<Type, Base>::
- Compound (T const& description) throw ()
- {
- Base::init (converter<T> (description).c_str ());
- }
-
- template <typename Type, typename Base>
- Compound<Type, Base>::
- Compound (Compound const& src) throw ()
- {
- Base::init (src.what ());
- }
-
- template <typename Type, typename Base>
- Compound<Type, Base>::
- ~Compound () throw ()
- {
- }
-
- // operator=
-
- template <typename Type, typename Base>
- Compound<Type, Base>& Compound<Type, Base>::
- operator= (Compound const& src) throw ()
- {
- Base::init (src.what ());
- return *this;
- }
- }
-}
-//$Id$
diff --git a/contrib/utility/Utility/ExH/Converter.hpp b/contrib/utility/Utility/ExH/Converter.hpp
deleted file mode 100644
index 563114fd1c4..00000000000
--- a/contrib/utility/Utility/ExH/Converter.hpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// file : Utility/ExH/Converter.hpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#ifndef UTILITY_EX_H_CONVERTER_HPP
-#define UTILITY_EX_H_CONVERTER_HPP
-
-#include <string>
-
-namespace Utility
-{
- namespace ExH
- {
- template <typename T>
- std::string
- converter (T const& t);
- }
-}
-
-#include "Utility/ExH/Converter.tpp"
-
-#endif // UTILITY_EX_H_CONVERTER_HPP
-//$Id$
diff --git a/contrib/utility/Utility/ExH/Converter.tpp b/contrib/utility/Utility/ExH/Converter.tpp
deleted file mode 100644
index 2d48015fe80..00000000000
--- a/contrib/utility/Utility/ExH/Converter.tpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// file : Utility/ExH/Converter.tpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-namespace Utility
-{
- namespace ExH
- {
- template <typename T>
- std::string
- converter (T const& t)
- {
- // Default implementation just assumes that implicit converion exist.
- return t;
- }
- }
-}
-//$Id$
diff --git a/contrib/utility/Utility/ExH/ExH.hpp b/contrib/utility/Utility/ExH/ExH.hpp
deleted file mode 100644
index 722ecd02d25..00000000000
--- a/contrib/utility/Utility/ExH/ExH.hpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// file : Utility/ExH/ExH.hpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#ifndef UTILITY_EX_H_EX_H_HPP
-#define UTILITY_EX_H_EX_H_HPP
-
-#include "Utility/ExH/System/Exception.hpp"
-#include "Utility/ExH/System/DescriptiveException.hpp"
-
-#include "Utility/ExH/Logic/Exception.hpp"
-#include "Utility/ExH/Logic/DescriptiveException.hpp"
-
-#include "Utility/ExH/Compound.hpp"
-
-#include "Utility/ExH/Converter.hpp"
-#include "Utility/ExH/StringStreamConverter.hpp"
-
-#endif // UTILITY_EX_H_EX_H_HPP
-
-//$Id$
diff --git a/contrib/utility/Utility/ExH/Logic/DescriptiveException.hpp b/contrib/utility/Utility/ExH/Logic/DescriptiveException.hpp
deleted file mode 100644
index 9559014e64d..00000000000
--- a/contrib/utility/Utility/ExH/Logic/DescriptiveException.hpp
+++ /dev/null
@@ -1,63 +0,0 @@
-// file : Utility/ExH/Logic/DescriptiveException.hpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#ifndef UTILITY_EX_H_LOGIC_DESCRIPTIVE_EXCEPTION_HPP
-#define UTILITY_EX_H_LOGIC_DESCRIPTIVE_EXCEPTION_HPP
-
-#include <memory>
-#include <string>
-
-
-#include "Utility/ExH/Logic/Exception.hpp"
-
-namespace Utility
-{
- namespace ExH
- {
- namespace Logic
- {
- class DescriptiveException : public virtual Exception
- {
- public:
- explicit
- DescriptiveException (char const* description) throw ();
-
- explicit
- DescriptiveException (std::string const& description) throw ();
-
- template <typename T>
- explicit
- DescriptiveException (T const& description) throw ();
-
- DescriptiveException (DescriptiveException const& src) throw ();
-
- virtual
- ~DescriptiveException () throw ();
-
- DescriptiveException&
- operator= (DescriptiveException const& src) throw ();
-
- protected:
- DescriptiveException () throw ();
-
- void
- init (char const* description) throw ();
-
- public:
- virtual char const*
- what () const throw ();
-
- private:
- std::auto_ptr<std::string> description_;
- };
- }
- }
-}
-
-#include "Utility/ExH/Logic/DescriptiveException.ipp"
-#include "Utility/ExH/Logic/DescriptiveException.tpp"
-
-#endif // UTILITY_EX_H_LOGIC_DESCRIPTIVE_EXCEPTION_HPP
-//$Id$
diff --git a/contrib/utility/Utility/ExH/Logic/DescriptiveException.ipp b/contrib/utility/Utility/ExH/Logic/DescriptiveException.ipp
deleted file mode 100644
index 4a50a687777..00000000000
--- a/contrib/utility/Utility/ExH/Logic/DescriptiveException.ipp
+++ /dev/null
@@ -1,104 +0,0 @@
-// file : Utility/ExH/Logic/DescriptiveException.ipp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-namespace Utility
-{
- namespace ExH
- {
- namespace Logic
- {
- // c-tor's & d-tor
-
- inline DescriptiveException::
- DescriptiveException () throw ()
- {
- }
-
- inline DescriptiveException::
- DescriptiveException (char const* description) throw ()
- {
- init (description);
- }
-
- inline DescriptiveException::
- DescriptiveException (std::string const& description) throw ()
- {
- try
- {
- init (description.c_str ());
- }
- catch (...)
- {
- }
- }
-
- inline DescriptiveException::
- DescriptiveException (DescriptiveException const& src) throw ()
- {
- init (src.what ());
- }
-
- inline DescriptiveException::
- ~DescriptiveException () throw ()
- {
- }
-
- inline DescriptiveException& DescriptiveException::
- operator= (DescriptiveException const& src) throw ()
- {
- init (src.what ());
- return *this;
- }
-
-
- // accessors / modifiers
-
- inline void
- DescriptiveException::init (char const* description) throw ()
- {
- try
- {
- if (description == 0 || description[0] == '\0')
- {
- description_.reset (0);
- }
- else
- {
- if (description_.get () != 0)
- {
- *description_ = description;
- }
- else
- {
- description_.reset (new std::string (description));
- }
- }
- }
- catch (...)
- {
- description_.reset (0);
- }
- }
-
- inline char const*
- DescriptiveException::what () const throw ()
- {
- try
- {
- if (description_.get () != 0)
- {
- return description_->c_str ();
- }
- }
- catch (...)
- {
- }
-
- return Exception::what ();
- }
- }
- }
-}
-//$Id$
diff --git a/contrib/utility/Utility/ExH/Logic/DescriptiveException.tpp b/contrib/utility/Utility/ExH/Logic/DescriptiveException.tpp
deleted file mode 100644
index 02c65a67e2b..00000000000
--- a/contrib/utility/Utility/ExH/Logic/DescriptiveException.tpp
+++ /dev/null
@@ -1,23 +0,0 @@
-// file : Utility/ExH/Logic/DescriptiveException.ipp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#include "Utility/ExH/Converter.hpp"
-
-namespace Utility
-{
- namespace ExH
- {
- namespace Logic
- {
- template <typename T>
- DescriptiveException::
- DescriptiveException (T const& description) throw ()
- {
- init (converter<T> (description).c_str ());
- }
- }
- }
-}
-//$Id$
diff --git a/contrib/utility/Utility/ExH/Logic/Exception.hpp b/contrib/utility/Utility/ExH/Logic/Exception.hpp
deleted file mode 100644
index e91e1811622..00000000000
--- a/contrib/utility/Utility/ExH/Logic/Exception.hpp
+++ /dev/null
@@ -1,40 +0,0 @@
-// file : Utility/ExH/Logic/Exception.hpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#ifndef UTILITY_EX_H_LOGIC_EXCEPTION_HPP
-#define UTILITY_EX_H_LOGIC_EXCEPTION_HPP
-
-#include "Utility/ExH/System/Exception.hpp"
-
-namespace Utility
-{
- namespace ExH
- {
- namespace Logic
- {
-
- // Logic::Exception inherits from System::Exception for the
- // following reason. Semantically for some part of the
- // system particular instance of Logic::Exception may seem as
- // opaque System::Exception and the only way to handle it would
- // be to propagate it further. In other words Logic::Exception
- // can be seemlesly "converted" to System::Exception if there is
- // no part of the system interested in handling it.
- //
-
- class Exception : public virtual System::Exception
- {
- public:
- virtual
- ~Exception () throw ();
- };
- }
- }
-}
-
-#include "Utility/ExH/Logic/Exception.ipp"
-
-#endif // UTILITY_EX_H_LOGIC_EXCEPTION_HPP
-//$Id$
diff --git a/contrib/utility/Utility/ExH/Logic/Exception.ipp b/contrib/utility/Utility/ExH/Logic/Exception.ipp
deleted file mode 100644
index d3b774be937..00000000000
--- a/contrib/utility/Utility/ExH/Logic/Exception.ipp
+++ /dev/null
@@ -1,20 +0,0 @@
-// file : Utility/ExH/Logic/Exception.ipp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-namespace Utility
-{
- namespace ExH
- {
- namespace Logic
- {
- inline Exception::
- ~Exception () throw ()
- {
- }
- }
- }
-}
-
-//$Id$
diff --git a/contrib/utility/Utility/ExH/StringStreamConverter.hpp b/contrib/utility/Utility/ExH/StringStreamConverter.hpp
deleted file mode 100644
index a9a495f22e2..00000000000
--- a/contrib/utility/Utility/ExH/StringStreamConverter.hpp
+++ /dev/null
@@ -1,26 +0,0 @@
-// file : Utility/ExH/StringStreamConverter.hpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#ifndef UTILITY_EX_H_STRING_STREAM_CONVERTER_HPP
-#define UTILITY_EX_H_STRING_STREAM_CONVERTER_HPP
-
-#include <sstream>
-
-#include "Utility/ExH/Converter.hpp"
-
-namespace Utility
-{
- namespace ExH
- {
- template <>
- std::string
- converter (std::ostringstream const& t);
- }
-}
-
-#include "Utility/ExH/StringStreamConverter.ipp"
-
-#endif // UTILITY_EX_H_STRING_STREAM_CONVERTER_HPP
-//$Id$
diff --git a/contrib/utility/Utility/ExH/StringStreamConverter.ipp b/contrib/utility/Utility/ExH/StringStreamConverter.ipp
deleted file mode 100644
index e454ac3f96c..00000000000
--- a/contrib/utility/Utility/ExH/StringStreamConverter.ipp
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : Utility/ExH/StringStreamConverter.ipp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-namespace Utility
-{
- namespace ExH
- {
- template <>
- inline std::string
- converter (std::ostringstream const& t)
- {
- return t.str ();
- }
- }
-}
-//$Id$
diff --git a/contrib/utility/Utility/ExH/System/DescriptiveException.hpp b/contrib/utility/Utility/ExH/System/DescriptiveException.hpp
deleted file mode 100644
index 8bc3de8ba1e..00000000000
--- a/contrib/utility/Utility/ExH/System/DescriptiveException.hpp
+++ /dev/null
@@ -1,63 +0,0 @@
-// file : Utility/ExH/System/DescriptiveException.hpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#ifndef UTILITY_EX_H_SYSTEM_DESCRIPTIVE_EXCEPTION_HPP
-#define UTILITY_EX_H_SYSTEM_DESCRIPTIVE_EXCEPTION_HPP
-
-#include <string>
-#include "Utility/ExH/System/Exception.hpp"
-
-namespace Utility
-{
- namespace ExH
- {
- namespace System
- {
- class DescriptiveException : public virtual Exception
- {
- public:
- explicit
- DescriptiveException (char const* description) throw ();
-
- explicit
- DescriptiveException (std::string const& description) throw ();
-
- template <typename T>
- explicit
- DescriptiveException (T const& description) throw ();
-
- DescriptiveException (DescriptiveException const& src) throw ();
-
- virtual
- ~DescriptiveException () throw ();
-
- DescriptiveException&
- operator= (DescriptiveException const& src) throw ();
-
- protected:
- DescriptiveException () throw ();
-
- void
- init (char const* description) throw ();
-
- public:
- virtual char const*
- what () const throw ();
-
- private:
-
- static unsigned long const DESCRIPTION_SIZE = 256;
-
- char description_ [DESCRIPTION_SIZE];
- };
- }
- }
-}
-
-#include "Utility/ExH/System/DescriptiveException.ipp"
-#include "Utility/ExH/System/DescriptiveException.tpp"
-
-#endif // UTILITY_EX_H_SYSTEM_DESCRIPTIVE_EXCEPTION_HPP
-//$Id$
diff --git a/contrib/utility/Utility/ExH/System/DescriptiveException.ipp b/contrib/utility/Utility/ExH/System/DescriptiveException.ipp
deleted file mode 100644
index d9768a518eb..00000000000
--- a/contrib/utility/Utility/ExH/System/DescriptiveException.ipp
+++ /dev/null
@@ -1,90 +0,0 @@
-// file : Utility/ExH/System/DescriptiveException.ipp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#include <cstring>
-
-namespace Utility
-{
- namespace ExH
- {
- namespace System
- {
- // c-tor's & d-tor
-
- inline DescriptiveException::
- DescriptiveException () throw ()
- {
- description_[0] = '\0';
- }
-
- inline DescriptiveException::
- DescriptiveException (char const* description) throw ()
- {
- init (description);
- }
-
- inline DescriptiveException::
- DescriptiveException (std::string const& description) throw ()
- {
- try
- {
- init (description.c_str ());
- }
- catch (...)
- {
- }
- }
-
- inline DescriptiveException::
- DescriptiveException (DescriptiveException const& src) throw ()
- {
- init (src.what ());
- }
-
- inline DescriptiveException::
- ~DescriptiveException () throw ()
- {
- }
-
- inline DescriptiveException& DescriptiveException::
- operator= (DescriptiveException const& src) throw ()
- {
- init (src.what ());
- return *this;
- }
-
-
- // accessors / modifiers
-
- inline void DescriptiveException::
- init (char const* description) throw ()
- {
- if (description != 0)
- {
- std::strncpy (description_, description, DESCRIPTION_SIZE - 1);
- description_[DESCRIPTION_SIZE - 1] = '\0';
- }
- else
- {
- description_[0] = '\0';
- }
- }
-
- inline char const* DescriptiveException::
- what () const throw ()
- {
- if (description_[0] != '\0')
- {
- return description_;
- }
- else
- {
- return Exception::what ();
- }
- }
- }
- }
-}
-//$Id$
diff --git a/contrib/utility/Utility/ExH/System/DescriptiveException.tpp b/contrib/utility/Utility/ExH/System/DescriptiveException.tpp
deleted file mode 100644
index 320216acc2e..00000000000
--- a/contrib/utility/Utility/ExH/System/DescriptiveException.tpp
+++ /dev/null
@@ -1,23 +0,0 @@
-// file : Utility/ExH/System/DescriptiveException.ipp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#include "Utility/ExH/Converter.hpp"
-
-namespace Utility
-{
- namespace ExH
- {
- namespace System
- {
- template <typename T>
- inline DescriptiveException::
- DescriptiveException (T const& description) throw ()
- {
- init (converter<T> (description).c_str ());
- }
- }
- }
-}
-//$Id$
diff --git a/contrib/utility/Utility/ExH/System/Exception.hpp b/contrib/utility/Utility/ExH/System/Exception.hpp
deleted file mode 100644
index 0ed7fbfa975..00000000000
--- a/contrib/utility/Utility/ExH/System/Exception.hpp
+++ /dev/null
@@ -1,29 +0,0 @@
-// file : Utility/ExH/System/Exception.hpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#ifndef UTILITY_EX_H_SYSTEM_EXCEPTION_HPP
-#define UTILITY_EX_H_SYSTEM_EXCEPTION_HPP
-
-#include <exception>
-
-namespace Utility
-{
- namespace ExH
- {
- namespace System
- {
- // This is the only way to make predefined exceptions like
- // std::bad_alloc, etc to appear in the right place of the hierarchy.
- //
-
- typedef std::exception Exception;
- }
- }
-}
-
-#endif // UTILITY_EX_H_SYSTEM_EXCEPTION_HPP
-
-
-//$Id$