Package pyxb :: Package binding :: Module basis :: Class _DynamicCreate_mixin |
[hide private]
[frames] | no frames]

# type _DynamicCreate_mixin

source code

    object --+
             |
       cscRoot --+
                 |
                _DynamicCreate_mixin

Known Subclasses:
  - simpleTypeDefinition
  - , complexTypeDefinition
  - , element

Helper to allow overriding the implementation class.

Generally we'll want to augment the generated bindings by subclassing them, and adding functionality to the subclass. This mix-in provides a way to communicate the existence of the superseding subclass back to the binding infrastructure, so that when it creates an instance it uses the subclass rather than the unaugmented binding class.

When a raw generated binding is subclassed, _SetSupersedingClass should be invoked on the raw class passing in the superseding subclass. E.g.:

     class mywsdl (raw.wsdl):
       pass
     raw.wsdl._SetSupersedingClass(mywsdl)

Instance Methods | [hide private]
Inherited from `cscRoot`: `__init__`

Class Methods | [hide private]
__SupersedingClassAttribute(cls) | source code
__AlternativeConstructorAttribute(cls) | source code
_SupersedingClass(cls) Return the class stored in the class reference attribute. | source code
_AlternativeConstructor(cls) Return the class stored in the class reference attribute. | source code
_SetSupersedingClass(cls, superseding) Set the class reference attribute. | source code
_SetAlternativeConstructor(cls, alternative_constructor) | source code
_DynamicCreate(cls, *args, **kw) Invoke the constructor for this class or the one that supersedes it. | source code
_DynamicCreate_mixin__AlternativeConstructorAttribute(cls) | source code
_DynamicCreate_mixin__SupersedingClassAttribute(cls) | source code

Method Details | [hide private]

### _SetSupersedingClass(cls, superseding) Class Method | source code
Set the class reference attribute. Parameters: `superseding` - A Python class that is a subclass of this class.