2232{
2233
2234
2235
2236
2237
2238
2239
2240
2242 Dir xmlDir(outputDirectory.
str());
2244
2247
2248 QCString fileName=outputDirectory+
"/compound.xsd";
2250 if (!f.is_open())
2251 {
2252 err(
"Cannot open file {} for writing!\n",fileName);
2253 return;
2254 }
2255 {
2257
2258
2260 const char *startLine = compound_xsd.
data();
2261 while (*startLine)
2262 {
2263
2264 const char *endLine = startLine+1;
2265 while (*endLine && *(endLine-1)!='\n') endLine++;
2266 int len=static_cast<int>(endLine-startLine);
2267 if (len>0)
2268 {
2270 if (s.find("<!-- Automatically insert here the HTML entities -->")!=-1)
2271 {
2273 }
2274 else
2275 {
2276 t.write(startLine,len);
2277 }
2278 }
2279 startLine=endLine;
2280 }
2281 }
2282 f.close();
2283
2284 fileName=outputDirectory+"/doxyfile.xsd";
2286 if (!f.is_open())
2287 {
2288 err(
"Cannot open file {} for writing!\n",fileName);
2289 return;
2290 }
2291 {
2293
2294
2296 const char *startLine = doxyfile_xsd.
data();
2297 while (*startLine)
2298 {
2299
2300 const char *endLine = startLine+1;
2301 while (*endLine && *(endLine-1)!='\n') endLine++;
2302 int len=static_cast<int>(endLine-startLine);
2303 if (len>0)
2304 {
2306 if (s.find("<!-- Automatically insert here the configuration settings -->")!=-1)
2307 {
2309 }
2310 else
2311 {
2312 t.write(startLine,len);
2313 }
2314 }
2315 startLine=endLine;
2316 }
2317 }
2318 f.close();
2319
2320 fileName=outputDirectory+"/Doxyfile.xml";
2322 if (!f.is_open())
2323 {
2324 err(
"Cannot open file {} for writing\n",fileName);
2325 return;
2326 }
2327 else
2328 {
2331 }
2332 f.close();
2333
2334 fileName=outputDirectory+"/index.xml";
2336 if (!f.is_open())
2337 {
2338 err(
"Cannot open file {} for writing!\n",fileName);
2339 return;
2340 }
2341 else
2342 {
2344
2345
2346 t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";
2347 t << "<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
2348 t << "xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
2349 t << "version=\"" << getDoxygenVersion() << "\" ";
2351 t << ">\n";
2352
2354 {
2356 }
2358 {
2359 msg(
"Generating XML output for concept {}\n",cd->displayName());
2361 }
2363 {
2364 msg(
"Generating XML output for namespace {}\n",nd->displayName());
2366 }
2368 {
2369 for (const auto &fd : *fn)
2370 {
2371 msg(
"Generating XML output for file {}\n",fd->name());
2373 }
2374 }
2376 {
2377 msg(
"Generating XML output for group {}\n",gd->name());
2379 }
2381 {
2382 msg(
"Generating XML output for page {}\n",pd->name());
2384 }
2386 {
2387 msg(
"Generate XML output for dir {}\n",dd->name());
2389 }
2391 {
2392 msg(
"Generating XML output for module {}\n",mod->name());
2394 }
2396 {
2397 msg(
"Generating XML output for example {}\n",pd->name());
2399 }
2401 {
2402 msg(
"Generating XML output for the main page\n");
2404 }
2405
2406
2407 t << "</doxygenindex>\n";
2408 }
2409
2412}
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 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 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()