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