diff options
Diffstat (limited to 'src/xmlgen.cpp')
-rw-r--r-- | src/xmlgen.cpp | 86 |
1 files changed, 7 insertions, 79 deletions
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 549ff0f..01d7f9d 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -46,6 +46,7 @@ #include "dirdef.h" #include "section.h" #include "htmlentity.h" +#include "resourcemgr.h" // no debug info #define XML_DB(x) do {} while(0) @@ -56,18 +57,6 @@ //------------------ -static const char index_xsd[] = -#include "index.xsd.h" -; - -//------------------ -// -static const char compound_xsd[] = -#include "compound.xsd.h" -; - -//------------------ - /** Helper class mapping MemberList::ListType to a string representing */ class XmlSectionMapper : public QIntDict<char> { @@ -1387,37 +1376,6 @@ static void generateXMLForClass(ClassDef *cd,FTextStream &ti) generateXMLSection(cd,ti,t,ml,g_xmlSectionMapper.find(ml->listType())); } } -#if 0 - generateXMLSection(cd,ti,t,cd->pubTypes,"public-type"); - generateXMLSection(cd,ti,t,cd->pubMethods,"public-func"); - generateXMLSection(cd,ti,t,cd->pubAttribs,"public-attrib"); - generateXMLSection(cd,ti,t,cd->pubSlots,"public-slot"); - generateXMLSection(cd,ti,t,cd->signals,"signal"); - generateXMLSection(cd,ti,t,cd->dcopMethods,"dcop-func"); - generateXMLSection(cd,ti,t,cd->properties,"property"); - generateXMLSection(cd,ti,t,cd->events,"event"); - generateXMLSection(cd,ti,t,cd->pubStaticMethods,"public-static-func"); - generateXMLSection(cd,ti,t,cd->pubStaticAttribs,"public-static-attrib"); - generateXMLSection(cd,ti,t,cd->proTypes,"protected-type"); - generateXMLSection(cd,ti,t,cd->proMethods,"protected-func"); - generateXMLSection(cd,ti,t,cd->proAttribs,"protected-attrib"); - generateXMLSection(cd,ti,t,cd->proSlots,"protected-slot"); - generateXMLSection(cd,ti,t,cd->proStaticMethods,"protected-static-func"); - generateXMLSection(cd,ti,t,cd->proStaticAttribs,"protected-static-attrib"); - generateXMLSection(cd,ti,t,cd->pacTypes,"package-type"); - generateXMLSection(cd,ti,t,cd->pacMethods,"package-func"); - generateXMLSection(cd,ti,t,cd->pacAttribs,"package-attrib"); - generateXMLSection(cd,ti,t,cd->pacStaticMethods,"package-static-func"); - generateXMLSection(cd,ti,t,cd->pacStaticAttribs,"package-static-attrib"); - generateXMLSection(cd,ti,t,cd->priTypes,"private-type"); - generateXMLSection(cd,ti,t,cd->priMethods,"private-func"); - generateXMLSection(cd,ti,t,cd->priAttribs,"private-attrib"); - generateXMLSection(cd,ti,t,cd->priSlots,"private-slot"); - generateXMLSection(cd,ti,t,cd->priStaticMethods,"private-static-func"); - generateXMLSection(cd,ti,t,cd->priStaticAttribs,"private-static-attrib"); - generateXMLSection(cd,ti,t,cd->friends,"friend"); - generateXMLSection(cd,ti,t,cd->related,"related"); -#endif t << " <briefdescription>" << endl; writeXMLDocBlock(t,cd->briefFile(),cd->briefLine(),cd,0,cd->briefDescription()); @@ -1519,14 +1477,6 @@ static void generateXMLForNamespace(NamespaceDef *nd,FTextStream &ti) generateXMLSection(nd,ti,t,ml,g_xmlSectionMapper.find(ml->listType())); } } -#if 0 - generateXMLSection(nd,ti,t,&nd->decDefineMembers,"define"); - generateXMLSection(nd,ti,t,&nd->decProtoMembers,"prototype"); - generateXMLSection(nd,ti,t,&nd->decTypedefMembers,"typedef"); - generateXMLSection(nd,ti,t,&nd->decEnumMembers,"enum"); - generateXMLSection(nd,ti,t,&nd->decFuncMembers,"func"); - generateXMLSection(nd,ti,t,&nd->decVarMembers,"var"); -#endif t << " <briefdescription>" << endl; writeXMLDocBlock(t,nd->briefFile(),nd->briefLine(),nd,0,nd->briefDescription()); @@ -1663,14 +1613,6 @@ static void generateXMLForFile(FileDef *fd,FTextStream &ti) generateXMLSection(fd,ti,t,ml,g_xmlSectionMapper.find(ml->listType())); } } -#if 0 - generateXMLSection(fd,ti,t,fd->decDefineMembers,"define"); - generateXMLSection(fd,ti,t,fd->decProtoMembers,"prototype"); - generateXMLSection(fd,ti,t,fd->decTypedefMembers,"typedef"); - generateXMLSection(fd,ti,t,fd->decEnumMembers,"enum"); - generateXMLSection(fd,ti,t,fd->decFuncMembers,"func"); - generateXMLSection(fd,ti,t,fd->decVarMembers,"var"); -#endif t << " <briefdescription>" << endl; writeXMLDocBlock(t,fd->briefFile(),fd->briefLine(),fd,0,fd->briefDescription()); @@ -1753,14 +1695,6 @@ static void generateXMLForGroup(GroupDef *gd,FTextStream &ti) generateXMLSection(gd,ti,t,ml,g_xmlSectionMapper.find(ml->listType())); } } -#if 0 - generateXMLSection(gd,ti,t,&gd->decDefineMembers,"define"); - generateXMLSection(gd,ti,t,&gd->decProtoMembers,"prototype"); - generateXMLSection(gd,ti,t,&gd->decTypedefMembers,"typedef"); - generateXMLSection(gd,ti,t,&gd->decEnumMembers,"enum"); - generateXMLSection(gd,ti,t,&gd->decFuncMembers,"func"); - generateXMLSection(gd,ti,t,&gd->decVarMembers,"var"); -#endif t << " <briefdescription>" << endl; writeXMLDocBlock(t,gd->briefFile(),gd->briefLine(),gd,0,gd->briefDescription()); @@ -1906,18 +1840,11 @@ void generateXML() QCString outputDirectory = Config_getString("XML_OUTPUT"); QDir xmlDir(outputDirectory); createSubDirs(xmlDir); - QCString fileName=outputDirectory+"/index.xsd"; - QFile f(fileName); - if (!f.open(IO_WriteOnly)) - { - err("Cannot open file %s for writing!\n",fileName.data()); - return; - } - f.writeBlock(index_xsd,qstrlen(index_xsd)); - f.close(); - fileName=outputDirectory+"/compound.xsd"; - f.setName(fileName); + ResourceMgr::instance().copyResource("index.xsd",outputDirectory); + + QCString fileName=outputDirectory+"/compound.xsd"; + QFile f(fileName); if (!f.open(IO_WriteOnly)) { err("Cannot open file %s for writing!\n",fileName.data()); @@ -1925,7 +1852,8 @@ void generateXML() } // write compound.xsd, but replace special marker with the entities - const char *startLine = compound_xsd; + QCString compound_xsd = ResourceMgr::instance().getAsString("compound.xsd"); + const char *startLine = compound_xsd.data(); while (*startLine) { // find end of the line |