gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/PropertyList.h


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/PropertyList.h
Date: Tue, 23 Jan 2007 11:26:49 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/01/23 11:26:49

Modified files:
        .              : ChangeLog 
        server         : PropertyList.h 

Log message:
        * server/PropertyList.h: add visitValues() templated function.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2151&r2=1.2152
http://cvs.savannah.gnu.org/viewcvs/gnash/server/PropertyList.h?cvsroot=gnash&r1=1.9&r2=1.10

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2151
retrieving revision 1.2152
diff -u -b -r1.2151 -r1.2152
--- ChangeLog   22 Jan 2007 22:12:18 -0000      1.2151
+++ ChangeLog   23 Jan 2007 11:26:49 -0000      1.2152
@@ -1,3 +1,14 @@
+2007-01-23 Sandro Santilli <address@hidden>
+
+       * server/PropertyList.h: add visitValues() templated function.
+       * server/sprite_instance.cpp (sprite_attach_movie):
+         Copy properties from initialization object *after*
+         placement to ensure matrix is properly updated.
+       * testsuite/misc-ming.all/: attachMovieTest.c,
+         attachMovieTestRunner.cpp:
+         Made dejagnu-enabled, test for actual position
+         of attached movieclips.
+
 2007-01-22 Sandro Santilli <address@hidden>
 
        * testsuite/actionscript.all/Inheritance.as: add a new test triggering

Index: server/PropertyList.h
===================================================================
RCS file: /sources/gnash/gnash/server/PropertyList.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- server/PropertyList.h       10 Dec 2006 18:39:22 -0000      1.9
+++ server/PropertyList.h       23 Jan 2007 11:26:49 -0000      1.10
@@ -24,6 +24,9 @@
 #include "config.h"
 #endif
 
+#include "Property.h" // for templated functions
+#include "as_value.h" // for templated functions
+
 #include <map> 
 #include <string> // for use within map 
 #include <cassert> // for inlines
@@ -35,8 +38,8 @@
        class as_object;
        class as_environment;
        class as_function;
-       class as_value;
-       class Property;
+       //class as_value;
+       //class Property;
 }
 
 namespace gnash {
@@ -102,6 +105,34 @@
        /// Delete all Property objects in the container
        ~PropertyList();
 
+       /// Visit the list of properties 
+       //
+       /// The method will invoke the given visitor method
+       /// passing it two arguments: name of the property and
+       /// value of it.
+       ///
+       /// @param visitor
+       ///     The visitor function. Must take a const std::string
+       ///     reference as first argument and a const as_value reference
+       ///     as second argument.
+       ///
+       /// @param this_ptr
+       ///     The object reference used to extract values from properties.
+       ///
+       template <class V>
+       void visitValues(V& visitor, as_object& this_ptr) const
+       {
+               for (const_iterator it = begin(), itEnd = end();
+                               it != itEnd; ++it)
+               {
+                       const std::string& name = it->first;
+                       const Property* prop = it->second;
+                       as_value val = prop->getValue(this_ptr);
+
+                       visitor(name, val);
+               }
+       }
+
        /// Get the as_value value of a named property
        //
        /// If the named property is a getter/setter one it's getter




reply via email to

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