diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2014-11-15 15:25:51 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2014-11-15 23:26:58 (GMT) |
commit | e986e0039de21791bd1fbb1f59b13f58c4a46324 (patch) | |
tree | ff6c668e830ff39097d53f3c0a0898bf0f052b20 /src | |
parent | 0fea3d4ca57187f271d7580ff16f32b7ab4657df (diff) | |
download | Doxygen-e986e0039de21791bd1fbb1f59b13f58c4a46324.zip Doxygen-e986e0039de21791bd1fbb1f59b13f58c4a46324.tar.gz Doxygen-e986e0039de21791bd1fbb1f59b13f58c4a46324.tar.bz2 |
Added language attribute to XML output for classes, namespaces, and files
Diffstat (limited to 'src')
-rw-r--r-- | src/libdoxygen.t.in | 2 | ||||
-rwxr-xr-x | src/res2cc_cmd.py | 18 | ||||
-rw-r--r-- | src/xmlgen.cpp | 13 |
3 files changed, 26 insertions, 7 deletions
diff --git a/src/libdoxygen.t.in b/src/libdoxygen.t.in index 58563d1..1d242d0 100644 --- a/src/libdoxygen.t.in +++ b/src/libdoxygen.t.in @@ -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 diff --git a/src/res2cc_cmd.py b/src/res2cc_cmd.py index 40d2906..772ac84 100755 --- a/src/res2cc_cmd.py +++ b/src/res2cc_cmd.py @@ -1,3 +1,19 @@ +#!/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): diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 01d7f9d..28da1eb 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -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; |