gnash-commit
[Top][All Lists]
Advanced

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

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


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/as_object.h
Date: Tue, 18 Dec 2007 23:55:50 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/12/18 23:55:50

Modified files:
        .              : ChangeLog 
        server         : as_object.h 

Log message:
        add a visitProperties templated method.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5211&r2=1.5212
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_object.h?cvsroot=gnash&r1=1.86&r2=1.87

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5211
retrieving revision 1.5212
diff -u -b -r1.5211 -r1.5212
--- ChangeLog   18 Dec 2007 23:39:58 -0000      1.5211
+++ ChangeLog   18 Dec 2007 23:55:49 -0000      1.5212
@@ -1,5 +1,6 @@
 2007-12-18 Sandro Santilli <address@hidden>
 
+       * server/as_object.h: add a visitProperties templated method.
        * server/edit_text_character.{cpp,h}: allow TextField.variable
          to point to a normal object, not fully correct yet but a minimal
          step forward.

Index: server/as_object.h
===================================================================
RCS file: /sources/gnash/gnash/server/as_object.h,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -b -r1.86 -r1.87
--- server/as_object.h  1 Dec 2007 00:14:59 -0000       1.86
+++ server/as_object.h  18 Dec 2007 23:55:50 -0000      1.87
@@ -721,6 +721,25 @@
        ///
        void enumerateProperties(std::map<std::string, std::string>& to);
 
+       /// Visit the list of properties 
+       //
+       /// The method will invoke the given visitor method
+       /// passing it two arguments: key of the property and
+       /// value of it.
+       ///
+       /// @param visitor
+       ///     The visitor function. Will be invoked for each property
+       ///     of this object with a string_table::key
+       ///     reference as first argument and a const as_value reference
+       ///     as second argument.
+       ///
+       template <class V>
+       void visitProperties(V& visitor) const
+       {
+               _members.visitValues(visitor, *this);
+       }
+
+
        /// \brief
        /// Add a getter/setter property, if no member already has
        /// that name (or should we allow override ? TODO: check this)




reply via email to

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