Boost logo

Boost-Commit :

From: fmhess_at_[hidden]
Date: 2007-06-12 10:25:36


Author: fmhess
Date: 2007-06-12 10:25:35 EDT (Tue, 12 Jun 2007)
New Revision: 6998
URL: http://svn.boost.org/trac/boost/changeset/6998

Log:
Removing files that have been copied over to
sandbox/thread_safe_signals

Removed:
   sandbox/boost/deconstruct_ptr.hpp
   sandbox/boost/last_value.hpp
   sandbox/boost/postconstructible.hpp
   sandbox/boost/predestructible.hpp
   sandbox/boost/thread_safe_signal.hpp
   sandbox/boost/thread_safe_signals/

Deleted: sandbox/boost/deconstruct_ptr.hpp
==============================================================================
--- sandbox/boost/deconstruct_ptr.hpp 2007-06-12 10:25:35 EDT (Tue, 12 Jun 2007)
+++ (empty file)
@@ -1,77 +0,0 @@
-// A function for creating a shared_ptr that enhances the plain
-// shared_ptr constructors by adding support for postconstructors
-// and predestructors through the boost::postconstructible and
-// boost::predestructible base classes.
-//
-// Author: Frank Mori Hess 2007. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_DECONSTRUCT_PTR_HEADER
-#define BOOST_DECONSTRUCT_PTR_HEADER
-
-#include <boost/checked_delete.hpp>
-#include <boost/postconstructible.hpp>
-#include <boost/predestructible.hpp>
-#include <boost/shared_ptr.hpp>
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-
-namespace boost
-{
- namespace deconstruct_detail
- {
- extern inline void do_postconstruct(const boost::postconstructible *ptr)
- {
- boost::postconstructible *nonconst_ptr = const_cast<boost::postconstructible*>(ptr);
- nonconst_ptr->postconstruct();
- }
- extern inline void do_postconstruct(...)
- {
- }
- }
- template<typename T> class predestructing_deleter
- {
- public:
- void operator()(const T *ptr) const
- {
- m_predestruct(ptr);
- checked_delete(ptr);
- }
- private:
- static void m_predestruct(...)
- {
- }
- static void m_predestruct(const boost::predestructible *ptr)
- {
- boost::predestructible *nonconst_ptr = const_cast<boost::predestructible*>(ptr);
- nonconst_ptr->predestruct();
- }
- };
-
- template<typename T>
- shared_ptr<T> deconstruct_ptr(T *ptr)
- {
- if(ptr == 0) return shared_ptr<T>();
- shared_ptr<T> shared(ptr, boost::predestructing_deleter<T>());
- deconstruct_detail::do_postconstruct(ptr);
- return shared;
- }
- template<typename T, typename D>
- shared_ptr<T> deconstruct_ptr(T *ptr, D deleter)
- {
- if(ptr == 0) return shared_ptr<T>();
- shared_ptr<T> shared(ptr, deleter);
- deconstruct_detail::do_postconstruct(ptr);
- return shared;
- }
-}
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-
-#endif

Deleted: sandbox/boost/last_value.hpp
==============================================================================
--- sandbox/boost/last_value.hpp 2007-06-12 10:25:35 EDT (Tue, 12 Jun 2007)
+++ (empty file)
@@ -1,92 +0,0 @@
-// last_value function object (documented as part of Boost.Signals)
-
-// Copyright Frank Mori Hess 2007.
-// Copyright Douglas Gregor 2001-2003. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// For more information, see http://www.boost.org/libs/signals
-
-#ifndef BOOST_LAST_VALUE_HPP
-#define BOOST_LAST_VALUE_HPP
-
-#include <cassert>
-#include <boost/optional.hpp>
-#include <stdexcept>
-
-namespace boost {
- class expired_slot;
- // no_slots_error is thrown when we are unable to generate a return value
- // due to no slots being connected to the signal.
- class no_slots_error: public std::exception
- {
- public:
- virtual const char* what() {return "boost::no_slots_error";}
- };
- namespace last_value_detail {
- template<typename T>
- T default_construct(const T *resolver)
- {
- throw no_slots_error();
- }
- template<typename T>
- optional<T> default_construct(const optional<T> *resolver)
- {
- return optional<T>();
- }
- }
- template<typename T>
- struct last_value {
- typedef T result_type;
-
- template<typename InputIterator>
- T operator()(InputIterator first, InputIterator last) const
- {
- T * resolver = 0;
- if(first == last)
- {
- return last_value_detail::default_construct(resolver);
- }
- optional<T> value;
- while (first != last)
- {
- try
- {
- value = *first;
- }
- catch(const expired_slot &)
- {}
- ++first;
- }
- if(value) return value.get();
- return last_value_detail::default_construct(resolver);
- }
- };
-
- template<>
- struct last_value<void> {
- struct unusable {};
-
- public:
- typedef unusable result_type;
-
- template<typename InputIterator>
- result_type
- operator()(InputIterator first, InputIterator last) const
- {
- while (first != last)
- {
- try
- {
- *first;
- }
- catch(const expired_slot &)
- {}
- ++first;
- }
- return result_type();
- }
- };
-}
-#endif // BOOST_SIGNALS_LAST_VALUE_HPP

