2317{
2318
2319
2320
2321
2322
2323
2324
2325
2327 Dir xmlDir(outputDirectory.
str());
2329
2332
2333 DString fileName=outputDirectory+
"/compound.xsd";
2335 if (!f.is_open())
2336 {
2337 err(
"Cannot open file {} for writing!\n",fileName);
2338 return;
2339 }
2340 {
2342
2343
2345 const char *startLine = compound_xsd.
data();
2346 while (*startLine)
2347 {
2348
2349 const char *endLine = startLine+1;
2350 while (*endLine && *(endLine-1)!='\n') endLine++;
2351 int len=static_cast<int>(endLine-startLine);
2352 if (len>0)
2353 {
2355 if (s.find(
"<!-- Automatically insert here the HTML entities -->")!=
DString::npos)
2356 {
2358 }
2359 else
2360 {
2361 t.write(startLine,len);
2362 }
2363 }
2364 startLine=endLine;
2365 }
2366 }
2367 f.close();
2368
2369 fileName=outputDirectory+"/doxyfile.xsd";
2371 if (!f.is_open())
2372 {
2373 err(
"Cannot open file {} for writing!\n",fileName);
2374 return;
2375 }
2376 {
2378
2379
2381 const char *startLine = doxyfile_xsd.
data();
2382 while (*startLine)
2383 {
2384
2385 const char *endLine = startLine+1;
2386 while (*endLine && *(endLine-1)!='\n') endLine++;
2387 int len=static_cast<int>(endLine-startLine);
2388 if (len>0)
2389 {
2391 if (s.find(
"<!-- Automatically insert here the configuration settings -->")!=
DString::npos)
2392 {
2394 }
2395 else
2396 {
2397 t.write(startLine,len);
2398 }
2399 }
2400 startLine=endLine;
2401 }
2402 }
2403 f.close();
2404
2405 fileName=outputDirectory+"/Doxyfile.xml";
2407 if (!f.is_open())
2408 {
2409 err(
"Cannot open file {} for writing\n",fileName);
2410 return;
2411 }
2412 else
2413 {
2416 }
2417 f.close();
2418
2419 fileName=outputDirectory+"/index.xml";
2421 if (!f.is_open())
2422 {
2423 err(
"Cannot open file {} for writing!\n",fileName);
2424 return;
2425 }
2426 else
2427 {
2429
2430
2431 t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";
2432 t << "<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
2433 t << "xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
2434 t << "version=\"" << getDoxygenVersion() << "\" ";
2436 t << ">\n";
2437
2439 {
2441 }
2443 {
2444 msg(
"Generating XML output for concept {}\n",cd->displayName());
2446 }
2448 {
2449 msg(
"Generating XML output for namespace {}\n",nd->displayName());
2451 }
2453 {
2454 for (const auto &fd : *fn)
2455 {
2456 msg(
"Generating XML output for file {}\n",fd->name());
2458 }
2459 }
2461 {
2462 msg(
"Generating XML output for group {}\n",gd->name());
2464 }
2466 {
2467 msg(
"Generating XML output for page {}\n",pd->name());
2469 }
2471 {
2472 if (req->getTagFile().empty())
2473 {
2474 msg(
"Generating XML output for requirement {}\n", req->id());
2476 }
2477 }
2479 {
2480 msg(
"Generate XML output for dir {}\n",dd->name());
2482 }
2484 {
2485 msg(
"Generating XML output for module {}\n",mod->name());
2487 }
2489 {
2490 msg(
"Generating XML output for example {}\n",pd->name());
2492 }
2494 {
2495 msg(
"Generating XML output for the main page\n");
2497 }
2498
2499
2500 t << "</doxygenindex>\n";
2501 }
2502
2505}
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()