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

def add_directive_header(self, sig):

    domain = getattr(self, 'domain', 'py')
    directive = getattr(self, 'directivetype', self.objtype)
    name = self.format_name()
    sourcename = self.get_sourcename()
    self.add_line((u'..    %s:%s::    %s%s' % (domain, directive, name, sig)), sourcename)
    if self.options.noindex:
        self.add_line(u'            :noindex:', sourcename)
    if self.objpath:
        self.add_line((u'            :module:    %s' % self.modname), sourcename)