Deleted: sandbox/boost/postconstructible.hpp
==============================================================================
--- sandbox/boost/postconstructible.hpp 2007-06-12 10:25:35 EDT (Tue, 12 Jun 2007)
+++ (empty file)
@@ -1,42 +0,0 @@
-// A simple framework for creating objects with postconstructors.
-// The objects must inherit from boost::postconstructible, and
-// have their lifetimes managed by
-// boost::shared_ptr created with the boost::deconstruct_ptr()
-// function.
-//
-// Author: Frank Mori Hess 2007. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_POSTCONSTRUCTIBLE_HEADER
-#define BOOST_POSTCONSTRUCTIBLE_HEADER
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-
-namespace boost
-{
- class postconstructible;
- namespace deconstruct_detail
- {
- void do_postconstruct(const boost::postconstructible *ptr);
- }
-
- class postconstructible
- {
- public:
- friend void deconstruct_detail::do_postconstruct(const boost::postconstructible *ptr);
- protected:
- postconstructible() {}
- virtual ~postconstructible() {}
- virtual void postconstruct() {}
- };
-}
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-
-#endif

Deleted: sandbox/boost/predestructible.hpp
==============================================================================
--- sandbox/boost/predestructible.hpp 2007-06-12 10:25:35 EDT (Tue, 12 Jun 2007)
+++ (empty file)
@@ -1,35 +0,0 @@
-// A simple framework for creating objects with predestructors.
-// The objects must inherit from boost::predestructible, and
-// have their lifetimes managed by
-// boost::shared_ptr created with the boost::deconstruct_ptr()
-// function.
-//
-// Author: Frank Mori Hess 2007. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_PREDESTRUCTIBLE_HEADER
-#define BOOST_PREDESTRUCTIBLE_HEADER
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-
-namespace boost
-{
- class predestructible
- {
- public:
- virtual void predestruct() {}
- protected:
- predestructible() {}
- virtual ~predestructible() {}
- };
-}
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-
-#endif

Deleted: sandbox/boost/thread_safe_signal.hpp
==============================================================================
--- sandbox/boost/thread_safe_signal.hpp 2007-06-12 10:25:35 EDT (Tue, 12 Jun 2007)
+++ (empty file)
@@ -1,88 +0,0 @@
-/*
- A thread-safe (partial) implementation of boost.signals.
-
- Author: Frank Hess <frank.hess_at_[hidden]>
- Begin: 2007-01-23
-*/
-/* This software was developed at the National Institute of Standards and
- * Technology by employees of the Federal Government in the course of
- * their official duties. Pursuant to title 17 Section 105 of the United
- * States Code this software is not subject to copyright protection and is
- * in the public domain. This is an experimental system. NIST assumes no
- * responsibility whatsoever for its use by other parties, and makes no
- * guarantees, expressed or implied, about its quality, reliability, or
- * any other characteristic. We would appreciate acknowledgement if the
- * software is used.
- */
-// Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// For more information, see http://www.boost.org
-
-#ifndef _THREAD_SAFE_SIGNAL_HPP
-#define _THREAD_SAFE_SIGNAL_HPP
-
-#define BOOST_SIGNALS_NAMESPACE signalslib
-
-#include <algorithm>
-#include <boost/assert.hpp>
-#include <boost/config.hpp>
-#include <boost/function.hpp>
-#include <boost/last_value.hpp>
-#include <boost/preprocessor/arithmetic.hpp>
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/iteration.hpp>
-#include <boost/preprocessor/repetition.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/type_traits.hpp>
-#include <boost/thread_safe_signals/detail/signals_common.hpp>
-#include <boost/thread_safe_signals/detail/signals_common_macros.hpp>
-#include <boost/thread_safe_signals/detail/slot_groups.hpp>
-#include <boost/thread_safe_signals/detail/slot_call_iterator.hpp>
-#include <boost/thread_safe_signals/auto_threaded.hpp>
-#include <boost/thread_safe_signals/connection.hpp>
-#include <boost/thread_safe_signals/shared_connection_block.hpp>
-#include <boost/thread_safe_signals/single_threaded.hpp>
-#include <boost/thread_safe_signals/slot.hpp>
-#include <functional>
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-
-#define BOOST_PP_ITERATION_LIMITS (0, BOOST_SIGNALS_MAX_ARGS)
-#define BOOST_PP_FILENAME_1 <boost/thread_safe_signals/detail/signal_template.hpp>
-#include BOOST_PP_ITERATE()
-
-namespace boost
-{
-#ifndef signals
- // for backward compatibility
- namespace signals = signalslib;
-#endif
- template<typename Signature,
- typename Combiner = last_value<typename boost::function_traits<Signature>::result_type>,
- typename Group = int,
- typename GroupCompare = std::less<Group>,
- typename SlotFunction = function<Signature>,
- typename ThreadingModel = signalslib::auto_threaded >
- class signal: public signalslib::detail::signalN<function_traits<Signature>::arity,
- Signature, Combiner, Group, GroupCompare, SlotFunction, ThreadingModel>::type
- {
- private:
- typedef typename signalslib::detail::signalN<boost::function_traits<Signature>::arity,
- Signature, Combiner, Group, GroupCompare, SlotFunction, ThreadingModel>::type base_type;
- public:
- signal(const Combiner &combiner = Combiner(), const GroupCompare &group_compare = GroupCompare()):
- base_type(combiner, group_compare)
- {}
- };
-}
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-
-#endif // _THREAD_SAFE_SIGNAL_HPP


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk