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