Package svnmailer :: Module struct_accessors :: Class BaseDescriptor
[hide private]

Class BaseDescriptor

source code

                  object --+    
                           |    
typedstruct.MemberDescriptor --+
                               |
                              BaseDescriptor
Known Subclasses:

Base class for svnmailer descriptors

Instance Methods [hide private]
 
__init__(self, name, private, param=None)
Initialization
source code
any
transform(self, value, arg)
Transform if value is not None
source code
any
substitute(self, value, subst, arg)
Substitute the value if it's activated
source code
 
premap(self, value, mapper, arg)
Premap the value if it's activated
source code
 
postmap(self, value, mapper, arg)
Postmap the value if it's activated
source code
 
getCharset(self, arg)
Returns the charset
source code
 
getFileCharset(self, arg)
Returns the file system charset
source code
 
doPremap(self, value, mapper, arg)
abstract method
source code
any
doTransform(self, value, arg)
abstract method
source code
any
doSubstitute(self, value, subst, arg)
abstract method
source code
 
doPostmap(self, value, mapper, arg)
abstract method
source code

Inherited from typedstruct.MemberDescriptor: __delete__, __get__, __set__

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

Instance Variables [hide private]

Inherited from typedstruct.MemberDescriptor: name, param

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, private, param=None)
(Constructor)

source code 

Initialization

Overrides: object.__init__

transform(self, value, arg)

source code 

Transform if value is not None

Parameters:
  • value - The value to tranform
  • arg - The argument used for struct initialization
Returns: any
The transformed value
Overrides: typedstruct.MemberDescriptor.transform

substitute(self, value, subst, arg)

source code 

Substitute the value if it's activated

Parameters:
  • value - The value to substitute
  • subst - The substitution dictionary
  • arg - The argument used for struct initialization
Returns: any
The substituted value
Overrides: typedstruct.MemberDescriptor.substitute

premap(self, value, mapper, arg)

source code 

Premap the value if it's activated

Parameters:
  • value - The value to premap
  • mapper - The mapping argument
  • arg - The argument used for struct initialization
Overrides: typedstruct.MemberDescriptor.premap

postmap(self, value, mapper, arg)

source code 

Postmap the value if it's activated

Parameters:
  • value - The value to postmap
  • mapper - The mapping argument
  • arg - The argument used for struct initialization
Overrides: typedstruct.MemberDescriptor.postmap

doPremap(self, value, mapper, arg)

source code 

abstract method

Parameters:
  • value (any) - The value to premap
  • mapper (function) - The mapper function
  • arg (any) - The argument used for struct initialization

doTransform(self, value, arg)

source code 

abstract method

Parameters:
  • value (any) - The value to tranform
  • arg (any) - The argument used for struct initialization
Returns: any
The transformed value

doSubstitute(self, value, subst, arg)

source code 

abstract method

Parameters:
  • value (any) - The value to substitute
  • subst (dict) - The substitution dictionary
  • arg (any) - The argument used for struct initialization
Returns: any
The substituted value

doPostmap(self, value, mapper, arg)

source code 

abstract method

Parameters:
  • value (any) - The value to premap
  • mapper (function) - The mapper function
  • arg (any) - The argument used for struct initialization