Esempio n. 1
0
    def __init__(self, xml):
        def getSections(file, predicate=None):
            return [
                DoxygenSection(sd, self) for sd in filter(
                    predicate, getDirectDescendants(xml, "sectiondef"))
            ]

        def isUserDefined(section):
            return section.attributes["kind"].value == "user-defined"

        self.id = xml.attributes["id"].value
        self.name = getNodeText(xml.getElementsByTagName("compoundname")[0])
        self.brief = convertLine(getDirectDescendant(xml, "briefdescription"),
                                 self)
        self.detailed = convertLine(
            getDirectDescendant(xml, "detaileddescription"), self)

        # call base class constructor
        WikiPage.__init__(self, self.getPageName())

        self.user_sections = getSections(xml, isUserDefined)
        self.generated_sections = getSections(xml,
                                              lambda x: not isUserDefined(x))

        # register class page
        doxygen.addLink(self.id, self.getPageName())
Esempio n. 2
0
    def __init__(self, xml, template):
        def getSections(file, predicate=None):
            return [
                DoxygenSection(sd, self) for sd in filter(
                    predicate, getDirectDescendants(xml, "sectiondef"))
            ]

        def isUserDefined(section):
            return section.attributes["kind"].value == "user-defined"

        self.id = xml.attributes["id"].value
        self.parent = None
        self.template = template
        self.name = getNodeText(xml.getElementsByTagName("compoundname")[0])
        self.title = getNodeText(getDirectDescendant(xml, "title"))
        self.brief = convertLine(getDirectDescendant(xml, "briefdescription"),
                                 self)
        self.detailed = convertLine(
            getDirectDescendant(xml, "detaileddescription"), self)

        # call base class constructor
        WikiPage.__init__(self, self.getPageName())

        self.usersections = getSections(xml, isUserDefined)
        self.generatedsections = getSections(xml,
                                             lambda x: not isUserDefined(x))

        programlistings = xml.getElementsByTagName("programlisting")
        if len(programlistings) > 0:
            self.programlisting = ProgramListing(programlistings[0], self)
Esempio n. 3
0
    def __init__(self, xml, template):

        def getSections(file, predicate=None):
            return [DoxygenSection(sd, self) for sd in filter(predicate, getDirectDescendants(xml, "sectiondef"))]

        def isUserDefined(section):
            return section.attributes["kind"].value == "user-defined"

        self.id = xml.attributes["id"].value
        self.parent = None
        self.template = template
        self.name = getNodeText(xml.getElementsByTagName("compoundname")[0])
        self.title = getNodeText(getDirectDescendant(xml, "title"))
        self.brief = convertLine(getDirectDescendant(xml, "briefdescription"), self)
        self.detailed = convertLine(getDirectDescendant(xml, "detaileddescription"), self)
        
        # call base class constructor
        WikiPage.__init__(self, self.getPageName())

        self.usersections = getSections(xml, isUserDefined)
        self.generatedsections = getSections(xml, lambda x: not isUserDefined(x))

        programlistings = xml.getElementsByTagName("programlisting");
        if len(programlistings) > 0:
            self.programlisting = ProgramListing(programlistings[0], self)
Esempio n. 4
0
 def __init__(self, xml, parent_page):
     self.parent_page = parent_page
     self.refid = xml.attributes["id"].value
     self.type = getNodeText(xml.getElementsByTagName("type")[0])
     self.name = getNodeText(xml.getElementsByTagName("name")[0])
     self.initializer = getNodeText(getDirectDescendant(xml, "initialize"))
     self.brief = convertLine(getDirectDescendant(xml, "briefdescription"), self)
     self.detailed = convertLine(getDirectDescendant(xml, "detaileddescription"), self)
     
     # register variable
     self.parent_page.addMember(self.refid, self.name)
     doxygen.addLink(self.refid, parent_page.getPageName() + "#" + self.parent_page.getMemberAnchor(self.refid))
Esempio n. 5
0
    def __init__(self, xml, parent_page):
        self.parent_page = parent_page
        self.refid = xml.attributes["id"].value
        self.type = getNodeText(xml.getElementsByTagName("type")[0])
        self.name = getNodeText(xml.getElementsByTagName("name")[0])
        self.initializer = getNodeText(getDirectDescendant(xml, "initialize"))
        self.brief = convertLine(getDirectDescendant(xml, "briefdescription"),
                                 self)
        self.detailed = convertLine(
            getDirectDescendant(xml, "detaileddescription"), self)

        # register variable
        self.parent_page.addMember(self.refid, self.name)
        doxygen.addLink(
            self.refid,
            parent_page.getPageName() + "#" +
            self.parent_page.getMemberAnchor(self.refid))
Esempio n. 6
0
    def __init__(self, xml, parent_page):
        
        def kind(node):
            return node.attributes["kind"].value

        self.parent_page = parent_page;
        self.kind = xml.attributes["kind"].value
        self.name = getNodeText(getDirectDescendant(xml, "header"))
        self._description = convertLine(getDirectDescendant(xml, "description"), self)
        
        self.functions = []
        self.variables = []
        
        for node in getDirectDescendants(xml, "memberdef"):
            if kind(node) == "function":
                self.functions.append(DoxygenMemberFunction(node, parent_page))
            elif kind(node) == "variable":
                self.variables.append(DoxygenMemberVariable(node, parent_page))
            else:
                pass
