2336{
2337
2338
2339
2340
2341
2342
2343
2344
2346 Dir xmlDir(outputDirectory.
str());
2348
2351
2352 QCString fileName=outputDirectory+
"/compound.xsd";
2354 if (!f.is_open())
2355 {
2356 err(
"Cannot open file {} for writing!\n",fileName);
2357 return;
2358 }
2359 {
2361
2362
2364 const char *startLine = compound_xsd.
data();
2365 while (*startLine)
2366 {
2367
2368 const char *endLine = startLine+1;
2369 while (*endLine && *(endLine-1)!='\n') endLine++;
2370 int len=static_cast<int>(endLine-startLine);
2371 if (len>0)
2372 {
2374 if (s.find("<!-- Automatically insert here the HTML entities -->")!=-1)
2375 {
2377 }
2378 else
2379 {
2380 t.write(startLine,len);
2381 }
2382 }
2383 startLine=endLine;
2384 }
2385 }
2386 f.close();
2387
2388 fileName=outputDirectory+"/doxyfile.xsd";
2390 if (!f.is_open())
2391 {
2392 err(
"Cannot open file {} for writing!\n",fileName);
2393 return;
2394 }
2395 {
2397
2398
2400 const char *startLine = doxyfile_xsd.
data();
2401 while (*startLine)
2402 {
2403
2404 const char *endLine = startLine+1;
2405 while (*endLine && *(endLine-1)!='\n') endLine++;
2406 int len=static_cast<int>(endLine-startLine);
2407 if (len>0)
2408 {
2410 if (s.find("<!-- Automatically insert here the configuration settings -->")!=-1)
2411 {
2413 }
2414 else
2415 {
2416 t.write(startLine,len);
2417 }
2418 }
2419 startLine=endLine;
2420 }
2421 }
2422 f.close();
2423
2424 fileName=outputDirectory+"/Doxyfile.xml";
2426 if (!f.is_open())
2427 {
2428 err(
"Cannot open file {} for writing\n",fileName);
2429 return;
2430 }
2431 else
2432 {
2435 }
2436 f.close();
2437
2438 fileName=outputDirectory+"/index.xml";
2440 if (!f.is_open())
2441 {
2442 err(
"Cannot open file {} for writing!\n",fileName);
2443 return;
2444 }
2445 else
2446 {
2448
2449
2450 t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";
2451 t << "<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
2452 t << "xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
2453 t << "version=\"" << getDoxygenVersion() << "\" ";
2455 t << ">\n";
2456
2458 {
2460 }
2462 {
2463 msg(
"Generating XML output for concept {}\n",cd->displayName());
2465 }
2467 {
2468 msg(
"Generating XML output for namespace {}\n",nd->displayName());
2470 }
2472 {
2473 for (const auto &fd : *fn)
2474 {
2475 msg(
"Generating XML output for file {}\n",fd->name());
2477 }
2478 }
2480 {
2481 msg(
"Generating XML output for group {}\n",gd->name());
2483 }
2485 {
2486 msg(
"Generating XML output for page {}\n",pd->name());
2488 }
2490 {
2491 if (req->getTagFile().isEmpty())
2492 {
2493 msg(
"Generating XML output for requirement {}\n", req->id());
2495 }
2496 }
2498 {
2499 msg(
"Generate XML output for dir {}\n",dd->name());
2501 }
2503 {
2504 msg(
"Generating XML output for module {}\n",mod->name());
2506 }
2508 {
2509 msg(
"Generating XML output for example {}\n",pd->name());
2511 }
2513 {
2514 msg(
"Generating XML output for the main page\n");
2516 }
2517
2518
2519 t << "</doxygenindex>\n";
2520 }
2521
2524}
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()