gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog libbase/ref_counted.h server/re...


From: Markus Gothe
Subject: [Gnash-commit] gnash ChangeLog libbase/ref_counted.h server/re...
Date: Fri, 06 Oct 2006 21:48:23 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Markus Gothe <nihilus>  06/10/06 21:48:23

Modified files:
        .              : ChangeLog 
Added files:
        libbase        : ref_counted.h 
Removed files:
        server         : ref_counted.h 

Log message:
        Moved file.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1053&r2=1.1054
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/ref_counted.h?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/ref_counted.h?cvsroot=gnash&r1=1.7&r2=0

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1053
retrieving revision 1.1054
diff -u -b -r1.1053 -r1.1054
--- ChangeLog   6 Oct 2006 21:47:04 -0000       1.1053
+++ ChangeLog   6 Oct 2006 21:48:23 -0000       1.1054
@@ -10,6 +10,7 @@
 
 2006-10-06 Markus Gothe <address@hidden>
 
+       * server/ref_counted, libbase/ref_counted.h: Moved file.
        * server/impl.cpp, server/ref_counted.h: Moved code to ref_counted.h
 
 2006-10-06 Bastiaan Jacques <address@hidden>

Index: libbase/ref_counted.h
===================================================================
RCS file: libbase/ref_counted.h
diff -N libbase/ref_counted.h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ libbase/ref_counted.h       6 Oct 2006 21:48:23 -0000       1.1
@@ -0,0 +1,110 @@
+// 
+//   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+// 
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+// Linking Gnash statically or dynamically with other modules is making a
+// combined work based on Gnash. Thus, the terms and conditions of the GNU
+// General Public License cover the whole combination.
+//
+// As a special exception, the copyright holders of Gnash give you
+// permission to combine Gnash with free software programs or libraries
+// that are released under the GNU LGPL and with code included in any
+// release of Talkback distributed by the Mozilla Foundation. You may
+// copy and distribute such a system following the terms of the GNU GPL
+// for all but the LGPL-covered parts and Talkback, and following the
+// LGPL for the LGPL-covered parts.
+//
+// Note that people who make modified versions of Gnash are not obligated
+// to grant this special exception for their modified versions; it is their
+// choice whether to do so. The GNU General Public License gives permission
+// to release a modified version without this exception; this exception
+// also makes it possible to release a modified version which carries
+// forward this exception.
+// 
+//
+
+/* $Id: ref_counted.h,v 1.1 2006/10/06 21:48:23 nihilus Exp $ */
+
+#ifndef GNASH_REF_COUNTED_H
+#define GNASH_REF_COUNTED_H
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "container.h"
+#include "smart_ptr.h"
+
+namespace gnash {
+
+/// \brief
+/// For stuff that's tricky to keep track of w/r/t ownership & cleanup.
+/// The only use for this class seems to be for putting derived
+/// classes in smart_ptr
+/// TODO: remove use of this base class in favor of using
+/// boost::shared_ptr<> ???? boost::intrusive_ptr(?)
+///
+
+class DSOEXPORT ref_counted
+{
+private:
+       mutable int             m_ref_count;
+       mutable weak_proxy*     m_weak_proxy;
+public:
+       ref_counted()
+       :
+       m_ref_count(0),
+       m_weak_proxy(0)
+       {
+       }
+       virtual ~ref_counted()
+       {
+       assert(m_ref_count == 0);
+       if (m_weak_proxy){
+               m_weak_proxy->notify_object_died();
+               m_weak_proxy->drop_ref();
+               }
+       }
+       void    add_ref() const {
+       assert(m_ref_count >= 0);
+       m_ref_count++;
+       }
+       void    drop_ref() const {
+       assert(m_ref_count > 0);
+       m_ref_count--;
+       if (m_ref_count <= 0){
+               // Delete me!
+               delete this;
+               }
+       }
+
+       int     get_ref_count() const { return m_ref_count; }
+       weak_proxy*     get_weak_proxy() const {
+       
+       assert(m_ref_count > 0);        // By rights, somebody should be 
holding a ref to us.
+       if (m_weak_proxy == NULL)       // Host calls this to register a 
function for progress bar handling
+                                       // during loading movies.
+
+               {
+               m_weak_proxy = new weak_proxy;
+               m_weak_proxy->add_ref();
+               }
+       return m_weak_proxy;
+       }
+};
+
+} // namespace gnash
+
+#endif // GNASH_REF_COUNTED_H

Index: server/ref_counted.h
===================================================================
RCS file: server/ref_counted.h
diff -N server/ref_counted.h
--- server/ref_counted.h        6 Oct 2006 21:20:05 -0000       1.7
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,110 +0,0 @@
-// 
-//   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
-// 
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-// 
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-// Linking Gnash statically or dynamically with other modules is making a
-// combined work based on Gnash. Thus, the terms and conditions of the GNU
-// General Public License cover the whole combination.
-//
-// As a special exception, the copyright holders of Gnash give you
-// permission to combine Gnash with free software programs or libraries
-// that are released under the GNU LGPL and with code included in any
-// release of Talkback distributed by the Mozilla Foundation. You may
-// copy and distribute such a system following the terms of the GNU GPL
-// for all but the LGPL-covered parts and Talkback, and following the
-// LGPL for the LGPL-covered parts.
-//
-// Note that people who make modified versions of Gnash are not obligated
-// to grant this special exception for their modified versions; it is their
-// choice whether to do so. The GNU General Public License gives permission
-// to release a modified version without this exception; this exception
-// also makes it possible to release a modified version which carries
-// forward this exception.
-// 
-//
-
-/* $Id: ref_counted.h,v 1.7 2006/10/06 21:20:05 nihilus Exp $ */
-
-#ifndef GNASH_REF_COUNTED_H
-#define GNASH_REF_COUNTED_H
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "container.h"
-#include "smart_ptr.h"
-
-namespace gnash {
-
-/// \brief
-/// For stuff that's tricky to keep track of w/r/t ownership & cleanup.
-/// The only use for this class seems to be for putting derived
-/// classes in smart_ptr
-/// TODO: remove use of this base class in favor of using
-/// boost::shared_ptr<> ???? boost::intrusive_ptr(?)
-///
-
-class DSOEXPORT ref_counted
-{
-private:
-       mutable int             m_ref_count;
-       mutable weak_proxy*     m_weak_proxy;
-public:
-       ref_counted()
-       :
-       m_ref_count(0),
-       m_weak_proxy(0)
-       {
-       }
-       virtual ~ref_counted()
-       {
-       assert(m_ref_count == 0);
-       if (m_weak_proxy){
-               m_weak_proxy->notify_object_died();
-               m_weak_proxy->drop_ref();
-               }
-       }
-       void    add_ref() const {
-       assert(m_ref_count >= 0);
-       m_ref_count++;
-       }
-       void    drop_ref() const {
-       assert(m_ref_count > 0);
-       m_ref_count--;
-       if (m_ref_count <= 0){
-               // Delete me!
-               delete this;
-               }
-       }
-
-       int     get_ref_count() const { return m_ref_count; }
-       weak_proxy*     get_weak_proxy() const {
-       
-       assert(m_ref_count > 0);        // By rights, somebody should be 
holding a ref to us.
-       if (m_weak_proxy == NULL)       // Host calls this to register a 
function for progress bar handling
-                                       // during loading movies.
-
-               {
-               m_weak_proxy = new weak_proxy;
-               m_weak_proxy->add_ref();
-               }
-       return m_weak_proxy;
-       }
-};
-
-} // namespace gnash
-
-#endif // GNASH_REF_COUNTED_H




reply via email to

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