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