[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/appserver/src/objrepos geasClassDefs.py
From: |
Reinhard Mueller |
Subject: |
gnue/appserver/src/objrepos geasClassDefs.py |
Date: |
Tue, 21 May 2002 16:07:36 -0400 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Reinhard Mueller <address@hidden> 02/05/21 16:07:36
Modified files:
appserver/src/objrepos: geasClassDefs.py
Log message:
Removed GStoredObjectDefinition in favour of init methods.
Cleared relationship of GFieldDefinition and GTypeDefinition.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/appserver/src/objrepos/geasClassDefs.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: gnue/appserver/src/objrepos/geasClassDefs.py
diff -c gnue/appserver/src/objrepos/geasClassDefs.py:1.1
gnue/appserver/src/objrepos/geasClassDefs.py:1.2
*** gnue/appserver/src/objrepos/geasClassDefs.py:1.1 Tue May 14 11:26:22 2002
--- gnue/appserver/src/objrepos/geasClassDefs.py Tue May 21 16:07:36 2002
***************
*** 50,123 ****
self.registeredMethods = [] # store registration definitons here
! # TODO:
! # allow the __init__ method to be called with an parameter that is
! # an object containing a (stored) object definition
! #
! # Initialization has to take place in the following lines.
# TODO: some more methods. please add ideas
# -
# -
# -
- #####################################################
- # Classes for stored object definition
- #####################################################
- class GStoredObjectDefinition:
- def __init__(self):
- pass
-
- def build(self,obj_def):
- pass
-
-
-
- class GXMLObjectDefinition(GStoredObjectDefinition):
- def __init__(self, file, xmlstring): # allow instantiation using either
filename or string containing XML
- # this function should be called with keyword arguments
- if file <> None:
- fileHandle = openResource(file)
- self.xmlstring = read fileHandle()
- elseif xmlstring <> None:
- self.xmlstring = string
- else:
- pass # assign some more or less useful default value here, or
throw an exception
-
- # do some checking whether the XML is valid
-
- def build(self, obj_def):
- # called by ObjectDef.__init__. Initialize the ObjectDef with our data
- pass
-
- class GGCDObjectDefinition(GStoredObjectDefinition):
- def __init__(self, file, gcdstring): # allow instantiation using either
filename or string containing GCD
- # this function should be called with keyword arguments
- if file <> None:
- fileHandle = openResource(file)
- self.gcd = read fileHandle()
- elseif gcdstring <> None:
- self.gcdstring = string
- else:
- pass # assign some more or less useful default value here, or
throw an exception
! # do some checking whether the GCD is valid
!
! def build(self, obj_def):
! # called by ObjectDef.__init__. Initialize the ObjectDef with our data
! pass
!
! class GDBObjectDefinition(GStoredObjectDefinition):
! def __init__(self,dbhandle):
! self.dbhandle = dbhandle
!
! def build(self, obj_def):
! # called by ObjectDef.__init__. Initialize the ObjectDef with our data
! pass
!
!
! # TODO: rewrite - GFieldDefinition inherited by GBaseTypeFieldDef etc.
class GFieldDefinition:
def __init__(self,name,type,length):
--- 50,67 ----
self.registeredMethods = [] # store registration definitons here
!
# TODO: some more methods. please add ideas
# -
# -
# -
+ # Add init methods to initialize from XML and Database. Help for XML is
appreciated.
+ # Probably we should use the methods provided in common.
! # GFieldDefinition is the definition of an specific field in an object.
class GFieldDefinition:
def __init__(self,name,type,length):
***************
*** 127,160 ****
self.type=type
self.length=length
class GTypeDefinition:
def __init__(self):
pass
- # ...TypeDefinition refers to the actual usage of a type
- # ...Type would mean that type itself
- # This is necessary because current GCD syntax allows
class GBaseTypeDefinition:
def __init__(self):
pass
! GCompoundTypeDefinition:
def __init__(self):
pass
! GPointerTypeDefinition:
def __init__(self):
pass
# TODO: specify interfaces of the above classes
# clear how lists should be implemented
- #
- #
- ####################################################
-
- ###################################################
- #
-
-
--- 71,96 ----
self.type=type
self.length=length
+ # GTypeDefinition is the definition of an abstract type.
+ # Types are the basis for field definitions.
+
class GTypeDefinition:
def __init__(self):
pass
class GBaseTypeDefinition:
def __init__(self):
pass
! class GCompoundTypeDefinition:
def __init__(self):
pass
! class GPointerTypeDefinition:
def __init__(self):
pass
# TODO: specify interfaces of the above classes
# clear how lists should be implemented
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/appserver/src/objrepos geasClassDefs.py,
Reinhard Mueller <=