annotate DEPENDENCIES/generic/include/boost/signals2/trackable.hpp @ 16:2665513ce2d3

Add boost headers
author Chris Cannam
date Tue, 05 Aug 2014 11:11:38 +0100
parents
children c530137014c0
rev   line source
Chris@16 1 // Boost.Signals2 library
Chris@16 2
Chris@16 3 // Copyright Frank Mori Hess 2007,2009.
Chris@16 4 // Copyright Timmo Stange 2007.
Chris@16 5 // Copyright Douglas Gregor 2001-2004. Use, modification and
Chris@16 6 // distribution is subject to the Boost Software License, Version
Chris@16 7 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
Chris@16 8 // http://www.boost.org/LICENSE_1_0.txt)
Chris@16 9
Chris@16 10 // Compatibility class to ease porting from the original
Chris@16 11 // Boost.Signals library. However,
Chris@16 12 // boost::signals2::trackable is NOT thread-safe.
Chris@16 13
Chris@16 14 // For more information, see http://www.boost.org
Chris@16 15
Chris@16 16 #ifndef BOOST_SIGNALS2_TRACKABLE_HPP
Chris@16 17 #define BOOST_SIGNALS2_TRACKABLE_HPP
Chris@16 18
Chris@16 19 #include <boost/assert.hpp>
Chris@16 20 #include <boost/shared_ptr.hpp>
Chris@16 21
Chris@16 22 namespace boost {
Chris@16 23 namespace signals2 {
Chris@16 24 namespace detail
Chris@16 25 {
Chris@16 26 class tracked_objects_visitor;
Chris@16 27 }
Chris@16 28 class trackable {
Chris@16 29 protected:
Chris@16 30 trackable(): _tracked_ptr(static_cast<int*>(0)) {}
Chris@16 31 trackable(const trackable &): _tracked_ptr(static_cast<int*>(0)) {}
Chris@16 32 trackable& operator=(const trackable &)
Chris@16 33 {
Chris@16 34 return *this;
Chris@16 35 }
Chris@16 36 ~trackable() {}
Chris@16 37 private:
Chris@16 38 friend class detail::tracked_objects_visitor;
Chris@16 39 const shared_ptr<void>& get_shared_ptr() const
Chris@16 40 {
Chris@16 41 return _tracked_ptr;
Chris@16 42 }
Chris@16 43
Chris@16 44 shared_ptr<void> _tracked_ptr;
Chris@16 45 };
Chris@16 46 } // end namespace signals2
Chris@16 47 } // end namespace boost
Chris@16 48
Chris@16 49 #endif // BOOST_SIGNALS2_TRACKABLE_HPP