2358{
2359
2360
2361
2362
2363
2364
2365
2366
2368 Dir xmlDir(outputDirectory.
str());
2370
2373
2374 DString fileName=outputDirectory+
"/compound.xsd";
2376 if (!f.is_open())
2377 {
2378 err(
"Cannot open file {} for writing!\n",fileName);
2379 return;
2380 }
2381 {
2383
2384
2386 const char *startLine = compound_xsd.
data();
2387 while (*startLine)
2388 {
2389
2390 const char *endLine = startLine+1;
2391 while (*endLine && *(endLine-1)!='\n') endLine++;
2392 int len=static_cast<int>(endLine-startLine);
2393 if (len>0)
2394 {
2396 if (s.find(
"<!-- Automatically insert here the HTML entities -->")!=
DString::npos)
2397 {
2399 }
2400 else
2401 {
2402 t.write(startLine,len);
2403 }
2404 }
2405 startLine=endLine;
2406 }
2407 }
2408 f.close();
2409
2410 fileName=outputDirectory+"/doxyfile.xsd";
2412 if (!f.is_open())
2413 {
2414 err(
"Cannot open file {} for writing!\n",fileName);
2415 return;
2416 }
2417 {
2419
2420
2422 const char *startLine = doxyfile_xsd.
data();
2423 while (*startLine)
2424 {
2425
2426 const char *endLine = startLine+1;
2427 while (*endLine && *(endLine-1)!='\n') endLine++;
2428 int len=static_cast<int>(endLine-startLine);
2429 if (len>0)
2430 {
2432 if (s.find(
"<!-- Automatically insert here the configuration settings -->")!=
DString::npos)
2433 {
2435 }
2436 else
2437 {
2438 t.write(startLine,len);
2439 }
2440 }
2441 startLine=endLine;
2442 }
2443 }
2444 f.close();
2445
2446 fileName=outputDirectory+"/Doxyfile.xml";
2448 if (!f.is_open())
2449 {
2450 err(
"Cannot open file {} for writing\n",fileName);
2451 return;
2452 }
2453 else
2454 {
2457 }
2458 f.close();
2459
2460 fileName=outputDirectory+"/index.xml";
2462 if (!f.is_open())
2463 {
2464 err(
"Cannot open file {} for writing!\n",fileName);
2465 return;
2466 }
2467 else
2468 {
2470
2471
2472 t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";
2473 t << "<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
2474 t << "xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
2475 t << "version=\"" << getDoxygenVersion() << "\" ";
2477 t << ">\n";
2478
2480 {
2482 }
2484 {
2485 msg(
"Generating XML output for concept {}\n",cd->displayName());
2487 }
2489 {
2490 msg(
"Generating XML output for namespace {}\n",nd->displayName());
2492 }
2494 {
2495 for (const auto &fd : *fn)
2496 {
2497 msg(
"Generating XML output for file {}\n",fd->name());
2499 }
2500 }
2502 {
2503 msg(
"Generating XML output for group {}\n",gd->name());
2505 }
2507 {
2508 msg(
"Generating XML output for page {}\n",pd->name());
2510 }
2512 {
2513 if (req->getTagFile().empty())
2514 {
2515 msg(
"Generating XML output for requirement {}\n", req->id());
2517 }
2518 }
2520 {
2521 msg(
"Generate XML output for dir {}\n",dd->name());
2523 }
2525 {
2526 msg(
"Generating XML output for module {}\n",mod->name());
2528 }
2530 {
2531 msg(
"Generating XML output for example {}\n",pd->name());
2533 }
2535 {
2536 msg(
"Generating XML output for the main page\n");
2538 }
2539
2540
2541 t << "</doxygenindex>\n";
2542 }
2543
2546}
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()