gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog libgeometry/snappingrange.h


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog libgeometry/snappingrange.h
Date: Mon, 05 Mar 2007 12:28:23 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/03/05 12:28:22

Modified files:
        .              : ChangeLog 
        libgeometry    : snappingrange.h 

Log message:
        * libgeometry/snappingrange.h: add visit() templated function.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2536&r2=1.2537
http://cvs.savannah.gnu.org/viewcvs/gnash/libgeometry/snappingrange.h?cvsroot=gnash&r1=1.9&r2=1.10

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2536
retrieving revision 1.2537
diff -u -b -r1.2536 -r1.2537
--- ChangeLog   5 Mar 2007 10:36:12 -0000       1.2536
+++ ChangeLog   5 Mar 2007 12:28:22 -0000       1.2537
@@ -1,5 +1,6 @@
 2007-03-05 Sandro Santilli <address@hidden>
 
+       * libgeometry/snappingrange.h: add visit() templated function.
        * server/parser/movie_def_impl.h, server/parser/movie_definition.h:
          Document movie_definition::get_bytes_total().
        * testsuite/misc-ming.all/Makefile.am: enable run

Index: libgeometry/snappingrange.h
===================================================================
RCS file: /sources/gnash/gnash/libgeometry/snappingrange.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- libgeometry/snappingrange.h 2 Mar 2007 15:30:04 -0000       1.9
+++ libgeometry/snappingrange.h 5 Mar 2007 12:28:22 -0000       1.10
@@ -15,7 +15,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 // 
-// $Id: snappingrange.h,v 1.9 2007/03/02 15:30:04 udog Exp $
+// $Id: snappingrange.h,v 1.10 2007/03/05 12:28:22 strk Exp $
 
 #ifndef GNASH_SNAPPINGRANGE_H
 #define GNASH_SNAPPINGRANGE_H
@@ -280,10 +280,27 @@
        
        /// Visit the current Ranges set
        //
-       /// Visitor instance will be invoked
+       /// Visitor functor will be invoked
        /// for each RangeType in the current set.
        ///
-       //template <class V> void visit(V& v) const;
+       /// The visitor functor will 
+       /// receive a RangeType reference; must return true if
+       /// it wants next item or false to exit the loop.
+       ///
+       template <class V>
+       inline void visit(V& v) const
+       {
+               for (typename RangeList::const_iterator
+                       it = _ranges.begin(), itEnd = _ranges.end();
+                       it != itEnd;
+                       ++it)
+               {
+                       if ( ! visitor(*it) )
+                       {
+                               break;
+                       }
+               }
+       }
        
 private:
 
@@ -295,8 +312,7 @@
        // The current Ranges list
        RangeList _ranges;
        
-}; //class SnappingRange
-
+}; //class SnappingRanges2d
 
 /// Standard snapping 2d ranges type for invalidated bounds calculation  
 typedef SnappingRanges2d<float> InvalidatedRanges;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]