Package gavo :: Package user :: Module docgen :: Class KnownMacros
[frames] | no frames]

Class KnownMacros

source code

object --+
         |
        KnownMacros

An accumulator for all macros known to the various DaCHS objects.

Note that macros with identical names are supposed to do essentially the same things. In particular, they must all have the same signature or the documentation will be wrong.

When macros share names, all but one implementation should have a docstring just saying "see <whatever>"; that way, the docstring actually chosen is deterministic.

Instance Methods
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
addMacro(self, name, macFunc, foundIn)
registers macFunc as expanding name in the element foundIn.
source code
 
getDocs(self)
returns RST lines describing all macros fed in in addMacro.
source code

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

Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

addMacro(self, name, macFunc, foundIn)

source code 

registers macFunc as expanding name in the element foundIn.

macFunc is the method, foundIn is the python class it's defined on.