Package turbogears :: Module genericfunctions :: Class MultiorderGenericFunction

Class MultiorderGenericFunction

source code

                object --+                
                         |                
         ??.BaseDispatcher --+            
                             |            
 dispatch.functions.Dispatcher --+        
                                 |        
dispatch.functions.AbstractGeneric --+    
                                     |    
    dispatch.functions.GenericFunction --+
                                         |
                                        MultiorderGenericFunction

Generic function allowing a priori method ordering.

Instance Methods
 
__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.Dispatcher: __setitem__, clear, criterionChanged, getExpressionId, parse, parseRule

Inherited from unreachable.BaseDispatcher: __getitem__, __new__

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

Class Variables

Inherited from dispatch.functions.AbstractGeneric: __get__, delegate

Properties

Inherited from object: __class__

Method Details

__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