Esempio n. 7
0
    def __init__(self, xml, parent_page):
        def kind(node):
            return node.attributes["kind"].value

        self.parent_page = parent_page
        self.kind = xml.attributes["kind"].value
        self.name = getNodeText(getDirectDescendant(xml, "header"))
        self._description = convertLine(
            getDirectDescendant(xml, "description"), self)

        self.functions = []
        self.variables = []

        for node in getDirectDescendants(xml, "memberdef"):
            if kind(node) == "function":
                self.functions.append(DoxygenMemberFunction(node, parent_page))
            elif kind(node) == "variable":
                self.variables.append(DoxygenMemberVariable(node, parent_page))
            else:
                pass
Esempio n. 8
0
    def __init__(self, xml):

        def getSections(file, predicate=None):
            return [DoxygenSection(sd, self) for sd in filter(predicate, getDirectDescendants(xml, "sectiondef"))]

        def isUserDefined(section):
            return section.attributes["kind"].value == "user-defined"
        
        self.id = xml.attributes["id"].value
        self.name = getNodeText(xml.getElementsByTagName("compoundname")[0])
        self.brief = convertLine(getDirectDescendant(xml, "briefdescription"), self)
        self.detailed = convertLine(getDirectDescendant(xml, "detaileddescription"), self)
        
        # call base class constructor
        WikiPage.__init__(self, self.getPageName())
        
        self.user_sections = getSections(xml, isUserDefined)
        self.generated_sections = getSections(xml, lambda x: not isUserDefined(x))
               
        # register class page
        doxygen.addLink(self.id, self.getPageName())
Esempio n. 9
0
    def __init__(self, xml, parent_page):
        self.parent_page = parent_page
        self.refid = xml.attributes["id"].value
        self.name = getNodeText(xml.getElementsByTagName("name")[0])
        self.brief = convertLine(getDirectDescendant(xml, "briefdescription"), self)
        self.detailed = convertLine(getDirectDescendant(xml, "detaileddescription"), self)
        self.type = getNodeText(xml.getElementsByTagName("type")[0])

        # TODO: rewrite
        self.params = []
        paramsdict = {}
        for p in xml.getElementsByTagName("param"):
            type = getNodeText(p.getElementsByTagName("type")[0])
            declnameNode = getDirectDescendant(p, "declname")
            if declnameNode is not None:
                declname = getNodeText(declnameNode)
                paramsdict[declname] = type
            else:
                declname = ""
            self.params.append((type, declname))

        self.param_groups = [ParamGroup(node) for node in xml.getElementsByTagName("parameteritem")]
        # typing
        for param_group in self.param_groups:
            for param in param_group.params:
                 param.type = paramsdict[param.name]
        
        self.returns = ReturnGroup(getDirectDescendant(xml, "detaileddescription"))
        self.remarks = RemarkGroup(getDirectDescendant(xml, "detaileddescription"))
        self.see = SeeGroup(getDirectDescendant(xml, "detaileddescription"))
        
        # register function
        self.parent_page.addMember(self.refid, self.name)
        doxygen.addLink(self.refid, parent_page.getPageName() + "#" + self.parent_page.getMemberAnchor(self.refid))
Esempio n. 10
0
    def __init__(self, xml, parent_page):
        self.parent_page = parent_page
        self.refid = xml.attributes["id"].value
        self.name = getNodeText(xml.getElementsByTagName("name")[0])
        self.brief = convertLine(getDirectDescendant(xml, "briefdescription"),
                                 self)
        self.detailed = convertLine(
            getDirectDescendant(xml, "detaileddescription"), self)
        self.type = getNodeText(xml.getElementsByTagName("type")[0])

        # TODO: rewrite
        self.params = []
        paramsdict = {}
        for p in xml.getElementsByTagName("param"):
            type = getNodeText(p.getElementsByTagName("type")[0])
            declnameNode = getDirectDescendant(p, "declname")
            if declnameNode is not None:
                declname = getNodeText(declnameNode)
                paramsdict[declname] = type
            else:
                declname = ""
            self.params.append((type, declname))

        self.param_groups = [
            ParamGroup(node)
            for node in xml.getElementsByTagName("parameteritem")
        ]
        # typing
        for param_group in self.param_groups:
            for param in param_group.params:
                param.type = paramsdict[param.name]

        self.returns = ReturnGroup(
            getDirectDescendant(xml, "detaileddescription"))
        self.remarks = RemarkGroup(
            getDirectDescendant(xml, "detaileddescription"))
        self.see = SeeGroup(getDirectDescendant(xml, "detaileddescription"))

        # register function
        self.parent_page.addMember(self.refid, self.name)
        doxygen.addLink(
            self.refid,
            parent_page.getPageName() + "#" +
            self.parent_page.getMemberAnchor(self.refid))
Esempio n. 11
0
 def __init__(self, xml):
     self.params = [Param(node) for node in xml.getElementsByTagName("parametername")]
     self._description = convertLine(getDirectDescendant(xml, "parameterdescription"), self)
Esempio n. 12
0
 def __init__(self, xml):
     self.params = [
         Param(node) for node in xml.getElementsByTagName("parametername")
     ]
     self._description = convertLine(
         getDirectDescendant(xml, "parameterdescription"), self)