Package svnmailer :: Package settings :: Module _typedstruct :: Class Member
[show private | hide private]
[frames | no frames]

Class Member

object --+
         |
        Member

Known Subclasses:
BaseMember

Base class for members descriptors
Method Summary
  __init__(self, mapper, arg, param)
Initialization
  init(self)
Custom initialization
any postmap(self, value)
Postmapper - passes through by default
any premap(self, value)
Premapper - passes through by default
any substitute(self, value, subst)
Substituter - passes through by default
any transform(self, value)
Transformer - passes through by default
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name...
  __getattribute__(...)
x.__getattribute__('name') <==> x.name...
  __hash__(x)
x.__hash__() <==> hash(x)...
  __reduce__(...)
helper for pickle...
  __reduce_ex__(...)
helper for pickle...
  __repr__(x)
x.__repr__() <==> repr(x)...
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value...
  __str__(x)
x.__str__() <==> str(x)...
    Inherited from type
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T...

Instance Variable Summary
any arg: The custom initialization argument
Struct instance: The owner instance
callable mapper: The associated mapper function (or None)
any param: The descriptor parameter

Method Details

__init__(self, mapper, arg, param)
(Constructor)

Initialization
Parameters:
mapper - The associated mapper function (or None)
           (type=callable)
arg - The custom initialization argument
           (type=any)
param - The descriptor parameter
           (type=any)
Overrides:
__builtin__.object.__init__

init(self)

Custom initialization

postmap(self, value)

Postmapper - passes through by default

The postmapper is called before the value is finally returned to the caller (after being substituted).

Parameters:
value - The value to postmap
           (type=any)
Returns:
The postmapped value
           (type=any)

Note: The postmapper is not called if no mapper function is defined (or it is None).

premap(self, value)

Premapper - passes through by default

The premapper is called if the value is set before doing anything else.

Parameters:
value - The value to premap
           (type=any)
Returns:
The premapped value
           (type=any)

Note: It is not called if no mapper function is defined (or it is None).

substitute(self, value, subst)

Substituter - passes through by default

Use this method to do any dynamic processing on the retrieved value before it's being postmapped.

Parameters:
value - The value to substitute
           (type=any)
subst - The substitution record
           (type=dict)
Returns:
The substituted value
           (type=any)

transform(self, value)

Transformer - passes through by default

Override this method in order to do any value transformation, e.g. compile the input string as regex or split it into a list.

The transform method is called with the value returned from the premap method. The result is stored as final member value.

Parameters:
value - The value to tranform
           (type=any)
Returns:
The transformed value
           (type=any)

Instance Variable Details

arg

The custom initialization argument
Type:
any

instance

The owner instance
Type:
Struct

mapper

The associated mapper function (or None)
Type:
callable

param

The descriptor parameter
Type:
any

Generated by Epydoc 2.0 on Sun Sep 25 20:49:12 2005 http://epydoc.sf.net