'Add the directive header and options to the generated content.'

def add_directive_header(self, sig):

    directive = getattr(self, 'directivetype', self.objtype)
    name_in_directive = ('.'.join(self.objpath) or self.modname)
    self.add_line((u'..    %s::    %s%s' % (directive, name_in_directive, sig)), '<autodoc>')
    if self.options.noindex:
        self.add_line(u'            :noindex:', '<autodoc>')
    if self.objpath:
        self.add_line((u'            :module:    %s' % self.modname), '<autodoc>')
