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