2271{
2272
2273
2274
2275
2276
2277
2278
2279
2281 Dir xmlDir(outputDirectory.
str());
2283
2286
2287 QCString fileName=outputDirectory+
"/compound.xsd";
2289 if (!f.is_open())
2290 {
2291 err(
"Cannot open file {} for writing!\n",fileName);
2292 return;
2293 }
2294 {
2296
2297
2299 const char *startLine = compound_xsd.
data();
2300 while (*startLine)
2301 {
2302
2303 const char *endLine = startLine+1;
2304 while (*endLine && *(endLine-1)!='\n') endLine++;
2305 int len=static_cast<int>(endLine-startLine);
2306 if (len>0)
2307 {
2309 if (s.find("<!-- Automatically insert here the HTML entities -->")!=-1)
2310 {
2312 }
2313 else
2314 {
2315 t.write(startLine,len);
2316 }
2317 }
2318 startLine=endLine;
2319 }
2320 }
2321 f.close();
2322
2323 fileName=outputDirectory+"/doxyfile.xsd";
2325 if (!f.is_open())
2326 {
2327 err(
"Cannot open file {} for writing!\n",fileName);
2328 return;
2329 }
2330 {
2332
2333
2335 const char *startLine = doxyfile_xsd.
data();
2336 while (*startLine)
2337 {
2338
2339 const char *endLine = startLine+1;
2340 while (*endLine && *(endLine-1)!='\n') endLine++;
2341 int len=static_cast<int>(endLine-startLine);
2342 if (len>0)
2343 {
2345 if (s.find("<!-- Automatically insert here the configuration settings -->")!=-1)
2346 {
2348 }
2349 else
2350 {
2351 t.write(startLine,len);
2352 }
2353 }
2354 startLine=endLine;
2355 }
2356 }
2357 f.close();
2358
2359 fileName=outputDirectory+"/Doxyfile.xml";
2361 if (!f.is_open())
2362 {
2363 err(
"Cannot open file {} for writing\n",fileName);
2364 return;
2365 }
2366 else
2367 {
2370 }
2371 f.close();
2372
2373 fileName=outputDirectory+"/index.xml";
2375 if (!f.is_open())
2376 {
2377 err(
"Cannot open file {} for writing!\n",fileName);
2378 return;
2379 }
2380 else
2381 {
2383
2384
2385 t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";
2386 t << "<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
2387 t << "xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
2388 t << "version=\"" << getDoxygenVersion() << "\" ";
2390 t << ">\n";
2391
2393 {
2395 }
2397 {
2398 msg(
"Generating XML output for concept {}\n",cd->displayName());
2400 }
2402 {
2403 msg(
"Generating XML output for namespace {}\n",nd->displayName());
2405 }
2407 {
2408 for (const auto &fd : *fn)
2409 {
2410 msg(
"Generating XML output for file {}\n",fd->name());
2412 }
2413 }
2415 {
2416 msg(
"Generating XML output for group {}\n",gd->name());
2418 }
2420 {
2421 msg(
"Generating XML output for page {}\n",pd->name());
2423 }
2425 {
2426 if (req->getTagFile().isEmpty())
2427 {
2428 msg(
"Generating XML output for requirement {}\n", req->id());
2430 }
2431 }
2433 {
2434 msg(
"Generate XML output for dir {}\n",dd->name());
2436 }
2438 {
2439 msg(
"Generating XML output for module {}\n",mod->name());
2441 }
2443 {
2444 msg(
"Generating XML output for example {}\n",pd->name());
2446 }
2448 {
2449 msg(
"Generating XML output for the main page\n");
2451 }
2452
2453
2454 t << "</doxygenindex>\n";
2455 }
2456
2459}
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()