Package mrv :: Package maya :: Module mdb :: Class MFnCodeGeneratorBase
[hide private]
[frames] | no frames]

Class MFnCodeGeneratorBase

source code

object --+
         |
        MFnCodeGeneratorBase

Define the interface and common utility methods to generate a string defining code for a given MFnMethod according to the meta data provided by an MMethodDescriptor.

Once instantiated, it can create any number of methods

Instance Methods [hide private]
 
__init__(self, module_dict)
Intialize this instance
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

    Utilities
 
_toRvalFunc(self, funcname)
Returns: None or a function which receives the return value of our actual mfn function
source code
    Interface
 
generateMFnClsMethodWrapper(self, source_method_name, target_method_name, mfn_fun_name, method_descriptor, flags=0)
Returns: string containing the code for the wrapper method as configured by the method descriptor
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, module_dict)
(Constructor)

source code 
Intialize this instance
Overrides: object.__init__

_toRvalFunc(self, funcname)

source code 
Returns:
None or a function which receives the return value of our actual mfn function

generateMFnClsMethodWrapper(self, source_method_name, target_method_name, mfn_fun_name, method_descriptor, flags=0)

source code 
Parameters:
  • source_method_name - Original name of the method - this is the name under which it was requested.
  • target_method_name - Name of the method in the returned code string
  • mfn_fun_name - original name of the MFn function
  • method_descriptor - instance of MMethodDescriptor
  • flags - bit flags providing additional information, depending on the actual implementation. Unsupported flags are ignored.
Returns:
string containing the code for the wrapper method as configured by the method descriptor