Package yagdoc :: Module sectionizer :: Class Sectionizer
[show private | hide private]
[frames | no frames]

Type Sectionizer

object --+
         |
        Sectionizer


Set of rules for sorting symbols into sections.
Method Summary
  __init__(self)
  append_rule(self, rule)
  append_type_gobbles_file(self, gtype, filename)
Append a type-gobbles-file rule.
str or None get_section(self, filename, symbol)
Gets the section of a symbol.
  prepend_rule(self, rule)
  _insert_class_rule(self, prefix, body, mixed, filename, section, pos)
  _insert_rule(self, rule, pos)
Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__
Inherited from SRE_Pattern: _class_rule, _rule

Method Details

append_type_gobbles_file(self, gtype, filename)

Append a type-gobbles-file rule.

The rule puts all declarations that occur in given file to a section named gtype.name. Usually filename is the file where gtype's get-type function is declared.
Parameters:
gtype - Type determining the section name.
           (type=inspector.Type)
filename - Rule file name pattern (normally just a file name).
           (type=str)

get_section(self, filename, symbol)

Gets the section of a symbol.

Rules are matched in order, the first that matches determines the section.
Parameters:
filename - File name the symbol comes from (without extension).
           (type=str)
symbol - Symbol name.
           (type=str)
Returns:
Section name the symbol should be placed into, None if no rule matched.
           (type=str or None)

Generated by Epydoc 2.1 on Fri Oct 5 00:36:53 2007 http://epydoc.sf.net