logo       

CVS: boost/boost/signals/detail named_slot_map.hpp, 1.12, 1.13: msg#00829

Subject: CVS: boost/boost/signals/detail named_slot_map.hpp, 1.12, 1.13
Update of /cvsroot/boost/boost/boost/signals/detail
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24250/boost/signals/detail

Modified Files:
        named_slot_map.hpp 
Log Message:
Improve signal invocation performance, from Robert Zeh

Index: named_slot_map.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/signals/detail/named_slot_map.hpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- named_slot_map.hpp  8 Dec 2005 03:12:53 -0000       1.12
+++ named_slot_map.hpp  30 Sep 2006 13:46:07 -0000      1.13
@@ -60,7 +60,8 @@
   typedef const stored_group& first_argument_type;
   typedef const stored_group& second_argument_type;
 
-  group_bridge_compare(const Compare& c) : comp(c) {}
+  group_bridge_compare(const Compare& c) : comp(c) 
+  { }
 
   bool operator()(const stored_group& k1, const stored_group& k2) const
   {
@@ -92,13 +93,39 @@
                           connection_slot_pair,
                           forward_traversal_tag> inherited;
 public:
-  named_slot_map_iterator();
-  named_slot_map_iterator(const named_slot_map_iterator&);
-  named_slot_map_iterator& operator=(const named_slot_map_iterator&);
-
-  connection_slot_pair& dereference() const;
-  void increment();
-  bool equal(const named_slot_map_iterator& other) const;
+  named_slot_map_iterator() : slot_assigned(false) 
+  { }
+  named_slot_map_iterator(const named_slot_map_iterator& other) 
+    : group(other.group), last_group(other.last_group),
+    slot_assigned(other.slot_assigned)
+  {
+    if (slot_assigned) slot_ = other.slot_;
+  }
+  named_slot_map_iterator& operator=(const named_slot_map_iterator& other) 
+  {
+    slot_assigned = other.slot_assigned;
+    group = other.group;
+    last_group = other.last_group;
+    if (slot_assigned) slot_ = other.slot_;
+    return *this;
+  }
+  connection_slot_pair& dereference() const 
+  {
+    return *slot_;
+  }
+  void increment() 
+  {
+    ++slot_;
+    if (slot_ == group->second.end()) {
+      ++group;
+      init_next_group();
+    }
+  }
+  bool equal(const named_slot_map_iterator& other) const {
+    return (group == other.group
+           && (group == last_group
+               || slot_ == other.slot_));
+  }
 
 #if BOOST_WORKAROUND(_MSC_VER, <= 1400)
   void decrement();


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe