commit-gnue
[Top][All Lists]
Advanced

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

[gnue] r8447 - trunk/gnue-designer/src/app


From: jcater
Subject: [gnue] r8447 - trunk/gnue-designer/src/app
Date: Tue, 25 Apr 2006 00:17:50 -0500 (CDT)

Author: jcater
Date: 2006-04-25 00:17:50 -0500 (Tue, 25 Apr 2006)
New Revision: 8447

Added:
   trunk/gnue-designer/src/app/objectext.py
Log:
Added a GObjectExtender class that uses Python's __bases__ attribute to extende 
gnue.common.definitions.GObject at runtime to add our own methods. 



Added: trunk/gnue-designer/src/app/objectext.py
===================================================================
--- trunk/gnue-designer/src/app/objectext.py    2006-04-21 14:52:20 UTC (rev 
8446)
+++ trunk/gnue-designer/src/app/objectext.py    2006-04-25 05:17:50 UTC (rev 
8447)
@@ -0,0 +1,47 @@
+# GNU Enterprise Designer - GNUe Common Runtime Extensions
+#
+# Copyright 2001-2006 Free Software Foundation
+#
+# This file is part of GNU Enterprise
+#
+# GNU Enterprise 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, or (at your option) any later version.
+#
+# GNU Enterprise 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 program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# $Id$
+
+"""
+Extensions to GNUe Common's GObjects
+"""
+
+__all__ = ['GObj', 'GUndividedCollection']
+
+from gnue.common.definitions.GObjects import GObj
+
+class GObjectExtender(object):
+    """
+    Our extensions to the gnue.common.definitions.GObjects class
+    """
+    pass
+
+
+def install:
+    """
+    Modify GObj to use our class as a base
+    """
+    if GObjectExtender not in GObj.__bases__:
+        GObj.__bases__ = (GObjectExtender,) + GObj.__bases__
+
+
+


Property changes on: trunk/gnue-designer/src/app/objectext.py
___________________________________________________________________
Name: svn:keywords
   + Id





reply via email to

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