2179{
2180
2181
2182
2183
2184
2185
2186
2187
2189 Dir xmlDir(outputDirectory.
str());
2191
2194
2195 QCString fileName=outputDirectory+
"/compound.xsd";
2197 if (!f.is_open())
2198 {
2199 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
2200 return;
2201 }
2202 {
2204
2205
2207 const char *startLine = compound_xsd.
data();
2208 while (*startLine)
2209 {
2210
2211 const char *endLine = startLine+1;
2212 while (*endLine && *(endLine-1)!='\n') endLine++;
2213 int len=static_cast<int>(endLine-startLine);
2214 if (len>0)
2215 {
2217 if (s.find("<!-- Automatically insert here the HTML entities -->")!=-1)
2218 {
2220 }
2221 else
2222 {
2223 t.write(startLine,len);
2224 }
2225 }
2226 startLine=endLine;
2227 }
2228 }
2229 f.close();
2230
2231 fileName=outputDirectory+"/doxyfile.xsd";
2233 if (!f.is_open())
2234 {
2235 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
2236 return;
2237 }
2238 {
2240
2241
2243 const char *startLine = doxyfile_xsd.
data();
2244 while (*startLine)
2245 {
2246
2247 const char *endLine = startLine+1;
2248 while (*endLine && *(endLine-1)!='\n') endLine++;
2249 int len=static_cast<int>(endLine-startLine);
2250 if (len>0)
2251 {
2253 if (s.find("<!-- Automatically insert here the configuration settings -->")!=-1)
2254 {
2256 }
2257 else
2258 {
2259 t.write(startLine,len);
2260 }
2261 }
2262 startLine=endLine;
2263 }
2264 }
2265 f.close();
2266
2267 fileName=outputDirectory+"/Doxyfile.xml";
2269 if (!f.is_open())
2270 {
2271 err(
"Cannot open file %s for writing\n",fileName.
data());
2272 return;
2273 }
2274 else
2275 {
2278 }
2279 f.close();
2280
2281 fileName=outputDirectory+"/index.xml";
2283 if (!f.is_open())
2284 {
2285 err(
"Cannot open file %s for writing!\n",
qPrint(fileName));
2286 return;
2287 }
2288 else
2289 {
2291
2292
2293 t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";
2294 t << "<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
2295 t << "xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
2296 t << "version=\"" << getDoxygenVersion() << "\" ";
2298 t << ">\n";
2299
2301 {
2303 }
2305 {
2306 msg(
"Generating XML output for concept %s\n",
qPrint(cd->displayName()));
2308 }
2310 {
2311 msg(
"Generating XML output for namespace %s\n",
qPrint(nd->displayName()));
2313 }
2315 {
2316 for (const auto &fd : *fn)
2317 {
2318 msg(
"Generating XML output for file %s\n",
qPrint(fd->name()));
2320 }
2321 }
2323 {
2324 msg(
"Generating XML output for group %s\n",
qPrint(gd->name()));
2326 }
2328 {
2329 msg(
"Generating XML output for page %s\n",
qPrint(pd->name()));
2331 }
2333 {
2334 msg(
"Generate XML output for dir %s\n",
qPrint(dd->name()));
2336 }
2338 {
2339 msg(
"Generating XML output for module %s\n",
qPrint(mod->name()));
2341 }
2343 {
2344 msg(
"Generating XML output for example %s\n",
qPrint(pd->name()));
2346 }
2348 {
2349 msg(
"Generating XML output for the main page\n");
2351 }
2352
2353
2354 t << "</doxygenindex>\n";
2355 }
2356
2359}
Class representing a directory in the file system.
static NamespaceLinkedMap * namespaceLinkedMap
static ConceptLinkedMap * conceptLinkedMap
static std::unique_ptr< PageDef > mainPage
static FileNameLinkedMap * inputNameLinkedMap
static ClassLinkedMap * classLinkedMap
static PageLinkedMap * exampleLinkedMap
static PageLinkedMap * pageLinkedMap
static DirLinkedMap * dirLinkedMap
static GroupLinkedMap * groupLinkedMap
void writeXMLSchema(TextStream &t)
static HtmlEntityMapper & instance()
Returns the one and only instance of the HTML entity mapper.
static ModuleManager & instance()
This is an alternative implementation of QCString.
const std::string & str() const
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
static ResourceMgr & instance()
Returns the one and only instance of this class.
bool copyResource(const QCString &name, const QCString &targetDir) const
Copies a registered resource to a given target directory.
QCString getAsString(const QCString &name) const
Gets the resource data as a C string.
Text streaming class that buffers data.
#define Config_getString(name)
Translator * theTranslator
void msg(const char *fmt,...)
void writeXMLDoxyfile(TextStream &t)
void writeXSDDoxyfile(TextStream &t)
std::ofstream openOutputStream(const QCString &name, bool append=false)
const char * qPrint(const char *s)
void clearSubDirs(const Dir &d)
void createSubDirs(const Dir &d)
static void generateXMLForGroup(const GroupDef *gd, TextStream &ti)
static void generateXMLForClass(const ClassDef *cd, TextStream &ti)
static void generateXMLForFile(FileDef *fd, TextStream &ti)
static void generateXMLForNamespace(const NamespaceDef *nd, TextStream &ti)
static void generateXMLForModule(const ModuleDef *mod, TextStream &ti)
static void generateXMLForConcept(const ConceptDef *cd, TextStream &ti)
static void generateXMLForDir(DirDef *dd, TextStream &ti)
static void generateXMLForPage(PageDef *pd, TextStream &ti, bool isExample)
static void writeCombineScript()