Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r48942 - in sandbox/thread_safe_signals/trunk/boost/signals2: . detail
From: fmhess_at_[hidden]
Date: 2008-09-24 10:21:55


Author: fmhess
Date: 2008-09-24 10:21:55 EDT (Wed, 24 Sep 2008)
New Revision: 48942
URL: http://svn.boost.org/trac/boost/changeset/48942

Log:
Changed some names to better conform to boost coding guidelines.

Text files modified:
   sandbox/thread_safe_signals/trunk/boost/signals2/connection.hpp | 43 ++++++++++++++++++++-------------------
   sandbox/thread_safe_signals/trunk/boost/signals2/detail/signal_template.hpp | 10 ++++----
   sandbox/thread_safe_signals/trunk/boost/signals2/detail/slot_call_iterator.hpp | 6 ++--
   sandbox/thread_safe_signals/trunk/boost/signals2/detail/slot_template.hpp | 2
   sandbox/thread_safe_signals/trunk/boost/signals2/shared_connection_block.hpp | 6 ++--
   sandbox/thread_safe_signals/trunk/boost/signals2/slot_base.hpp | 8 +++---
   6 files changed, 38 insertions(+), 37 deletions(-)

Modified: sandbox/thread_safe_signals/trunk/boost/signals2/connection.hpp
==============================================================================
--- sandbox/thread_safe_signals/trunk/boost/signals2/connection.hpp (original)
+++ sandbox/thread_safe_signals/trunk/boost/signals2/connection.hpp 2008-09-24 10:21:55 EDT (Wed, 24 Sep 2008)
@@ -1,15 +1,16 @@
 /*
+ boost::signals2::connection provides a handle to a signal/slot connection.
 
   Author: Frank Mori Hess <fmhess_at_[hidden]>
   Begin: 2007-01-23
 */
 // Copyright Frank Mori Hess 2007-2008.
-//
-// Use, modification and
-// distribution is subject to the Boost Software License, Version
+// Distributed under 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)
 
+// See http://www.boost.org/libs/signals2 for library home page.
+
 #ifndef BOOST_TSS_CONNECTION_HEADER
 #define BOOST_TSS_CONNECTION_HEADER
 
