2327{
2328
2329
2330
2331
2332
2333
2334
2335
2337 Dir xmlDir(outputDirectory.
str());
2339
2342
2343 QCString fileName=outputDirectory+
"/compound.xsd";
2345 if (!f.is_open())
2346 {
2347 err(
"Cannot open file {} for writing!\n",fileName);
2348 return;
2349 }
2350 {
2352
2353
2355 const char *startLine = compound_xsd.
data();
2356 while (*startLine)
2357 {
2358
2359 const char *endLine = startLine+1;
2360 while (*endLine && *(endLine-1)!='\n') endLine++;
2361 int len=static_cast<int>(endLine-startLine);
2362 if (len>0)
2363 {
2365 if (s.find("<!-- Automatically insert here the HTML entities -->")!=-1)
2366 {
2368 }
2369 else
2370 {
2371 t.write(startLine,len);
2372 }
2373 }
2374 startLine=endLine;
2375 }
2376 }
2377 f.close();
2378
2379 fileName=outputDirectory+"/doxyfile.xsd";
2381 if (!f.is_open())
2382 {
2383 err(
"Cannot open file {} for writing!\n",fileName);
2384 return;
2385 }
2386 {
2388
2389
2391 const char *startLine = doxyfile_xsd.
data();
2392 while (*startLine)
2393 {
2394
2395 const char *endLine = startLine+1;
2396 while (*endLine && *(endLine-1)!='\n') endLine++;
2397 int len=static_cast<int>(endLine-startLine);
2398 if (len>0)
2399 {
2401 if (s.find("<!-- Automatically insert here the configuration settings -->")!=-1)
2402 {
2404 }
2405 else
2406 {
2407 t.write(startLine,len);
2408 }
2409 }
2410 startLine=endLine;
2411 }
2412 }
2413 f.close();
2414
2415 fileName=outputDirectory+"/Doxyfile.xml";
2417 if (!f.is_open())
2418 {
2419 err(
"Cannot open file {} for writing\n",fileName);
2420 return;
2421 }
2422 else
2423 {
2426 }
2427 f.close();
2428
2429 fileName=outputDirectory+"/index.xml";
2431 if (!f.is_open())
2432 {
2433 err(
"Cannot open file {} for writing!\n",fileName);
2434 return;
2435 }
2436 else
2437 {
2439
2440
2441 t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";
2442 t << "<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
2443 t << "xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
2444 t << "version=\"" << getDoxygenVersion() << "\" ";
2446 t << ">\n";
2447
2449 {
2451 }
2453 {
2454 msg(
"Generating XML output for concept {}\n",cd->displayName());
2456 }
2458 {
2459 msg(
"Generating XML output for namespace {}\n",nd->displayName());
2461 }
2463 {
2464 for (const auto &fd : *fn)
2465 {
2466 msg(
"Generating XML output for file {}\n",fd->name());
2468 }
2469 }
2471 {
2472 msg(
"Generating XML output for group {}\n",gd->name());
2474 }
2476 {
2477 msg(
"Generating XML output for page {}\n",pd->name());
2479 }
2481 {
2482 if (req->getTagFile().isEmpty())
2483 {
2484 msg(
"Generating XML output for requirement {}\n", req->id());
2486 }
2487 }
2489 {
2490 msg(
"Generate XML output for dir {}\n",dd->name());
2492 }
2494 {
2495 msg(
"Generating XML output for module {}\n",mod->name());
2497 }
2499 {
2500 msg(
"Generating XML output for example {}\n",pd->name());
2502 }
2504 {
2505 msg(
"Generating XML output for the main page\n");
2507 }
2508
2509
2510 t << "</doxygenindex>\n";
2511 }
2512
2515}
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 RequirementManager & instance()
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 writeXMLDoxyfile(TextStream &t)
void writeXSDDoxyfile(TextStream &t)
std::ofstream openOutputStream(const QCString &name, bool append=false)
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 generateXMLForRequirement(const RequirementIntf *req, 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()