2318{
2319
2320
2321
2322
2323
2324
2325
2326
2328 Dir xmlDir(outputDirectory.
str());
2330
2333
2334 QCString fileName=outputDirectory+
"/compound.xsd";
2336 if (!f.is_open())
2337 {
2338 err(
"Cannot open file {} for writing!\n",fileName);
2339 return;
2340 }
2341 {
2343
2344
2346 const char *startLine = compound_xsd.
data();
2347 while (*startLine)
2348 {
2349
2350 const char *endLine = startLine+1;
2351 while (*endLine && *(endLine-1)!='\n') endLine++;
2352 int len=static_cast<int>(endLine-startLine);
2353 if (len>0)
2354 {
2356 if (s.find("<!-- Automatically insert here the HTML entities -->")!=-1)
2357 {
2359 }
2360 else
2361 {
2362 t.write(startLine,len);
2363 }
2364 }
2365 startLine=endLine;
2366 }
2367 }
2368 f.close();
2369
2370 fileName=outputDirectory+"/doxyfile.xsd";
2372 if (!f.is_open())
2373 {
2374 err(
"Cannot open file {} for writing!\n",fileName);
2375 return;
2376 }
2377 {
2379
2380
2382 const char *startLine = doxyfile_xsd.
data();
2383 while (*startLine)
2384 {
2385
2386 const char *endLine = startLine+1;
2387 while (*endLine && *(endLine-1)!='\n') endLine++;
2388 int len=static_cast<int>(endLine-startLine);
2389 if (len>0)
2390 {
2392 if (s.find("<!-- Automatically insert here the configuration settings -->")!=-1)
2393 {
2395 }
2396 else
2397 {
2398 t.write(startLine,len);
2399 }
2400 }
2401 startLine=endLine;
2402 }
2403 }
2404 f.close();
2405
2406 fileName=outputDirectory+"/Doxyfile.xml";
2408 if (!f.is_open())
2409 {
2410 err(
"Cannot open file {} for writing\n",fileName);
2411 return;
2412 }
2413 else
2414 {
2417 }
2418 f.close();
2419
2420 fileName=outputDirectory+"/index.xml";
2422 if (!f.is_open())
2423 {
2424 err(
"Cannot open file {} for writing!\n",fileName);
2425 return;
2426 }
2427 else
2428 {
2430
2431
2432 t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";
2433 t << "<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
2434 t << "xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
2435 t << "version=\"" << getDoxygenVersion() << "\" ";
2437 t << ">\n";
2438
2440 {
2442 }
2444 {
2445 msg(
"Generating XML output for concept {}\n",cd->displayName());
2447 }
2449 {
2450 msg(
"Generating XML output for namespace {}\n",nd->displayName());
2452 }
2454 {
2455 for (const auto &fd : *fn)
2456 {
2457 msg(
"Generating XML output for file {}\n",fd->name());
2459 }
2460 }
2462 {
2463 msg(
"Generating XML output for group {}\n",gd->name());
2465 }
2467 {
2468 msg(
"Generating XML output for page {}\n",pd->name());
2470 }
2472 {
2473 if (req->getTagFile().isEmpty())
2474 {
2475 msg(
"Generating XML output for requirement {}\n", req->id());
2477 }
2478 }
2480 {
2481 msg(
"Generate XML output for dir {}\n",dd->name());
2483 }
2485 {
2486 msg(
"Generating XML output for module {}\n",mod->name());
2488 }
2490 {
2491 msg(
"Generating XML output for example {}\n",pd->name());
2493 }
2495 {
2496 msg(
"Generating XML output for the main page\n");
2498 }
2499
2500
2501 t << "</doxygenindex>\n";
2502 }
2503
2506}
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()