@@ -30,14 +31,14 @@
     extern inline void null_deleter(const void*) {}
     namespace detail
     {
- class ConnectionBodyBase
+ class connection_body_base
       {
       public:
- ConnectionBodyBase():
+ connection_body_base():
           _connected(true)
         {
         }
- virtual ~ConnectionBodyBase() {}
+ virtual ~connection_body_base() {}
         virtual void disconnect() = 0;
         void nolock_disconnect()
         {
@@ -61,15 +62,15 @@
       };
 
       template<typename GroupKey, typename SlotType, typename ThreadingModel>
- class ConnectionBody: public ConnectionBodyBase
+ class connection_body: public connection_body_base
       {
       public:
         typedef typename ThreadingModel::mutex_type mutex_type;
- ConnectionBody(const SlotType &slot_in):
+ connection_body(const SlotType &slot_in):
           slot(slot_in)
         {
         }
- virtual ~ConnectionBody() {}
+ virtual ~connection_body() {}
         virtual void disconnect()
         {
           typename mutex_type::scoped_lock lock(mutex);
@@ -132,50 +133,50 @@
       friend class shared_connection_block;
 
       connection() {}
- connection(const connection &other): _weakConnectionBody(other._weakConnectionBody)
+ connection(const connection &other): _weak_connection_body(other._weak_connection_body)
       {}
- connection(boost::weak_ptr<detail::ConnectionBodyBase> connectionBody):
- _weakConnectionBody(connectionBody)
+ connection(boost::weak_ptr<detail::connection_body_base> connectionBody):
+ _weak_connection_body(connectionBody)
       {}
       ~connection() {}
       void disconnect() const
       {
- boost::shared_ptr<detail::ConnectionBodyBase> connectionBody(_weakConnectionBody.lock());
+ boost::shared_ptr<detail::connection_body_base> connectionBody(_weak_connection_body.lock());
         if(connectionBody == 0) return;
         connectionBody->disconnect();
       }
       bool connected() const
       {
- boost::shared_ptr<detail::ConnectionBodyBase> connectionBody(_weakConnectionBody.lock());
+ boost::shared_ptr<detail::connection_body_base> connectionBody(_weak_connection_body.lock());
         if(connectionBody == 0) return false;
         return connectionBody->connected();
       }
       bool blocked() const
       {
- boost::shared_ptr<detail::ConnectionBodyBase> connectionBody(_weakConnectionBody.lock());
+ boost::shared_ptr<detail::connection_body_base> connectionBody(_weak_connection_body.lock());
         if(connectionBody == 0) return true;
         return connectionBody->blocked();
       }
       bool operator==(const connection& other) const
       {
- boost::shared_ptr<detail::ConnectionBodyBase> connectionBody(_weakConnectionBody.lock());
- boost::shared_ptr<detail::ConnectionBodyBase> otherConnectionBody(other._weakConnectionBody.lock());
+ boost::shared_ptr<detail::connection_body_base> connectionBody(_weak_connection_body.lock());
+ boost::shared_ptr<detail::connection_body_base> otherConnectionBody(other._weak_connection_body.lock());
         return connectionBody == otherConnectionBody;
       }
       bool operator<(const connection& other) const
       {
- boost::shared_ptr<detail::ConnectionBodyBase> connectionBody(_weakConnectionBody.lock());
- boost::shared_ptr<detail::ConnectionBodyBase> otherConnectionBody(other._weakConnectionBody.lock());
+ boost::shared_ptr<detail::connection_body_base> connectionBody(_weak_connection_body.lock());
+ boost::shared_ptr<detail::connection_body_base> otherConnectionBody(other._weak_connection_body.lock());
         return connectionBody < otherConnectionBody;
       }
       void swap(connection &other)
       {
         using std::swap;
- swap(_weakConnectionBody, other._weakConnectionBody);
+ swap(_weak_connection_body, other._weak_connection_body);
       }
     private:
 
- boost::weak_ptr<detail::ConnectionBodyBase> _weakConnectionBody;
+ boost::weak_ptr<detail::connection_body_base> _weak_connection_body;
     };
 
     class scoped_connection: public connection

Modified: sandbox/thread_safe_signals/trunk/boost/signals2/detail/signal_template.hpp
==============================================================================
--- sandbox/thread_safe_signals/trunk/boost/signals2/detail/signal_template.hpp (original)
+++ sandbox/thread_safe_signals/trunk/boost/signals2/detail/signal_template.hpp 2008-09-24 10:21:55 EDT (Wed, 24 Sep 2008)
@@ -56,7 +56,7 @@
       private:
         class slot_invoker;
         typedef typename group_key<Group>::type group_key_type;
- typedef shared_ptr<ConnectionBody<group_key_type, slot_type, ThreadingModel> > connection_body_type;
+ typedef shared_ptr<connection_body<group_key_type, slot_type, ThreadingModel> > connection_body_type;
         typedef grouped_list<Group, GroupCompare, connection_body_type> connection_list_type;
       public:
         typedef typename slot_function_type::result_type slot_result_type;
@@ -65,7 +65,7 @@
         typedef Group group_type;
         typedef GroupCompare group_compare_type;
         typedef typename detail::slot_call_iterator_t<slot_invoker,
- typename connection_list_type::iterator, ConnectionBody<group_key_type, slot_type, ThreadingModel> > slot_call_iterator;
+ typename connection_list_type::iterator, connection_body<group_key_type, slot_type, ThreadingModel> > slot_call_iterator;
 
         BOOST_SIGNAL_IMPL_CLASS_NAME(const combiner_type &combiner,
           const group_compare_type &group_compare):
@@ -288,7 +288,7 @@
           {
             bool connected;
             {
- typename ConnectionBody<group_key_type, slot_type, ThreadingModel>::mutex_type::scoped_lock lock((*it)->mutex);
+ typename connection_body<group_key_type, slot_type, ThreadingModel>::mutex_type::scoped_lock lock((*it)->mutex);
               if(grab_tracked)
                 (*it)->nolock_slot_expired();
               connected = (*it)->nolock_nograb_connected();
@@ -339,7 +339,7 @@
         connection_body_type create_new_connection(const slot_type &slot)
         {
           nolock_force_unique_connection_list();
- return connection_body_type(new ConnectionBody<group_key_type, slot_type, ThreadingModel>(slot));
+ return connection_body_type(new connection_body<group_key_type, slot_type, ThreadingModel>(slot));
         }
         void do_disconnect(const group_type &group, mpl::bool_<true> is_group)
         {
@@ -354,7 +354,7 @@
           for(it = local_state->connection_bodies.begin();
             it != local_state->connection_bodies.end(); ++it)
           {
- typename ConnectionBody<group_key_type, slot_type, ThreadingModel>::mutex_type::scoped_lock lock((*it)->mutex);
+ typename connection_body<group_key_type, slot_type, ThreadingModel>::mutex_type::scoped_lock lock((*it)->mutex);
             if((*it)->slot.slot_function() == slot)
             {
               (*it)->nolock_disconnect();

Modified: sandbox/thread_safe_signals/trunk/boost/signals2/detail/slot_call_iterator.hpp
==============================================================================
--- sandbox/thread_safe_signals/trunk/boost/signals2/detail/slot_call_iterator.hpp (original)
+++ sandbox/thread_safe_signals/trunk/boost/signals2/detail/slot_call_iterator.hpp 2008-09-24 10:21:55 EDT (Wed, 24 Sep 2008)
@@ -52,7 +52,7 @@
           iter(iter_in), end(end_in), f(f),
           cache(&c), callable_iter(end_in)
         {
- lockNextCallable();
+ lock_next_callable();
         }
 
         typename inherited::reference
@@ -75,7 +75,7 @@
         void increment()
         {
           ++iter;
- lockNextCallable();
+ lock_next_callable();
           cache->reset();
         }
 
@@ -87,7 +87,7 @@
       private:
         typedef typename ConnectionBody::mutex_type::scoped_lock lock_type;
 
- void lockNextCallable() const
+ void lock_next_callable() const
         {
           if(iter == callable_iter)
           {

Modified: sandbox/thread_safe_signals/trunk/boost/signals2/detail/slot_template.hpp
==============================================================================
--- sandbox/thread_safe_signals/trunk/boost/signals2/detail/slot_template.hpp (original)
+++ sandbox/thread_safe_signals/trunk/boost/signals2/detail/slot_template.hpp 2008-09-24 10:21:55 EDT (Wed, 24 Sep 2008)
@@ -91,7 +91,7 @@
       // tracking
       BOOST_SLOT_CLASS_NAME(BOOST_SIGNALS_NUM_ARGS)& track(const weak_ptr<void> &tracked)
       {
- _trackedObjects.push_back(tracked);
+ _tracked_objects.push_back(tracked);
         return *this;
       }
       BOOST_SLOT_CLASS_NAME(BOOST_SIGNALS_NUM_ARGS)& track(const signal_base &signal)

Modified: sandbox/thread_safe_signals/trunk/boost/signals2/shared_connection_block.hpp
==============================================================================
--- sandbox/thread_safe_signals/trunk/boost/signals2/shared_connection_block.hpp (original)
+++ sandbox/thread_safe_signals/trunk/boost/signals2/shared_connection_block.hpp 2008-09-24 10:21:55 EDT (Wed, 24 Sep 2008)
@@ -23,14 +23,14 @@
     {
     public:
       shared_connection_block(connection &conn):
- _weakConnectionBody(conn._weakConnectionBody)
+ _weak_connection_body(conn._weak_connection_body)
       {
         block();
       }
       void block()
       {
         if(_blocker) return;
- boost::shared_ptr<detail::ConnectionBodyBase> connectionBody(_weakConnectionBody.lock());
+ boost::shared_ptr<detail::connection_body_base> connectionBody(_weak_connection_body.lock());
         if(connectionBody == 0) return;
         _blocker = connectionBody->get_blocker();
       }
@@ -43,7 +43,7 @@
         return _blocker != 0;
       }
     private:
- boost::weak_ptr<detail::ConnectionBodyBase> _weakConnectionBody;
+ boost::weak_ptr<detail::connection_body_base> _weak_connection_body;
       shared_ptr<void> _blocker;
     };
   }

Modified: sandbox/thread_safe_signals/trunk/boost/signals2/slot_base.hpp
==============================================================================
--- sandbox/thread_safe_signals/trunk/boost/signals2/slot_base.hpp (original)
+++ sandbox/thread_safe_signals/trunk/boost/signals2/slot_base.hpp 2008-09-24 10:21:55 EDT (Wed, 24 Sep 2008)
@@ -26,7 +26,7 @@
     public:
       virtual char const * what() const throw()
       {
- return "boost::expired_slot";
+ return "boost::signals2::expired_slot";
       }
     };
 
@@ -36,7 +36,7 @@
       typedef std::vector<boost::weak_ptr<void> > tracked_container_type;
       typedef std::vector<boost::shared_ptr<void> > locked_container_type;
 
- const tracked_container_type& tracked_objects() const {return _trackedObjects;}
+ const tracked_container_type& tracked_objects() const {return _tracked_objects;}
       locked_container_type lock() const
       {
         locked_container_type locked_objects;
@@ -66,10 +66,10 @@
     protected:
       void track_signal(const signal_base &signal)
       {
- _trackedObjects.push_back(signal.lock_pimpl());
+ _tracked_objects.push_back(signal.lock_pimpl());
       }
 
- tracked_container_type _trackedObjects;
+ tracked_container_type _tracked_objects;
     };
   }
 } // end namespace boost


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