Package turbogears :: Module genericfunctions :: Class MultiorderGenericFunction
[hide private]

Class MultiorderGenericFunction

source code


Generic function allowing a priori method ordering.

Instance Methods [hide private]
 
__init__(self, func)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
when(self, cond, order=0)
Add following function to this GF, w/'cond' as a guard
source code
 
around(self, cond, order=0)
Add function as an "around" method w/'cond' as a guard
source code
 
combine(self, cases) source code

Inherited from dispatch.functions.GenericFunction: after, before

Inherited from dispatch.functions.AbstractGeneric: __call__, addMethod

Inherited from dispatch.functions.AbstractGeneric (private): _decorate

Inherited from dispatch.functions.Dispatcher: __setitem__, clear, criterionChanged, getExpressionId, parse, parseRule

Inherited from dispatch.functions.Dispatcher (private): _addCase, _addConstraints, _best_split, _build_dispatcher, _clear, _dispatch_id, _rebuild_indexes, _setupArgs, _startNode

Inherited from unreachable.BaseDispatcher: __getitem__, __new__

Inherited from object: __delattr__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]

Inherited from dispatch.functions.AbstractGeneric: __get__, delegate

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, func)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

when(self, cond, order=0)

source code 

Add following function to this GF, w/'cond' as a guard

If 'cond' is parseable, it will be parsed using the caller's frame locals and globals.

Overrides: dispatch.functions.GenericFunction.when
(inherited documentation)

around(self, cond, order=0)

source code 

Add function as an "around" method w/'cond' as a guard

If 'cond' is parseable, it will be parsed using the caller's frame locals and globals.

Overrides: dispatch.functions.GenericFunction.around
(inherited documentation)

combine(self, cases)

source code 
Overrides: dispatch.functions.Dispatcher.combine