Package gavo :: Package rsc :: Module common :: Class ParamMixin
[frames] | no frames]

Class ParamMixin

source code

object --+
         |
        ParamMixin
Known Subclasses:

A mixin providing param processing.

This is for tables and data elements. If you mix this in, you have to call _initParams(rscdefObject, params=None)

rscdefObject is a TableDef or DataDef, params, if given, a dictionary mapping param names to param values.

Instance Methods
 
setParams(self, parDict, raiseOnBadKeys=True) source code
 
setParam(self, parName, value)
sets a parameter to a value.
source code
 
getParam(self, parName, default=<Not given/empty>)
retrieves a parameter (python) value.
source code
 
getParamByName(self, parName) source code
 
getParamByUtype(self, utype) source code
 
iterParams(self)
iterates over the parameters for this table.
source code
 
getParamDict(self) source code

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

Properties

Inherited from object: __class__

Method Details

setParam(self, parName, value)

source code 

sets a parameter to a value.

String-typed values will be parsed, everything else is just entered directly. Trying to write to non-existing params will raise a NotFoundError.

Do not write to params directly, you'll break things.

iterParams(self)

source code 

iterates over the parameters for this table.

The items returned are rscdef.Param instances.