Synopsis - Synopsis/Formatters/HTML/Fragments/InheritanceFormatter.py

File: Synopsis/Formatters/HTML/Fragments/InheritanceFormatter.py

     1#
     2# Copyright (C) 2000 Stephen Davies
     3# Copyright (C) 2000 Stefan Seefeld
     4# All rights reserved.
     5# Licensed to the public under the terms of the GNU LGPL (>= 2),
     6# see the file COPYING for details.
     7#
     8
     9from Synopsis.Formatters.HTML.Tags import *
    10from Default import Default
    11
    12class InheritanceFormatter(Default):
    13   """Prints just the name of each declaration, with a link to its doc"""
    14
    15   def format_declaration(self, decl, label=None):
    16
    17      if not label: label = decl.name[-1]
    18      qname = self.formatter.scope().prune(decl.name)
    19      title = decl.type + ' ' + escape(str(qname))
    20      return self.reference(decl.name, label=label, title=title) + ' '
    21
    22   def format_function(self, decl):
    23
    24      return self.format_declaration(decl, label=decl.real_name[-1])
    25
    26   def format_operation(self, decl): return self.format_function(decl)
    27

Generated on Thu Apr 16 16:27:16 2009 by
synopsis (version devel)