Commit e986e003 authored by Dimitri van Heesch's avatar Dimitri van Heesch
Browse files

Added language attribute to XML output for classes, namespaces, and files

parent 0fea3d4c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -121,6 +121,6 @@ TO_C_CMD=$(PYTHON) to_c_cmd.py < $< > $@
$(GENERATED_SRC)/layout_default.xml.h: layout_default.xml
	$(TO_C_CMD)

../generated_src/doxygen/resources.cpp: res2cc_cmd.py $(wildcard ../templates/html/*)
../generated_src/doxygen/resources.cpp: res2cc_cmd.py $(wildcard ../templates/html/*) $(wildcard ../templates/xml) $(wildcard ../templates/latex)
	$(PYTHON) res2cc_cmd.py ../templates ../generated_src/doxygen/resources.cpp
+17 −1
Original line number Diff line number Diff line
#!/usr/bin/python
# Script that compiles a set of resources into a single C++ source file. The C++ file
# offers an initResources() function, which registers the resources with the resource
# manager (class ResourceMgr)
#
# Copyright (C) 1997-2014 by Dimitri van Heesch.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation under the terms of the GNU General Public License is hereby
# granted. No representations are made about the suitability of this software
# for any purpose. It is provided "as is" without express or implied warranty.
# See the GNU General Public License for more details.
#
# Documents produced by Doxygen are derivative works derived from the
# input used in their production; they are not affected by this license.
#
from __future__ import print_function
from os         import listdir, stat, walk
from os.path    import isfile, join, splitext
@@ -78,7 +94,7 @@ class LumaFile(File):

def main():
	if len(sys.argv)<3:
		sys.exit('Usage: %s directory output_file.c' % sys.argv[0])
		sys.exit('Usage: %s directory output_file.cpp' % sys.argv[0])
	directory = sys.argv[1]
	files = []
	for dirName, subdirList, fileList in walk(directory):
+8 −5
Original line number Diff line number Diff line
@@ -1251,7 +1251,8 @@ static void generateXMLForClass(ClassDef *cd,FTextStream &ti)
  writeXMLHeader(t);
  t << "  <compounddef id=\"" 
    << classOutputFileBase(cd) << "\" kind=\"" 
    << cd->compoundTypeString() << "\" prot=\"";
    << cd->compoundTypeString() << "\" language=\""
    << langToString(cd->getLanguage()) << "\" prot=\"";
  switch (cd->protection())
  {
    case Public:    t << "public";    break;
@@ -1448,8 +1449,9 @@ static void generateXMLForNamespace(NamespaceDef *nd,FTextStream &ti)
  //t.setEncoding(FTextStream::UnicodeUTF8);
  
  writeXMLHeader(t);
  t << "  <compounddef id=\"" 
    << nd->getOutputFileBase() << "\" kind=\"namespace\">" << endl;
  t << "  <compounddef id=\"" << nd->getOutputFileBase() 
    << "\" kind=\"namespace\" language=\"" 
    << langToString(nd->getLanguage()) << "\">" << endl;
  t << "    <compoundname>";
  writeXMLString(t,nd->name());
  t << "</compoundname>" << endl;
@@ -1528,8 +1530,9 @@ static void generateXMLForFile(FileDef *fd,FTextStream &ti)
  //t.setEncoding(FTextStream::UnicodeUTF8);

  writeXMLHeader(t);
  t << "  <compounddef id=\"" 
    << fd->getOutputFileBase() << "\" kind=\"file\">" << endl;
  t << "  <compounddef id=\"" << fd->getOutputFileBase()
    << "\" kind=\"file\" language=\"" 
    << langToString(fd->getLanguage()) << "\">" << endl;
  t << "    <compoundname>";
  writeXMLString(t,fd->name());
  t << "</compoundname>" << endl;
+21 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@
    </xsd:sequence>
    <xsd:attribute name="id" type="xsd:string" />
    <xsd:attribute name="kind" type="DoxCompoundKind" />
    <xsd:attribute name="language" type="DoxLanguage" use="optional"/>
    <xsd:attribute name="prot" type="DoxProtectionKind" />
    <xsd:attribute name="final" type="DoxBool" use="optional"/>
    <xsd:attribute name="sealed" type="DoxBool" use="optional"/>
@@ -686,6 +687,26 @@
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="DoxLanguage">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="Unknown" />
      <xsd:enumeration value="IDL" />
      <xsd:enumeration value="Java" />
      <xsd:enumeration value="C#" />
      <xsd:enumeration value="D" />
      <xsd:enumeration value="PHP" />
      <xsd:enumeration value="Objective-C" />
      <xsd:enumeration value="C++" />
      <xsd:enumeration value="Javascript" />
      <xsd:enumeration value="Python" />
      <xsd:enumeration value="Fortran" />
      <xsd:enumeration value="VHDL" />
      <xsd:enumeration value="XML" />
      <xsd:enumeration value="Tcl" />
      <xsd:enumeration value="Markdown" />
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="DoxVirtualKind">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="non-virtual" />
+1 −1
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="">
  <compounddef id="008__brief_8c" kind="file">
  <compounddef id="008__brief_8c" kind="file" language="C++">
    <compoundname>008_brief.c</compoundname>
    <briefdescription>
      <para>A brief description. </para>
Loading