Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
Archetypes.VariableSchemaSupport.VarClassGen Class Reference
Inheritance diagram for Archetypes.VariableSchemaSupport.VarClassGen:
Inheritance graph
[legend]
Collaboration diagram for Archetypes.VariableSchemaSupport.VarClassGen:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def updateMethods

Public Attributes

 schema

Detailed Description

A version of ClassGen that is able to generate a class' methods based on 
an explicitly given schema.

Definition at line 12 of file VariableSchemaSupport.py.


Constructor & Destructor Documentation

Definition at line 17 of file VariableSchemaSupport.py.

00017 
00018     def __init__(self, schema):
00019         self.schema = schema


Member Function Documentation

Update the methods of the klass to support a new schema.

This will re-generate methods.

Definition at line 20 of file VariableSchemaSupport.py.

00020 
00021     def updateMethods(self, klass):
00022         """Update the methods of the klass to support a new schema.
00023         
00024         This will re-generate methods.
00025         """
00026         self.generateMethods(klass, self.schema.fields())
00027 
00028 #
00029 # Instance-specific schemas. Note that Archeypes.Schema.compsition, which
00030 # is used in BaseObject, allows schemas to be composed dynamically on a per-
00031 # class basis, and is much more efficient and flexible (except that it cannot
00032 # do different schemas per-*instance*)
00033 #
00034 
00035 schemadict={}

Here is the call graph for this function:


Member Data Documentation

Definition at line 18 of file VariableSchemaSupport.py.


The documentation for this class was generated from the following file: