summaryrefslogtreecommitdiff
path: root/contrib/utility/Utility
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/utility/Utility')
-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
-rw-r--r--contrib/utility/Utility/Hetero/Container.hpp182
-rw-r--r--contrib/utility/Utility/Hetero/Shell.hpp86
-rw-r--r--contrib/utility/Utility/Hetero/TypeList.hpp46
-rw-r--r--contrib/utility/Utility/Hetero/TypedContainer.hpp57
-rw-r--r--contrib/utility/Utility/Hetero/Vector.hpp47
-rw-r--r--contrib/utility/Utility/Introspection/Introspection.hpp14
-rw-r--r--contrib/utility/Utility/Introspection/Makefile19
-rw-r--r--contrib/utility/Utility/Introspection/Object.cpp24
-rw-r--r--contrib/utility/Utility/Introspection/Object.hpp47
-rw-r--r--contrib/utility/Utility/Introspection/Object.ipp48
-rw-r--r--contrib/utility/Utility/Introspection/TypeId.cpp21
-rw-r--r--contrib/utility/Utility/Introspection/TypeId.hpp47
-rw-r--r--contrib/utility/Utility/Introspection/TypeId.ipp37
-rw-r--r--contrib/utility/Utility/Introspection/TypeId.tpp18
-rw-r--r--contrib/utility/Utility/Introspection/TypeInfo.hpp104
-rw-r--r--contrib/utility/Utility/Introspection/TypeInfo.ipp77
-rw-r--r--contrib/utility/Utility/Makefile16
-rw-r--r--contrib/utility/Utility/ReferenceCounting/DefaultImpl.hpp96
-rw-r--r--contrib/utility/Utility/ReferenceCounting/DefaultImpl.ipp105
-rw-r--r--contrib/utility/Utility/ReferenceCounting/ExternalLockImpl.hpp60
-rw-r--r--contrib/utility/Utility/ReferenceCounting/ExternalLockImpl.ipp122
-rw-r--r--contrib/utility/Utility/ReferenceCounting/Interface.hpp84
-rw-r--r--contrib/utility/Utility/ReferenceCounting/Interface.ipp22
-rw-r--r--contrib/utility/Utility/ReferenceCounting/Interface.tpp20
-rw-r--r--contrib/utility/Utility/ReferenceCounting/ReferenceCounting.hpp16
-rw-r--r--contrib/utility/Utility/ReferenceCounting/SmartPtr.hpp103
-rw-r--r--contrib/utility/Utility/ReferenceCounting/SmartPtr.tpp170
-rw-r--r--contrib/utility/Utility/ReferenceCounting/StrictPtr.hpp108
-rw-r--r--contrib/utility/Utility/ReferenceCounting/StrictPtr.tpp167
-rw-r--r--contrib/utility/Utility/Synch/Policy/Null.hpp54
-rw-r--r--contrib/utility/Utility/Synch/Policy/Null.ipp20
47 files changed, 0 insertions, 2719 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$
diff --git a/contrib/utility/Utility/Hetero/Container.hpp b/contrib/utility/Utility/Hetero/Container.hpp
deleted file mode 100644
index d28d5fff0c4..00000000000
--- a/contrib/utility/Utility/Hetero/Container.hpp
+++ /dev/null
@@ -1,182 +0,0 @@
-// file : Utility/Hetero/Container.hpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#ifndef UTILITY_HETERO_CONTAINER_HPP
-#define UTILITY_HETERO_CONTAINER_HPP
-
-#include <typeinfo>
-
-namespace Utility
-{
- namespace Hetero
- {
- //
- //
- //
- class Typing {};
-
- //
- //
- //
- class Container
- {
- public:
- ~Container ()
- {
- delete holder_;
- }
-
- public:
- template <typename T>
- Container (T const& t)
- : holder_ (new TypedHolder<T> (t))
- {
- }
-
- Container (Container const& c)
- : holder_ (c.holder_->clone ())
- {
- }
-
- public:
- template <typename T>
- Container&
- operator= (T const& t)
- {
- delete holder_;
- holder_ = 0;
- holder_ = new TypedHolder<T> (t);
- return *this;
- }
-
- Container&
- operator= (Container const& c)
- {
- delete holder_;
- holder_ = 0;
- holder_ = c.holder_->clone ();
- return *this;
- }
-
- public:
- template <typename T>
- operator T& ()
- {
- return value<T> ();
- }
-
- template <typename T>
- operator T const& () const
- {
- return value<T> ();
- }
-
- public:
- template <typename T>
- T&
- value ()
- {
- if (holder_->type () == typeid (T))
- {
- return dynamic_cast<TypedHolder<T>*>(holder_)->value ();
- }
- else
- {
- throw Typing ();
- }
- }
-
- template <typename T>
- T const&
- value () const
- {
- if (holder_->type () == typeid (T))
- {
- return dynamic_cast<TypedHolder<T>*>(holder_)->value ();
- }
- else
- {
- throw Typing ();
- }
- }
-
- public:
- std::type_info const&
- type () const
- {
- return holder_->type ();
- }
-
- public:
- template <typename T>
- friend T
- operator+ (Container const& a, T const& b)
- {
- return a.value<T> () + b;
- }
-
- template <typename T>
- friend T
- operator+ (T const& a, Container const& b)
- {
- return a + b.value<T> ();
- }
-
- private:
- struct Holder
- {
- virtual
- ~Holder () {}
-
- virtual Holder*
- clone () const = 0;
-
- virtual std::type_info const&
- type () const = 0;
- };
-
- template <typename T>
- struct TypedHolder : public Holder
- {
- TypedHolder (T const& value)
- : value_ (value)
- {
- }
-
- virtual Holder*
- clone () const
- {
- return new TypedHolder<T> (value_);
- }
-
- virtual std::type_info const&
- type () const
- {
- return typeid (T);
- }
-
- T const&
- value () const
- {
- return value_;
- }
-
- T&
- value ()
- {
- return value_;
- }
-
- private:
- T value_;
- };
-
- Holder* holder_;
- };
- }
-}
-
-#endif // UTILITY_HETERO_CONTAINER_HPP
-//$Id$
diff --git a/contrib/utility/Utility/Hetero/Shell.hpp b/contrib/utility/Utility/Hetero/Shell.hpp
deleted file mode 100644
index 0d37a6ba09d..00000000000
--- a/contrib/utility/Utility/Hetero/Shell.hpp
+++ /dev/null
@@ -1,86 +0,0 @@
-// file : Utility/Hetero/Shell.hpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#ifndef UTILITY_HETERO_SHELL_HPP
-#define UTILITY_HETERO_SHELL_HPP
-
-namespace Utility
-{
- namespace Hetero
- {
-
- //
- //
- //
- class ShellCore
- {
- protected:
- template <typename F, typename T0>
- static typename F::RetType
- apply (F& f, TypedContainer<TypeList<T0> >& c)
- {
- if (type_check <T0> (c)) return type_apply<T0> (f, c);
-
- throw Utility::Hetero::Typing ();
- }
-
- template <typename F, typename T0, typename T1>
- static typename F::RetType
- apply (F& f, TypedContainer<TypeList<T0, T1> >& c)
- {
- if (type_check <T0> (c)) return type_apply<T0> (f, c);
- if (type_check <T1> (c)) return type_apply<T1> (f, c);
-
- throw Utility::Hetero::Typing ();
- }
-
- template <typename F, typename T0, typename T1, typename T2>
- static typename F::RetType
- apply (F& f, TypedContainer<TypeList<T0, T1, T2> >& c)
- {
- if (type_check <T0> (c)) return type_apply<T0> (f, c);
- if (type_check <T1> (c)) return type_apply<T1> (f, c);
- if (type_check <T2> (c)) return type_apply<T2> (f, c);
-
- throw Utility::Hetero::Typing ();
- }
-
- private:
- template <typename T>
- static bool
- type_check (Container& c)
- {
- return c.type () == typeid (T);
- }
-
- template <typename T, typename F>
- static typename F::RetType
- type_apply (F& f, Container& c)
- {
- return f (c. template value<T> ());
- }
- };
-
-
- //
- //
- //
- template <typename F>
- struct Shell : F, ShellCore
- {
- using F::operator ();
-
- template <typename T>
- typename F::RetType
- operator () (TypedContainer<T>& p)
- {
- return apply (*this, p);
- }
- };
- }
-}
-
-#endif // UTILITY_HETERO_SHELL_HPP
-//$Id$
diff --git a/contrib/utility/Utility/Hetero/TypeList.hpp b/contrib/utility/Utility/Hetero/TypeList.hpp
deleted file mode 100644
index ee7e96c2bcd..00000000000
--- a/contrib/utility/Utility/Hetero/TypeList.hpp
+++ /dev/null
@@ -1,46 +0,0 @@
-// file : Utility/Hetero/TypeList.hpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#ifndef UTILITY_HETERO_TYPE_LIST_HPP
-#define UTILITY_HETERO_TYPE_LIST_HPP
-
-namespace Utility
-{
- namespace Hetero
- {
- class NullType {};
-
- template <typename t0 = NullType,
- typename t1 = NullType,
- typename t2 = NullType>
- struct TypeList
- {
- typedef t0 T0;
- typedef t1 T1;
- typedef t2 T2;
- };
-
- template <typename t0, typename t1>
- struct TypeList<t0, t1, NullType>
- {
- typedef t0 T0;
- typedef t1 T1;
- };
-
- template <typename t0>
- struct TypeList<t0, NullType, NullType>
- {
- typedef t0 T0;
- };
-
- template <>
- struct TypeList<NullType, NullType, NullType>
- {
- };
- }
-}
-
-#endif // UTILITY_HETERO_TYPE_LIST_HPP
-//$Id$
diff --git a/contrib/utility/Utility/Hetero/TypedContainer.hpp b/contrib/utility/Utility/Hetero/TypedContainer.hpp
deleted file mode 100644
index 67f94bda0ec..00000000000
--- a/contrib/utility/Utility/Hetero/TypedContainer.hpp
+++ /dev/null
@@ -1,57 +0,0 @@
-// file : Utility/Hetero/TypedContainer.hpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#ifndef UTILITY_HETERO_TYPED_CONTAINER_HPP
-#define UTILITY_HETERO_TYPED_CONTAINER_HPP
-
-#include "Utility/Hetero/Container.hpp"
-#include "Utility/Hetero/TypeList.hpp"
-
-namespace Utility
-{
- namespace Hetero
- {
- template <typename TL>
- class TypedContainer : public Container
- {
- public:
- typedef TL Types;
-
- public:
- template <typename T>
- TypedContainer (T const& t)
- : Container (t)
- {
- }
-
- TypedContainer (TypedContainer const& c)
- : Container (static_cast<Container const&> (c))
- {
- }
-
- public:
- template <typename T>
- TypedContainer&
- operator= (T const& t)
- {
- Container& self = *this;
- self = t;
- return *this;
- }
-
- TypedContainer&
- operator= (TypedContainer const& c)
- {
- Container& self = *this;
- Container const& other = c;
- self = other;
- return *this;
- }
- };
- }
-}
-
-#endif // UTILITY_HETERO_TYPED_CONTAINER_HPP
-//$Id$
diff --git a/contrib/utility/Utility/Hetero/Vector.hpp b/contrib/utility/Utility/Hetero/Vector.hpp
deleted file mode 100644
index 3826bd6bb1f..00000000000
--- a/contrib/utility/Utility/Hetero/Vector.hpp
+++ /dev/null
@@ -1,47 +0,0 @@
-// file : Utility/Hetero/Vector.hpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#ifndef UTILITY_HETERO_VECTOR_HPP
-#define UTILITY_HETERO_VECTOR_HPP
-
-#include <vector>
-
-#include "Utility/Hetero/TypeList.hpp"
-#include "Utility/Hetero/TypedContainer.hpp"
-
-namespace Utility
-{
- namespace Hetero
- {
- template <typename T0 = NullType,
- typename T1 = NullType,
- typename T2 = NullType>
- class Vector;
-
- template <>
- class Vector<NullType, NullType, NullType>;
-
- template <typename T0>
- class Vector<T0, NullType, NullType> :
- public std::vector<TypedContainer<TypeList<T0> > >
- {
- };
-
- template <typename T0, typename T1>
- class Vector<T0, T1, NullType> :
- public std::vector<TypedContainer<TypeList<T0, T1> > >
- {
- };
-
- template <typename T0, typename T1, typename T2>
- class Vector :
- public std::vector<TypedContainer<TypeList<T0, T1, T2> > >
- {
- };
- }
-}
-
-#endif // UTILITY_HETERO_VECTOR_HPP
-//$Id$
diff --git a/contrib/utility/Utility/Introspection/Introspection.hpp b/contrib/utility/Utility/Introspection/Introspection.hpp
deleted file mode 100644
index d514f62837a..00000000000
--- a/contrib/utility/Utility/Introspection/Introspection.hpp
+++ /dev/null
@@ -1,14 +0,0 @@
-// file : Utility/Introspection/Introspection.hpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#ifndef UTILITY_INTROSPECTION_INTROSPECTION_HPP
-#define UTILITY_INTROSPECTION_INTROSPECTION_HPP
-
-#include "Utility/Introspection/TypeId.hpp"
-#include "Utility/Introspection/TypeInfo.hpp"
-#include "Utility/Introspection/Object.hpp"
-
-#endif // UTILITY_INTROSPECTION_INTROSPECTION_HPP
-//$Id$
diff --git a/contrib/utility/Utility/Introspection/Makefile b/contrib/utility/Utility/Introspection/Makefile
deleted file mode 100644
index 43f2f67cb51..00000000000
--- a/contrib/utility/Utility/Introspection/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-# file : Utility/Introspection/Makefile
-# author : Boris Kolpackov <boris@kolpackov.net>
-# copyright : Copyright (c) 2002-2003 Boris Kolpackov
-# license : http://kolpackov.net/license.html
-
-root := ../..
-
-include $(root)/BuildRules/Bootstrap.rules
-
-$(call include, $(root)/BuildRules/Archive.pre.rules)
-
-cxx_translation_units := TypeId.cpp Object.cpp
-
-module_base := Introspection
-
-CXX_PREPROCESS_FLAGS += -I $(root)
-
-$(call include, $(root)/BuildRules/Archive.post.rules)
-# $Id$
diff --git a/contrib/utility/Utility/Introspection/Object.cpp b/contrib/utility/Utility/Introspection/Object.cpp
deleted file mode 100644
index 015a2736aad..00000000000
--- a/contrib/utility/Utility/Introspection/Object.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// file : Utility/Introspection/Object.cpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#include "Utility/Introspection/Object.hpp"
-
-namespace Utility
-{
- namespace Introspection
- {
- namespace
- {
- TypeInfo object_ (typeid (Object));
- }
-
- TypeInfo const& Object::
- static_type_info () throw ()
- {
- return object_;
- }
- }
-}
-//$Id$
diff --git a/contrib/utility/Utility/Introspection/Object.hpp b/contrib/utility/Utility/Introspection/Object.hpp
deleted file mode 100644
index fdf8228c9f3..00000000000
--- a/contrib/utility/Utility/Introspection/Object.hpp
+++ /dev/null
@@ -1,47 +0,0 @@
-// file : Utility/Introspection/Object.hpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#ifndef UTILITY_INTROSPECTION_OBJECT_HPP
-#define UTILITY_INTROSPECTION_OBJECT_HPP
-
-#include "Utility/Introspection/TypeInfo.hpp"
-
-namespace Utility
-{
- namespace Introspection
- {
- class Object
- {
- public:
- static TypeInfo const&
- static_type_info () throw ();
-
- virtual TypeInfo const&
- type_info () const throw ();
-
- protected:
- virtual
- ~Object ();
-
- Object () throw ();
- Object (Object const&) throw ();
-
- Object&
- operator= (Object const&) throw ();
-
- protected:
- virtual void
- type_info (TypeInfo const& tid) throw ();
-
- private:
- TypeInfo const* type_info_;
- };
- }
-}
-
-#include "Utility/Introspection/Object.ipp"
-
-#endif // UTILITY_INTROSPECTION_OBJECT_HPP
-//$Id$
diff --git a/contrib/utility/Utility/Introspection/Object.ipp b/contrib/utility/Utility/Introspection/Object.ipp
deleted file mode 100644
index 7b5de978c6e..00000000000
--- a/contrib/utility/Utility/Introspection/Object.ipp
+++ /dev/null
@@ -1,48 +0,0 @@
-// file : Utility/Introspection/Object.ipp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-namespace Utility
-{
- namespace Introspection
- {
- inline TypeInfo const& Object::
- type_info () const throw ()
- {
- return *type_info_;
- }
-
- inline Object::
- ~Object ()
- {
- }
-
- inline Object::
- Object () throw ()
- {
- type_info (static_type_info ());
- }
-
-
- inline Object::
- Object (Object const&) throw ()
- {
- type_info (static_type_info ());
- }
-
-
- inline Object& Object::
- operator= (Object const&) throw ()
- {
- return *this;
- }
-
- inline void Object::
- type_info (TypeInfo const& tid) throw ()
- {
- type_info_ = &tid;
- }
- }
-}
-//$Id$
diff --git a/contrib/utility/Utility/Introspection/TypeId.cpp b/contrib/utility/Utility/Introspection/TypeId.cpp
deleted file mode 100644
index a0ceddac2a1..00000000000
--- a/contrib/utility/Utility/Introspection/TypeId.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-// file : Utility/Introspection/TypeId.cpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#include "Utility/Introspection/TypeId.hpp"
-
-#include <ostream>
-
-namespace Utility
-{
- namespace Introspection
- {
- std::ostream&
- operator << (std::ostream& os, TypeId const& t)
- {
- return os << t.tid_->name ();
- }
- }
-}
-//$Id$
diff --git a/contrib/utility/Utility/Introspection/TypeId.hpp b/contrib/utility/Utility/Introspection/TypeId.hpp
deleted file mode 100644
index 51f66f99a0b..00000000000
--- a/contrib/utility/Utility/Introspection/TypeId.hpp
+++ /dev/null
@@ -1,47 +0,0 @@
-// file : Utility/Introspection/TypeId.hpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#ifndef UTILITY_INTROSPECTION_TYPE_ID_HPP
-#define UTILITY_INTROSPECTION_TYPE_ID_HPP
-
-#include <typeinfo>
-#include <iosfwd>
-
-namespace Utility
-{
- namespace Introspection
- {
- class TypeId
- {
- public:
- template<typename T>
- TypeId (T const& t);
-
- TypeId (std::type_info const& tid);
-
- public:
- bool
- operator == (TypeId const& other) const;
-
- bool
- operator != (TypeId const& other) const;
-
- bool
- operator < (TypeId const& other) const;
-
- friend std::ostream&
- operator << (std::ostream& os, TypeId const& t);
-
- private:
- std::type_info const* tid_;
- };
- }
-}
-
-#include "Utility/Introspection/TypeId.tpp"
-#include "Utility/Introspection/TypeId.ipp"
-
-#endif // UTILITY_INTROSPECTION_TYPE_ID_HPP
-//$Id$
diff --git a/contrib/utility/Utility/Introspection/TypeId.ipp b/contrib/utility/Utility/Introspection/TypeId.ipp
deleted file mode 100644
index 83a5a503517..00000000000
--- a/contrib/utility/Utility/Introspection/TypeId.ipp
+++ /dev/null
@@ -1,37 +0,0 @@
-// file : Utility/Introspection/TypeId.ipp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-// cvs-id : $Id$
-
-namespace Utility
-{
- namespace Introspection
- {
- inline TypeId::
- TypeId (std::type_info const& tid)
- : tid_ (&tid)
- {
- }
-
-
- inline bool TypeId::
- operator == (TypeId const& other) const
- {
- return *tid_ == *other.tid_;
- }
-
- inline bool TypeId::
- operator != (TypeId const& other) const
- {
- return *tid_ != *other.tid_;
- }
-
- inline bool TypeId::
- operator < (TypeId const& other) const
- {
- return tid_->before (*other.tid_);
- }
- }
-}
-//$Id$
diff --git a/contrib/utility/Utility/Introspection/TypeId.tpp b/contrib/utility/Utility/Introspection/TypeId.tpp
deleted file mode 100644
index 7c3daef603c..00000000000
--- a/contrib/utility/Utility/Introspection/TypeId.tpp
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : Utility/Introspection/TypeId.tpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-namespace Utility
-{
- namespace Introspection
- {
- template<typename T>
- inline TypeId::
- TypeId (T const& t)
- : tid_ (&typeid (t))
- {
- }
- }
-}
-//$Id$
diff --git a/contrib/utility/Utility/Introspection/TypeInfo.hpp b/contrib/utility/Utility/Introspection/TypeInfo.hpp
deleted file mode 100644
index 4321fdc522c..00000000000
--- a/contrib/utility/Utility/Introspection/TypeInfo.hpp
+++ /dev/null
@@ -1,104 +0,0 @@
-// file : Utility/Introspection/TypeInfo.hpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#ifndef UTILITY_INTROSPECTION_TYPE_INFO_HPP
-#define UTILITY_INTROSPECTION_TYPE_INFO_HPP
-
-#include <vector>
-
-#include "Utility/Introspection/TypeId.hpp"
-
-namespace Utility
-{
- namespace Introspection
- {
- //
- //
- //
- struct Access
- {
- enum Value
- {
- PRIVATE,
- PROTECTED,
- PUBLIC
- };
- };
-
- // Forward declaration of class TypeInfo.
- //
- //
- class TypeInfo;
-
- //
- //
- //
- class BaseInfo
- {
- public:
- BaseInfo (Access::Value access,
- bool virtual_base,
- TypeInfo const& ti);
-
- public:
- TypeInfo const&
- type_info () const;
-
- Access::Value
- access () const;
-
- bool
- virtual_base () const;
-
- private:
- TypeInfo const* ti_;
- bool virtual_base_;
- Access::Value access_;
- };
-
-
- //
- //
- //
- class TypeInfo
- {
- private:
- typedef
- std::vector<BaseInfo>
- BaseInfoList;
-
- public:
- typedef
- BaseInfoList::const_iterator
- BaseIterator;
-
- public:
- TypeInfo (TypeId const& tid);
-
- TypeId
- type_id () const;
-
- BaseIterator
- begin_base () const;
-
- BaseIterator
- end_base () const;
-
- void
- add_base (Access::Value access,
- bool virtual_base,
- TypeInfo const& ti);
-
- private:
- TypeId tid_;
- BaseInfoList base_;
- };
- }
-}
-
-#include "Utility/Introspection/TypeInfo.ipp"
-
-#endif // UTILITY_INTROSPECTION_TYPE_INFO_HPP
-//$Id$
diff --git a/contrib/utility/Utility/Introspection/TypeInfo.ipp b/contrib/utility/Utility/Introspection/TypeInfo.ipp
deleted file mode 100644
index 395cf7d6539..00000000000
--- a/contrib/utility/Utility/Introspection/TypeInfo.ipp
+++ /dev/null
@@ -1,77 +0,0 @@
-// file : Utility/Introspection/TypeInfo.ipp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-namespace Utility
-{
- namespace Introspection
- {
- // BaseInfo
- //
- //
-
- inline BaseInfo::
- BaseInfo (Access::Value access, bool virtual_base, TypeInfo const& ti)
- : ti_ (&ti),
- virtual_base_ (virtual_base),
- access_ (access)
- {
- }
-
- inline TypeInfo const& BaseInfo::
- type_info () const
- {
- return *ti_;
- }
-
-
- inline Access::Value BaseInfo::
- access () const
- {
- return access_;
- }
-
- inline bool BaseInfo::
- virtual_base () const
- {
- return virtual_base_;
- }
-
-
- // TypeInfo
- //
- //
- inline TypeInfo::
- TypeInfo (TypeId const& tid)
- : tid_ (tid)
- {
- }
-
- inline TypeId TypeInfo::
- type_id () const
- {
- return tid_;
- }
-
- inline TypeInfo::BaseIterator TypeInfo::
- begin_base () const
- {
- return base_.begin ();
- }
-
-
- inline TypeInfo::BaseIterator TypeInfo::
- end_base () const
- {
- return base_.end ();
- }
-
- inline void TypeInfo::
- add_base (Access::Value access, bool virtual_base, TypeInfo const& ti)
- {
- base_.push_back (BaseInfo (access, virtual_base, ti));
- }
- }
-}
-//$Id$
diff --git a/contrib/utility/Utility/Makefile b/contrib/utility/Utility/Makefile
deleted file mode 100644
index e6951f317fa..00000000000
--- a/contrib/utility/Utility/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# file : Utility/Makefile
-# author : Boris Kolpackov <boris@kolpackov.net>
-# copyright : Copyright (c) 2002-2003 Boris Kolpackov
-# license : http://kolpackov.net/license.html
-
-root := ..
-
-include $(root)/BuildRules/Bootstrap.rules
-
-$(call include, $(root)/BuildRules/Recursion.pre.rules)
-
-target_makefile_list :=
-target_directory_list := Introspection
-
-$(call include, $(root)/BuildRules/Recursion.post.rules)
-# $Id$
diff --git a/contrib/utility/Utility/ReferenceCounting/DefaultImpl.hpp b/contrib/utility/Utility/ReferenceCounting/DefaultImpl.hpp
deleted file mode 100644
index 43160c09a03..00000000000
--- a/contrib/utility/Utility/ReferenceCounting/DefaultImpl.hpp
+++ /dev/null
@@ -1,96 +0,0 @@
-// file : Utility/ReferenceCounting/DefaultImpl.hpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#ifndef UTILITY_REFERENCE_COUNTING_DEFAULT_IMPL_HPP
-#define UTILITY_REFERENCE_COUNTING_DEFAULT_IMPL_HPP
-
-#include "Utility/ExH/Compound.hpp"
-#include "Utility/ExH/Logic/DescriptiveException.hpp"
-
-#include "Utility/Synch/Policy/Null.hpp"
-
-#include "Utility/ReferenceCounting/Interface.hpp"
-
-namespace Utility
-{
- namespace ReferenceCounting
- {
- // Default reference counter implementation with parameterised
- // synchronization policy. It is assumed that none of the SynchPolicy
- // types throw any logic exceptions. If in fact they do then these
- // exceptions won't be handled and will be automatically converted
- // to system exceptions.
-
- template <typename SynchPolicy = Utility::Synch::Policy::Null>
- class DefaultImpl : public virtual Interface
- {
- public:
- class InconsistentState_ {};
- typedef
- ExH::Compound<InconsistentState_, Exception>
- InconsistentState;
-
- public:
- DefaultImpl () throw (SystemException);
-
- virtual
- ~DefaultImpl () throw ();
-
- public:
- virtual void
- add_ref () const throw (Exception, SystemException);
-
- virtual void
- remove_ref () const throw ();
-
- virtual count_t
- refcount_value () const throw (Exception, SystemException);
-
- protected:
- virtual void
- add_ref_i () const throw (Exception, SystemException);
-
- virtual bool
- remove_ref_i () const throw (Exception, SystemException);
-
- virtual count_t
- refcount_value_i () const throw (Exception, SystemException);
-
- typename SynchPolicy::Mutex&
- lock_i () const throw ();
-
- protected:
- typedef
- typename SynchPolicy::Mutex
- Mutex_;
-
- typedef
- typename SynchPolicy::ReadGuard
- ReadGuard_;
-
- typedef
- typename SynchPolicy::WriteGuard
- WriteGuard_;
-
- protected:
- mutable count_t ref_count_;
-
- private:
- mutable Mutex_ lock_;
-
- private:
- // Copy semanic is not supported.
- DefaultImpl (DefaultImpl const&) throw ();
- DefaultImpl&
- operator= (DefaultImpl const&) throw ();
- };
- }
-}
-
-#include "Utility/ReferenceCounting/DefaultImpl.ipp"
-
-#endif // UTILITY_REFERENCE_COUNTING_DEFAULT_IMPL_HPP
-
-//$Id$
diff --git a/contrib/utility/Utility/ReferenceCounting/DefaultImpl.ipp b/contrib/utility/Utility/ReferenceCounting/DefaultImpl.ipp
deleted file mode 100644
index bac28c77ea2..00000000000
--- a/contrib/utility/Utility/ReferenceCounting/DefaultImpl.ipp
+++ /dev/null
@@ -1,105 +0,0 @@
-// file : Utility/ReferenceCounting/DefaultImpl.ipp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-namespace Utility
-{
- namespace ReferenceCounting
- {
- // c-tor & d-tor
-
- template <typename SynchPolicy>
- DefaultImpl<SynchPolicy>::
- DefaultImpl () throw (Interface::SystemException)
- : ref_count_ (1),
- lock_ ()
- {
- }
-
- template <typename SynchPolicy>
- DefaultImpl<SynchPolicy>::
- ~DefaultImpl () throw ()
- {
- }
-
- // add_ref, remove_ref and refcount_value member functions
-
- template <typename SynchPolicy>
- void DefaultImpl<SynchPolicy>::
- add_ref () const throw (Exception, SystemException)
- {
- WriteGuard_ guard (lock_);
- add_ref_i ();
- }
-
- template <typename SynchPolicy>
- void DefaultImpl<SynchPolicy>::
- remove_ref () const throw ()
- {
- bool destroy (false);
- try
- {
- WriteGuard_ guard (lock_);
- destroy = remove_ref_i ();
- }
- catch (...)
- {
- // there is nothing we can do
- }
-
- if (destroy) delete this;
- }
-
- template <typename SynchPolicy>
- Interface::count_t DefaultImpl<SynchPolicy>::
- refcount_value () const throw (Exception, SystemException)
- {
- ReadGuard_ guard (lock_);
- return refcount_value_i ();
- }
-
- // add_ref_i, remove_ref_i and refcount_value_i member functions
-
- template <typename SynchPolicy>
- void DefaultImpl<SynchPolicy>::
- add_ref_i () const throw (Exception, SystemException)
- {
- ref_count_++;
- }
-
- template <typename SynchPolicy>
- bool DefaultImpl<SynchPolicy>::
- remove_ref_i () const throw (Exception, SystemException)
- {
- bool destroy (false);
- if (ref_count_ > 0)
- {
- if (--ref_count_ == 0) destroy = true;
- }
- else
- {
- throw InconsistentState (
- "Utility::ReferenceCounting::DefaultImpl::_remove_ref_i: "
- "reference counter is zero.");
- }
- return destroy;
-
- }
-
- template <typename SynchPolicy>
- Interface::count_t DefaultImpl<SynchPolicy>::
- refcount_value_i () const throw (Exception, SystemException)
- {
- return ref_count_;
- }
-
- template <typename SynchPolicy>
- typename SynchPolicy::Mutex& DefaultImpl<SynchPolicy>::
- lock_i() const throw ()
- {
- return lock_;
- }
- }
-}
-//$Id$
diff --git a/contrib/utility/Utility/ReferenceCounting/ExternalLockImpl.hpp b/contrib/utility/Utility/ReferenceCounting/ExternalLockImpl.hpp
deleted file mode 100644
index 20346e859b3..00000000000
--- a/contrib/utility/Utility/ReferenceCounting/ExternalLockImpl.hpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// file : Utility/ReferenceCounting/ExternalLockImpl.hpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#ifndef UTILITY_REFERENCE_COUNTING_EXTERNAL_LOCK_IMPL_HPP
-#define UTILITY_REFERENCE_COUNTING_EXTERNAL_LOCK_IMPL_HPP
-
-namespace Utility
-{
- namespace ReferenceCounting
- {
-
- /*
-
- Not ported yet.
-
- class ExternalLockRefCounter : public virtual Util::RefCountBase
- {
- public:
- ExternalLockRefCounter (ACE_Lock* lock = 0);
- virtual ~ExternalLockRefCounter ();
-
- void init (ACE_Lock* lock);
-
- public:
-
- virtual void _add_ref ();
- virtual void _remove_ref ();
- virtual unsigned long _refcount_value ();
-
- protected:
-
- virtual void _add_ref_i ();
- virtual bool _remove_ref_i ();
- virtual unsigned long _refcount_value_i ();
-
- ACE_Lock* lock_i ();
-
- private:
-
- typedef ACE_Guard <ACE_Lock> Guard_;
-
- ACE_Lock* lock_;
- unsigned long ref_count_;
-
- private:
- ExternalLockRefCounter (const ExternalLockRefCounter& );
- void operator= (const ExternalLockRefCounter& );
- };
-
- */
- }
-}
-
-#include "Utility/ReferenceCounting/ExternalLockImpl.ipp"
-
-#endif // UTILITY_REFERENCE_COUNTING_EXTERNAL_LOCK_IMPL_HPP
-
-//$Id$
diff --git a/contrib/utility/Utility/ReferenceCounting/ExternalLockImpl.ipp b/contrib/utility/Utility/ReferenceCounting/ExternalLockImpl.ipp
deleted file mode 100644
index 7552d411f27..00000000000
--- a/contrib/utility/Utility/ReferenceCounting/ExternalLockImpl.ipp
+++ /dev/null
@@ -1,122 +0,0 @@
-// file : Utility/ReferenceCounting/ExternalLockImpl.ipp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-namespace Utility
-{
- namespace ReferenceCounting
- {
- /*
- inline
- ExternalLockRefCounter::ExternalLockRefCounter (ACE_Lock* lock)
- : lock_ (lock),
- ref_count_ (1)
- {
- }
-
- inline
- void
- ExternalLockRefCounter::init (ACE_Lock* lock)
- {
- lock_ = lock;
- }
-
- inline
- ExternalLockRefCounter::~ExternalLockRefCounter ()
- {
- }
-
- inline
- ACE_Lock*
- ExternalLockRefCounter::lock_i ()
- {
- return lock_;
- }
-
- inline
- void
- ExternalLockRefCounter::_add_ref ()
- {
- if (lock_)
- {
- Guard_ guard (*lock_);
- _add_ref_i ();
- }
- else
- {
- _add_ref_i ();
- }
- }
-
- inline
- void
- ExternalLockRefCounter::_remove_ref ()
- {
- bool destroy = false;
- {
- if (lock_)
- {
- Guard_ guard (*lock_);
- destroy = _remove_ref_i ();
- }
- else
- {
- destroy = _remove_ref_i ();
- }
- }
- if (destroy) delete this;
- }
-
- inline
- unsigned long
- ExternalLockRefCounter::_refcount_value ()
- {
- if (lock_)
- {
- Guard_ guard (*lock_);
- return _refcount_value_i ();
- }
- else
- {
- return _refcount_value_i ();
- }
- }
-
- inline
- void
- ExternalLockRefCounter::_add_ref_i ()
- {
- ref_count_++;
- }
-
- inline
- bool
- ExternalLockRefCounter::_remove_ref_i ()
- {
- bool destroy = false;
- if (ref_count_ > 0)
- {
- if (--ref_count_ == 0) destroy = true;
- }
- else
- {
- ACE_ERROR ((LM_ERROR,
- "ExternalLockRefCounter::_remove_ref() "
- " _remove_ref() called while ref_coundt == 0\n"
- ));
- }
- return destroy;
- }
-
- inline
- unsigned long
- ExternalLockRefCounter::_refcount_value_i ()
- {
- return ref_count_;
- }
- */
- }
-}
-
-//$Id$
diff --git a/contrib/utility/Utility/ReferenceCounting/Interface.hpp b/contrib/utility/Utility/ReferenceCounting/Interface.hpp
deleted file mode 100644
index 9231860b84a..00000000000
--- a/contrib/utility/Utility/ReferenceCounting/Interface.hpp
+++ /dev/null
@@ -1,84 +0,0 @@
-// file : Utility/ReferenceCounting/Interface.hpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#ifndef UTILITY_REFERENCE_COUNTING_INTERFACE_HPP
-#define UTILITY_REFERENCE_COUNTING_INTERFACE_HPP
-
-#include "Utility/ExH/Compound.hpp"
-#include "Utility/ExH/System/Exception.hpp"
-#include "Utility/ExH/Logic/Exception.hpp"
-#include "Utility/ExH/Logic/DescriptiveException.hpp"
-
-namespace Utility
-{
- namespace ReferenceCounting
- {
- // Interface to a reference-countable object. Note that _remove_ref ()
- // member function has a no-throw semantic. Even though it can lead to
- // a diagnostic loss it was made no-throw because it has a destructor
- // semantic.
-
- class Interface
- {
- public:
- typedef
- unsigned long
- count_t;
-
- typedef
- ExH::System::Exception
- SystemException;
-
- class Exception_ {};
- typedef
- ExH::Compound<Exception_, ExH::Logic::DescriptiveException>
- Exception;
-
- public:
- virtual void
- add_ref () const throw (Exception, SystemException) = 0;
-
- virtual void
- remove_ref () const throw () = 0;
-
- virtual count_t
- refcount_value () const throw (Exception, SystemException) = 0;
-
- protected:
- Interface () throw ();
-
- virtual
- ~Interface () throw ();
-
- protected:
- virtual void
- add_ref_i () const throw (Exception, SystemException) = 0;
-
- virtual bool
- remove_ref_i () const throw (Exception, SystemException) = 0;
-
- virtual count_t
- refcount_value_i () const throw (Exception, SystemException) = 0;
-
- private:
- // Copy semanic is not supported.
- Interface (Interface const&) throw ();
- Interface&
- operator= (Interface const&) throw ();
- };
-
- template <typename Type>
- Type*
- add_ref (Type* ptr)
- throw (Interface::Exception, Interface::SystemException);
- }
-}
-
-#include "Utility/ReferenceCounting/Interface.tpp"
-#include "Utility/ReferenceCounting/Interface.ipp"
-
-#endif // UTILITY_REFERENCE_COUNTING_INTERFACE_HPP
-
-//$Id$
diff --git a/contrib/utility/Utility/ReferenceCounting/Interface.ipp b/contrib/utility/Utility/ReferenceCounting/Interface.ipp
deleted file mode 100644
index f901db4b248..00000000000
--- a/contrib/utility/Utility/ReferenceCounting/Interface.ipp
+++ /dev/null
@@ -1,22 +0,0 @@
-// file : Utility/ReferenceCounting/Interface.ipp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-namespace Utility
-{
- namespace ReferenceCounting
- {
- inline Interface::
- ~Interface () throw ()
- {
- }
-
- inline Interface::
- Interface () throw ()
- {
- }
- }
-}
-
-//$Id$
diff --git a/contrib/utility/Utility/ReferenceCounting/Interface.tpp b/contrib/utility/Utility/ReferenceCounting/Interface.tpp
deleted file mode 100644
index 6a6a1d2d263..00000000000
--- a/contrib/utility/Utility/ReferenceCounting/Interface.tpp
+++ /dev/null
@@ -1,20 +0,0 @@
-// file : Utility/ReferenceCounting/Interface.tpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-namespace Utility
-{
- namespace ReferenceCounting
- {
- template <typename Type>
- inline Type*
- add_ref (Type* ptr)
- throw (Interface::Exception, Interface::SystemException)
- {
- if (ptr != 0) ptr->add_ref ();
- return ptr;
- }
- }
-}
-//$Id$
diff --git a/contrib/utility/Utility/ReferenceCounting/ReferenceCounting.hpp b/contrib/utility/Utility/ReferenceCounting/ReferenceCounting.hpp
deleted file mode 100644
index a20fe0d888c..00000000000
--- a/contrib/utility/Utility/ReferenceCounting/ReferenceCounting.hpp
+++ /dev/null
@@ -1,16 +0,0 @@
-// file : Utility/ReferenceCounting/ReferenceCounting.hpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#ifndef UTILITY_REFERENCE_COUNTING_REFERENCE_COUNTING_HPP
-#define UTILITY_REFERENCE_COUNTING_REFERENCE_COUNTING_HPP
-
-#include "Utility/ReferenceCounting/Interface.hpp"
-#include "Utility/ReferenceCounting/DefaultImpl.hpp"
-#include "Utility/ReferenceCounting/SmartPtr.hpp"
-#include "Utility/ReferenceCounting/StrictPtr.hpp"
-
-#endif // UTILITY_REFERENCE_COUNTING_REFERENCE_COUNTING_HPP
-
-//$Id$
diff --git a/contrib/utility/Utility/ReferenceCounting/SmartPtr.hpp b/contrib/utility/Utility/ReferenceCounting/SmartPtr.hpp
deleted file mode 100644
index 682f0678ee1..00000000000
--- a/contrib/utility/Utility/ReferenceCounting/SmartPtr.hpp
+++ /dev/null
@@ -1,103 +0,0 @@
-// file : Utility/ReferenceCounting/SmartPtr.hpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#ifndef UTILITY_REFERENCE_COUNTING_SMART_PTR_HPP
-#define UTILITY_REFERENCE_COUNTING_SMART_PTR_HPP
-
-#include "Utility/ExH/Compound.hpp"
-#include "Utility/ExH/Logic/DescriptiveException.hpp"
-
-#include "Utility/ReferenceCounting/Interface.hpp"
-
-namespace Utility
-{
- namespace ReferenceCounting
- {
- template <typename T>
- class SmartPtr
- {
- public:
- typedef
- T
- Type;
-
- class NotInitialized_ {};
- typedef
- ExH::Compound<NotInitialized_, ExH::Logic::DescriptiveException>
- NotInitialized;
-
- public:
- // c-tor's
-
- SmartPtr () throw ();
- SmartPtr (Type* ptr) throw ();
- SmartPtr (SmartPtr<Type> const& s_ptr)
- throw (Interface::Exception, Interface::SystemException);
-
- template <typename Other>
- SmartPtr (SmartPtr<Other> const& s_ptr)
- throw (Interface::Exception, Interface::SystemException);
-
- // d-tor
-
- ~SmartPtr () throw ();
-
- // assignment & copy-assignment operators
-
- SmartPtr<Type>&
- operator= (Type* ptr) throw ();
-
- SmartPtr<Type>&
- operator= (SmartPtr<Type> const& s_ptr)
- throw (Interface::Exception, Interface::SystemException);
-
- template <typename Other>
- SmartPtr<Type>&
- operator= (SmartPtr<Other> const& s_ptr)
- throw (Interface::Exception, Interface::SystemException);
-
- //conversions
-
- operator Type* () const throw ();
-
- // accessors
-
- Type*
- operator-> () const throw (NotInitialized);
-
- Type*
- in () const throw ();
-
- Type*
- retn() throw ();
-
- private:
- Type* ptr_;
- };
-
- // Specialization of add_ref function for SmartPtr<T>
- template <typename T>
- T*
- add_ref (SmartPtr<T> const& ptr)
- throw (Interface::Exception, Interface::SystemException);
-
-
- // Dynamic type conversion function for SmartPtr's
- template <typename D, typename S>
- D*
- smart_cast (SmartPtr<S> const& s)
- throw (Interface::Exception, Interface::SystemException);
-
- // Acquisition function
- template <typename T>
- SmartPtr<T>
- acquire (T* ptr) throw (Interface::Exception, Interface::SystemException);
- }
-}
-
-#include "Utility/ReferenceCounting/SmartPtr.tpp"
-
-#endif // UTILITY_REFERENCE_COUNTING_SMART_PTR_HPP
-//$Id$
diff --git a/contrib/utility/Utility/ReferenceCounting/SmartPtr.tpp b/contrib/utility/Utility/ReferenceCounting/SmartPtr.tpp
deleted file mode 100644
index 6596c67f1b1..00000000000
--- a/contrib/utility/Utility/ReferenceCounting/SmartPtr.tpp
+++ /dev/null
@@ -1,170 +0,0 @@
-// file : Utility/ReferenceCounting/SmartPtr.tpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-namespace Utility
-{
- namespace ReferenceCounting
- {
- // c-tor's & d-tor
-
- template <typename T>
- SmartPtr<T>::
- SmartPtr () throw ()
- : ptr_ (0)
- {
- }
-
- template <typename T>
- SmartPtr<T>::
- SmartPtr (Type* ptr) throw ()
- : ptr_ (ptr)
- {
- }
-
- template <typename T>
- SmartPtr<T>::
- SmartPtr (SmartPtr<Type> const& s_ptr)
- throw (Interface::Exception, Interface::SystemException)
- : ptr_ (add_ref (s_ptr.in ()))
- {
- }
-
- template <typename T>
- template <typename Other>
- SmartPtr<T>::
- SmartPtr (SmartPtr<Other> const& s_ptr)
- throw (Interface::Exception, Interface::SystemException)
- : ptr_ (add_ref (s_ptr.in ()))
- {
- }
-
-
- template <typename T>
- SmartPtr<T>::
- ~SmartPtr () throw ()
- {
- // This is an additional catch-all layer to protect from
- // non-conformant Type.
- try
- {
- if (ptr_ != 0) ptr_->remove_ref ();
- }
- catch (...)
- {
- }
- }
-
- // operator=
-
- template <typename T>
- SmartPtr<T>& SmartPtr<T>::
- operator= (Type* ptr) throw ()
- {
- if (ptr_ != 0) ptr_->remove_ref ();
- ptr_ = ptr;
- return *this;
- }
-
-
- template <typename T>
- SmartPtr<T>& SmartPtr<T>::
- operator= (SmartPtr<Type> const& s_ptr)
- throw (Interface::Exception, Interface::SystemException)
- {
- Type* old_ptr (ptr_);
- Type* new_ptr (add_ref (s_ptr.in ())); // this can throw
- if (old_ptr != 0) old_ptr->remove_ref ();
-
- ptr_ = new_ptr; // commit
-
- return *this;
- }
-
-
- template <typename T>
- template <typename Other>
- SmartPtr<T>& SmartPtr<T>::
- operator= (SmartPtr<Other> const& s_ptr)
- throw (Interface::Exception, Interface::SystemException)
- {
- Type* old_ptr (ptr_);
- Other* new_ptr (add_ref (s_ptr.in ())); // this can throw
- if (old_ptr != 0) old_ptr->remove_ref ();
-
- ptr_ = new_ptr; // commit
-
- return *this;
- }
-
- // conversions
-
- template <typename T>
- SmartPtr<T>::
- operator T* () const throw ()
- {
- return ptr_;
- }
-
-
- // accessors
-
- template <typename T>
- T* SmartPtr<T>::
- operator-> () const throw (NotInitialized)
- {
- if (ptr_ == 0)
- {
- throw NotInitialized(
- "Utility::ReferenceCounting::SmartPtr::operator-> : "
- "unable to dereference NULL pointer.");
- }
- return ptr_;
- }
-
- template <typename T>
- T* SmartPtr<T>::
- in () const throw ()
- {
- return ptr_;
- }
-
- template <typename T>
- T* SmartPtr<T>::
- retn() throw ()
- {
- Type* ret (ptr_);
- ptr_ = 0;
- return ret;
- }
-
- // Specialization of add_ref function for SmartPtr<T>
- template <typename T>
- T*
- add_ref (SmartPtr<T> const& ptr)
- throw (Interface::Exception, Interface::SystemException)
- {
- // delegate to generic implementation
- return add_ref (ptr.in ());
- }
-
- // Dynamic type conversion function for SmartPtr's
- template <typename D, typename S>
- D*
- smart_cast (SmartPtr<S> const& s)
- throw (Interface::Exception, Interface::SystemException)
- {
- return add_ref (dynamic_cast<D*>(s.in ()));
- }
-
- // Acquisition function
- template <typename T>
- SmartPtr<T>
- acquire (T* ptr) throw (Interface::Exception, Interface::SystemException)
- {
- return SmartPtr<T> (ptr);
- }
- }
-}
-//$Id$
diff --git a/contrib/utility/Utility/ReferenceCounting/StrictPtr.hpp b/contrib/utility/Utility/ReferenceCounting/StrictPtr.hpp
deleted file mode 100644
index c88c90d5e50..00000000000
--- a/contrib/utility/Utility/ReferenceCounting/StrictPtr.hpp
+++ /dev/null
@@ -1,108 +0,0 @@
-// file : Utility/ReferenceCounting/StrictPtr.hpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#ifndef UTILITY_REFERENCE_COUNTING_STRICT_PTR_HPP
-#define UTILITY_REFERENCE_COUNTING_STRICT_PTR_HPP
-
-#include "Utility/ExH/Compound.hpp"
-#include "Utility/ExH/Logic/DescriptiveException.hpp"
-
-#include "Utility/ReferenceCounting/Interface.hpp"
-
-namespace Utility
-{
- namespace ReferenceCounting
- {
- template <typename T>
- class StrictPtr
- {
- public:
- typedef
- T
- Type;
-
- class NotInitialized_ {};
- typedef
- ExH::Compound<NotInitialized_, ExH::Logic::DescriptiveException>
- NotInitialized;
-
- public:
- // c-tor's
-
- StrictPtr () throw ();
-
- explicit
- StrictPtr (Type* ptr) throw ();
-
- StrictPtr (StrictPtr<Type> const& s_ptr)
- throw (Interface::Exception, Interface::SystemException);
-
- template <typename Other>
- StrictPtr (StrictPtr<Other> const& s_ptr)
- throw (Interface::Exception, Interface::SystemException);
- // d-tor
-
- ~StrictPtr () throw ();
-
- // assignment & copy-assignment operators
-
- StrictPtr<Type>&
- operator= (Type* ptr) throw ();
-
- StrictPtr<Type>&
- operator= (StrictPtr<Type> const& s_ptr)
- throw (Interface::Exception, Interface::SystemException);
-
- template <typename Other>
- StrictPtr<Type>&
- operator= (StrictPtr<Other> const& s_ptr)
- throw (Interface::Exception, Interface::SystemException);
-
- // conversions
-
- // Note: implicit conversion (operator Type* ()) is not supported.
-
- // comparison
-
- bool
- operator== (Type* other) const throw ();
-
- bool
- operator!= (Type* other) const throw ();
-
- // accessors
-
- Type*
- operator-> () const throw (NotInitialized);
-
- Type*
- in () const throw ();
-
- Type*
- retn() throw ();
-
- private:
- Type* ptr_;
- };
-
- // Specialization of add_ref function for StrictPtr<T>
- template <typename T>
- T*
- add_ref (StrictPtr<T> const& ptr)
- throw (Interface::Exception, Interface::SystemException);
-
- // Dynamic type conversion function for StrictPtr's
- template <typename D, typename S>
- StrictPtr<D>
- strict_cast (StrictPtr<S> const& s)
- throw (Interface::Exception, Interface::SystemException);
- }
-}
-
-#include "Utility/ReferenceCounting/StrictPtr.tpp"
-
-#endif // UTILITY_REFERENCE_COUNTING_STRICT_PTR_HPP
-
-//$Id$
diff --git a/contrib/utility/Utility/ReferenceCounting/StrictPtr.tpp b/contrib/utility/Utility/ReferenceCounting/StrictPtr.tpp
deleted file mode 100644
index 6a30188119c..00000000000
--- a/contrib/utility/Utility/ReferenceCounting/StrictPtr.tpp
+++ /dev/null
@@ -1,167 +0,0 @@
-// file : Utility/ReferenceCounting/StrictPtr.tpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-namespace Utility
-{
- namespace ReferenceCounting
- {
- // c-tor's & d-tor
-
- template <typename T>
- StrictPtr<T>::
- StrictPtr () throw ()
- : ptr_ (0)
- {
- }
-
- template <typename T>
- StrictPtr<T>::
- StrictPtr (Type* ptr) throw ()
- : ptr_ (ptr)
- {
- }
-
- template <typename T>
- StrictPtr<T>::
- StrictPtr (StrictPtr<Type> const& s_ptr)
- throw (Interface::Exception, Interface::SystemException)
- : ptr_ (add_ref (s_ptr.in ()))
- {
- }
-
- template <typename T>
- template <typename Other>
- StrictPtr<T>::
- StrictPtr (StrictPtr<Other> const& s_ptr)
- throw (Interface::Exception, Interface::SystemException)
- : ptr_ (add_ref (s_ptr.in ()))
- {
- }
-
-
- template <typename T>
- StrictPtr<T>::
- ~StrictPtr () throw ()
- {
- // This is an additional catch-all layer to protect from
- // non-conformant Type.
- try
- {
- if (ptr_ != 0) ptr_->remove_ref ();
- }
- catch (...)
- {
- }
- }
-
- // operator=
-
- template <typename T>
- StrictPtr<T>&
- StrictPtr<T>::operator= (Type* ptr) throw ()
- {
- if (ptr_ != 0) ptr_->remove_ref ();
- ptr_ = ptr;
- return *this;
- }
-
- template <typename T>
- StrictPtr<T>& StrictPtr<T>::
- operator= (StrictPtr<Type> const& s_ptr)
- throw (Interface::Exception, Interface::SystemException)
- {
- Type* old_ptr (ptr_);
- Type* new_ptr (add_ref (s_ptr.in ())); // this can throw
- if (old_ptr != 0) old_ptr->remove_ref ();
-
- ptr_ = new_ptr; // commit
-
- return *this;
- }
-
-
- template <typename T>
- template <typename Other>
- StrictPtr<T>& StrictPtr<T>::
- operator= (StrictPtr<Other> const& s_ptr)
- throw (Interface::Exception, Interface::SystemException)
- {
- Type* old_ptr (ptr_);
- Other* new_ptr (add_ref (s_ptr.in ())); // this can throw
- if (old_ptr != 0) old_ptr->remove_ref ();
-
- ptr_ = new_ptr; // commit
-
- return *this;
- }
-
- // comparison
-
- template <typename T>
- bool StrictPtr<T>::
- operator== (Type* other) const throw ()
- {
- return ptr_ == other;
- }
-
- template <typename T>
- bool StrictPtr<T>::
- operator!= (Type* other) const throw ()
- {
- return ptr_ != other;
- }
-
- // accessors
-
- template <typename T>
- T* StrictPtr<T>::
- operator-> () const throw (NotInitialized)
- {
- if (ptr_ == 0)
- {
- throw NotInitialized(
- "Utility::ReferenceCounting::StrictPtr::operator-> : "
- "unable to dereference NULL pointer.");
- }
- return ptr_;
- }
-
- template <typename T>
- T* StrictPtr<T>::
- in () const throw ()
- {
- return ptr_;
- }
-
- template <typename T>
- T* StrictPtr<T>::
- retn() throw ()
- {
- Type* ret (ptr_);
- ptr_ = 0;
- return ret;
- }
-
- // Specialization of add_ref function for StrictPtr<T>
- template <typename T>
- T*
- add_ref (StrictPtr<T> const& ptr)
- throw (Interface::Exception, Interface::SystemException)
- {
- // delegate to generic implementation
- return add_ref (ptr.in ());
- }
-
- // Dynamic type conversion function for StrictPtr's
- template <typename D, typename S>
- StrictPtr<D>
- strict_cast (StrictPtr<S> const& s)
- throw (Interface::Exception, Interface::SystemException)
- {
- return StrictPtr<D>(add_ref (dynamic_cast<D*>(s.in ())));
- }
- }
-}
-//$Id$
diff --git a/contrib/utility/Utility/Synch/Policy/Null.hpp b/contrib/utility/Utility/Synch/Policy/Null.hpp
deleted file mode 100644
index cfc9c8f788e..00000000000
--- a/contrib/utility/Utility/Synch/Policy/Null.hpp
+++ /dev/null
@@ -1,54 +0,0 @@
-// file : Utility/Synch/Policy/Null.hpp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-#ifndef UTILITY_SYNCH_POLICY_NULL_HPP
-#define UTILITY_SYNCH_POLICY_NULL_HPP
-
-namespace Utility
-{
- namespace Synch
- {
- namespace Policy
- {
-
- class NullMutex
- {
- };
-
- class NullGuard
- {
- public:
- explicit
- NullGuard (NullMutex&) throw ();
-
- private:
- NullGuard (NullGuard const&) throw ();
-
- NullGuard&
- operator= (NullGuard const&) throw ();
- };
-
- struct Null
- {
- typedef
- NullMutex
- Mutex;
-
- typedef
- NullGuard
- ReadGuard;
-
- typedef
- NullGuard
- WriteGuard;
- };
- }
- }
-}
-
-#include "Utility/Synch/Policy/Null.ipp"
-
-#endif // UTILITY_SYNCH_POLICY_NULL_HPP
-//$Id$
diff --git a/contrib/utility/Utility/Synch/Policy/Null.ipp b/contrib/utility/Utility/Synch/Policy/Null.ipp
deleted file mode 100644
index dbc4c78b698..00000000000
--- a/contrib/utility/Utility/Synch/Policy/Null.ipp
+++ /dev/null
@@ -1,20 +0,0 @@
-// file : Utility/Synch/Policy/Null.ipp
-// author : Boris Kolpackov <boris@kolpackov.net>
-// copyright : Copyright (c) 2002-2003 Boris Kolpackov
-// license : http://kolpackov.net/license.html
-
-namespace Utility
-{
- namespace Synch
- {
- namespace Policy
- {
- inline NullGuard::
- NullGuard (NullMutex&) throw ()
- {
- }
- }
- }
-}
-
-//$Id$