Public Member Functions | Static Public Attributes

Koo::Model::Field::FieldFactory Class Reference

The FieldFactory class provides a means of creating the appropiate object to handle a given field type. More...

List of all members.

Public Member Functions

def create
 This function creates a new instance of the appropiate class for the given field type.

Static Public Attributes

dictionary types
 The types property holds the class that will be called whenever a new object has to be created for a given field type.

Detailed Description

The FieldFactory class provides a means of creating the appropiate object to handle a given field type.

By default some classes exist for many file types but if you create new types or want to replace current implementations you can do it too.

Definition at line 417 of file Field.py.


Member Function Documentation

def Koo::Model::Field::FieldFactory::create (   type,
  parent,
  attributes 
)

This function creates a new instance of the appropiate class for the given field type.

Definition at line 441 of file Field.py.


Member Data Documentation

Initial value:
{
                'char' : StringField,
                'binary' : BinaryField,
                'binary-size': BinarySizeField,
                'image' : BinaryField,
                'float_time': FloatField,
                'integer' : IntegerField,
                'float' : FloatField,
                'many2one' : ManyToOneField,
                'many2many' : ManyToManyField,
                'one2many' : OneToManyField,
                'reference' : ReferenceField,
                'selection': SelectionField,
                'boolean': IntegerField,
        }

The types property holds the class that will be called whenever a new object has to be created for a given field type.

By default there's a number of field types but new ones can be easily created or existing ones replaced.

Definition at line 422 of file Field.py.


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