2380{
2381
2382
2383
2384
2385
2386
2387
2388
2390 Dir xmlDir(outputDirectory.
str());
2392
2395
2396 DString fileName=outputDirectory+
"/compound.xsd";
2398 if (!f.is_open())
2399 {
2400 err(
"Cannot open file {} for writing!\n",fileName);
2401 return;
2402 }
2403 {
2405
2406
2408 const char *startLine = compound_xsd.
data();
2409 while (*startLine)
2410 {
2411
2412 const char *endLine = startLine+1;
2413 while (*endLine && *(endLine-1)!='\n') endLine++;
2414 int len=static_cast<int>(endLine-startLine);
2415 if (len>0)
2416 {
2418 if (s.find(
"<!-- Automatically insert here the HTML entities -->")!=
DString::npos)
2419 {
2421 }
2422 else
2423 {
2424 t.write(startLine,len);
2425 }
2426 }
2427 startLine=endLine;
2428 }
2429 }
2430 f.close();
2431
2432 fileName=outputDirectory+"/doxyfile.xsd";
2434 if (!f.is_open())
2435 {
2436 err(
"Cannot open file {} for writing!\n",fileName);
2437 return;
2438 }
2439 {
2441
2442
2444 const char *startLine = doxyfile_xsd.
data();
2445 while (*startLine)
2446 {
2447
2448 const char *endLine = startLine+1;
2449 while (*endLine && *(endLine-1)!='\n') endLine++;
2450 int len=static_cast<int>(endLine-startLine);
2451 if (len>0)
2452 {
2454 if (s.find(
"<!-- Automatically insert here the configuration settings -->")!=
DString::npos)
2455 {
2457 }
2458 else
2459 {
2460 t.write(startLine,len);
2461 }
2462 }
2463 startLine=endLine;
2464 }
2465 }
2466 f.close();
2467
2468 fileName=outputDirectory+"/Doxyfile.xml";
2470 if (!f.is_open())
2471 {
2472 err(
"Cannot open file {} for writing\n",fileName);
2473 return;
2474 }
2475 else
2476 {
2479 }
2480 f.close();
2481
2482 fileName=outputDirectory+"/index.xml";
2484 if (!f.is_open())
2485 {
2486 err(
"Cannot open file {} for writing!\n",fileName);
2487 return;
2488 }
2489 else
2490 {
2492
2493
2494 t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";
2495 t << "<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
2496 t << "xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
2497 t << "version=\"" << getDoxygenVersion() << "\" ";
2499 t << ">\n";
2500
2502 {
2504 }
2506 {
2507 msg(
"Generating XML output for concept {}\n",cd->displayName());
2509 }
2511 {
2512 msg(
"Generating XML output for namespace {}\n",nd->displayName());
2514 }
2516 {
2517 for (const auto &fd : *fn)
2518 {
2519 msg(
"Generating XML output for file {}\n",fd->name());
2521 }
2522 }
2524 {
2525 msg(
"Generating XML output for group {}\n",gd->name());
2527 }
2529 {
2530 msg(
"Generating XML output for page {}\n",pd->name());
2532 }
2534 {
2535 if (req->getTagFile().empty())
2536 {
2537 msg(
"Generating XML output for requirement {}\n", req->id());
2539 }
2540 }
2542 {
2543 msg(
"Generate XML output for dir {}\n",dd->name());
2545 }
2547 {
2548 msg(
"Generating XML output for module {}\n",mod->name());
2550 }
2552 {
2553 msg(
"Generating XML output for example {}\n",pd->name());
2555 }
2557 {
2558 msg(
"Generating XML output for the main page\n");
2560 }
2561
2562
2563 t << "</doxygenindex>\n";
2564 }
2565
2568}
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
static constexpr size_t npos
value used to indicate 'not found' or 'to the end of the string', matching std::string::npos
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.
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()
static RequirementManager & instance()
static ResourceMgr & instance()
Returns the one and only instance of this class.
bool copyResource(const DString &name, const DString &targetDir) const
Copies a registered resource to a given target directory.
DString getAsString(const DString &name) const
Gets the resource data as a C string.
Text streaming class that buffers data.
virtual DString trISOLang()=0
#define Config_getString(name)
Translator * theTranslator
void writeXMLDoxyfile(TextStream &t)
void writeXSDDoxyfile(TextStream &t)
std::ofstream openOutputStream(const DString &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()