module Synopsis.Formatters.HTML.Part
class Part
Part-inheritance
Base class for formatting a Part of a Scope View. This class contains functionality for modularly formatting an ASG node and its children for display. It is typically used to construct Heading, Summary and Detail formatters. Strategy objects are added according to configuration, and this base class then checks which format methods each strategy implements. For each ASG declaration visited, the Part asks all Strategies which implement the appropriate format method to generate output for that declaration. The final writing of the formatted html is delegated to the write_section_start, write_section_end, and write_section_item methods, which must be implemented in a subclass.
Class attributes Summary:
source code
Methods Summary:
  register(self, view)
references
source code
  view(self)
references
source code
  filename(self)
references
source code
  os(self)
references
source code
  scope(self)
references
source code
  write(self, text)
references
source code
  type_ref(self)
references
source code
  type_label(self)
references
source code
  declarator(self)
references
source code
  parameter(self)
references
source code
  reference(self, name, label = None, * * keys)
references
source code
Returns a reference to the given name.
  label(self, name, label = None)
references
source code
Create a label for the given name.
  format_declaration(self, decl, method)
references
source code
Format decl using named method of each fragment.
  process(self, decl)
references
source code
Formats the given decl, creating the output for this Part of the view.
  visit_declaration(self, decl)
references
source code
  visit_macro(self, decl)
references
source code
  visit_forward(self, decl)
references
source code
  visit_group(self, decl)
references
source code
  visit_scope(self, decl)
references
source code
  visit_module(self, decl)
references
source code
  visit_meta_module(self, decl)
references
source code
  visit_class(self, decl)
references
source code
  visit_class_template(self, decl)
references
source code
  visit_typedef(self, decl)
references
source code
  visit_enum(self, decl)
references
source code
  visit_variable(self, decl)
references
source code
  visit_const(self, decl)
references
source code
  visit_function(self, decl)
references
source code
  visit_function_template(self, decl)
references
source code
  visit_operation(self, decl)
references
source code
  visit_operation_template(self, decl)
references
source code
  format_type(self, typeObj, id_holder = None)
references
source code
  visit_builtin_type_id(self, type)
references
source code
  visit_unknown_type_id(self, type)
references
source code
  visit_declared_type_id(self, type)
references
source code
  visit_dependent_type_id(self, type)
references
source code
  visit_modifier_type_id(self, type)
references
source code
references
source code
  visit_template_id(self, type)
references
source code
  visit_function_type_id(self, type)
references
source code
  write_start(self)
references
source code
  write_section_start(self, heading)
references
source code
  write_section_end(self, heading)
references
source code
  write_section_item(self, text)
references
source code
  write_end(self)
references
source code
Methods Details:
  reference(self, name, label = None, * * keys)
references
source code
Returns a reference to the given name. The name is a scoped name, and the optional label is an alternative name to use as the link text. The name is looked up in the TOC so the link may not be local. The optional keys are appended as attributes to the A tag.
  label(self, name, label = None)
references
source code
Create a label for the given name. The label is an anchor so it can be referenced by other links. The name of the label is derived by looking up the name in the TOC and using the link in the TOC entry. The optional label is an alternative name to use as the displayed name. If the name is not found in the TOC then the name is not anchored and just label is returned (or name if no label is given).
  format_declaration(self, decl, method)
references
source code
Format decl using named method of each fragment. Each fragment returns two strings - type and name. All the types are joined and all the names are joined separately. The consolidated type and name strings are then passed to write_section_item.
  process(self, decl)
references
source code
Formats the given decl, creating the output for this Part of the view. This method is implemented in various subclasses in different ways, for example Summary and Detail iterate through the children of 'decl' section by section, whereas Heading only formats decl itself.
  format_type(self, typeObj, id_holder = None)
references
source code
Returns a reference string for the given type object
  visit_builtin_type_id(self, type)
references
source code
Sets the label to be a reference to the type's name
  visit_unknown_type_id(self, type)
references
source code
Sets the label to be a reference to the type's link
  visit_declared_type_id(self, type)
references
source code
Sets the label to be a reference to the type's name
  visit_dependent_type_id(self, type)
references
source code
Sets the label to be the type's name (which has no proper scope)
  visit_modifier_type_id(self, type)
references
source code
Adds modifiers to the formatted label of the modifier's alias
references
source code
Adds the parameters to the template name in angle brackets
  visit_template_id(self, type)
references
source code
Labs the template with the parameters
  visit_function_type_id(self, type)
references
source code
Labels the function type with return type, name and parameters
  write_start(self)
references
source code
Abstract method to start the output, eg table headings
  write_section_start(self, heading)
references
source code
Abstract method to start a section of declaration types
  write_section_end(self, heading)
references
source code
Abstract method to end a section of declaration types
  write_section_item(self, text)
references
source code
Abstract method to write the output of one formatted declaration
  write_end(self)
references
source code
Abstract method to end the output, eg close the table