2205{
2206
2207
2208
2209
2210
2211
2212
2213
2215 Dir xmlDir(outputDirectory.
str());
2217
2220
2221 QCString fileName=outputDirectory+
"/compound.xsd";
2223 if (!f.is_open())
2224 {
2225 err(
"Cannot open file {} for writing!\n",fileName);
2226 return;
2227 }
2228 {
2230
2231
2233 const char *startLine = compound_xsd.
data();
2234 while (*startLine)
2235 {
2236
2237 const char *endLine = startLine+1;
2238 while (*endLine && *(endLine-1)!='\n') endLine++;
2239 int len=static_cast<int>(endLine-startLine);
2240 if (len>0)
2241 {
2243 if (
s.find(
"<!-- Automatically insert here the HTML entities -->")!=-1)
2244 {
2246 }
2247 else
2248 {
2249 t.write(startLine,len);
2250 }
2251 }
2252 startLine=endLine;
2253 }
2254 }
2255 f.close();
2256
2257 fileName=outputDirectory+"/doxyfile.xsd";
2259 if (!f.is_open())
2260 {
2261 err(
"Cannot open file {} for writing!\n",fileName);
2262 return;
2263 }
2264 {
2266
2267
2269 const char *startLine = doxyfile_xsd.
data();
2270 while (*startLine)
2271 {
2272
2273 const char *endLine = startLine+1;
2274 while (*endLine && *(endLine-1)!='\n') endLine++;
2275 int len=static_cast<int>(endLine-startLine);
2276 if (len>0)
2277 {
2279 if (
s.find(
"<!-- Automatically insert here the configuration settings -->")!=-1)
2280 {
2282 }
2283 else
2284 {
2285 t.write(startLine,len);
2286 }
2287 }
2288 startLine=endLine;
2289 }
2290 }
2291 f.close();
2292
2293 fileName=outputDirectory+"/Doxyfile.xml";
2295 if (!f.is_open())
2296 {
2297 err(
"Cannot open file {} for writing\n",fileName);
2298 return;
2299 }
2300 else
2301 {
2304 }
2305 f.close();
2306
2307 fileName=outputDirectory+"/index.xml";
2309 if (!f.is_open())
2310 {
2311 err(
"Cannot open file {} for writing!\n",fileName);
2312 return;
2313 }
2314 else
2315 {
2317
2318
2319 t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";
2320 t << "<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
2321 t << "xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
2322 t << "version=\"" << getDoxygenVersion() << "\" ";
2324 t << ">\n";
2325
2327 {
2329 }
2331 {
2332 msg(
"Generating XML output for concept {}\n",cd->displayName());
2334 }
2336 {
2337 msg(
"Generating XML output for namespace {}\n",nd->displayName());
2339 }
2341 {
2342 for (const auto &fd : *fn)
2343 {
2344 msg(
"Generating XML output for file {}\n",fd->name());
2346 }
2347 }
2349 {
2350 msg(
"Generating XML output for group {}\n",gd->name());
2352 }
2354 {
2355 msg(
"Generating XML output for page {}\n",pd->name());
2357 }
2359 {
2360 msg(
"Generate XML output for dir {}\n",dd->name());
2362 }
2364 {
2365 msg(
"Generating XML output for module {}\n",mod->name());
2367 }
2369 {
2370 msg(
"Generating XML output for example {}\n",pd->name());
2372 }
2374 {
2375 msg(
"Generating XML output for the main page\n");
2377 }
2378
2379
2380 t << "</doxygenindex>\n";
2381 }
2382
2385}
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()