2137{
2138
2139
2140
2141
2142
2143
2144
2145
2147 Dir xmlDir(outputDirectory.
str());
2149
2152
2153 QCString fileName=outputDirectory+
"/compound.xsd";
2155 if (!f.is_open())
2156 {
2157 err(
"Cannot open file {} for writing!\n",fileName);
2158 return;
2159 }
2160 {
2162
2163
2165 const char *startLine = compound_xsd.
data();
2166 while (*startLine)
2167 {
2168
2169 const char *endLine = startLine+1;
2170 while (*endLine && *(endLine-1)!='\n') endLine++;
2171 int len=static_cast<int>(endLine-startLine);
2172 if (len>0)
2173 {
2175 if (s.find("<!-- Automatically insert here the HTML entities -->")!=-1)
2176 {
2178 }
2179 else
2180 {
2181 t.write(startLine,len);
2182 }
2183 }
2184 startLine=endLine;
2185 }
2186 }
2187 f.close();
2188
2189 fileName=outputDirectory+"/doxyfile.xsd";
2191 if (!f.is_open())
2192 {
2193 err(
"Cannot open file {} for writing!\n",fileName);
2194 return;
2195 }
2196 {
2198
2199
2201 const char *startLine = doxyfile_xsd.
data();
2202 while (*startLine)
2203 {
2204
2205 const char *endLine = startLine+1;
2206 while (*endLine && *(endLine-1)!='\n') endLine++;
2207 int len=static_cast<int>(endLine-startLine);
2208 if (len>0)
2209 {
2211 if (s.find("<!-- Automatically insert here the configuration settings -->")!=-1)
2212 {
2214 }
2215 else
2216 {
2217 t.write(startLine,len);
2218 }
2219 }
2220 startLine=endLine;
2221 }
2222 }
2223 f.close();
2224
2225 fileName=outputDirectory+"/Doxyfile.xml";
2227 if (!f.is_open())
2228 {
2229 err(
"Cannot open file {} for writing\n",fileName);
2230 return;
2231 }
2232 else
2233 {
2236 }
2237 f.close();
2238
2239 fileName=outputDirectory+"/index.xml";
2241 if (!f.is_open())
2242 {
2243 err(
"Cannot open file {} for writing!\n",fileName);
2244 return;
2245 }
2246 else
2247 {
2249
2250
2251 t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";
2252 t << "<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
2253 t << "xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
2254 t << "version=\"" << getDoxygenVersion() << "\" ";
2256 t << ">\n";
2257
2259 {
2261 }
2263 {
2264 msg(
"Generating XML output for concept {}\n",cd->displayName());
2266 }
2268 {
2269 msg(
"Generating XML output for namespace {}\n",nd->displayName());
2271 }
2273 {
2274 for (const auto &fd : *fn)
2275 {
2276 msg(
"Generating XML output for file {}\n",fd->name());
2278 }
2279 }
2281 {
2282 msg(
"Generating XML output for group {}\n",gd->name());
2284 }
2286 {
2287 msg(
"Generating XML output for page {}\n",pd->name());
2289 }
2291 {
2292 msg(
"Generate XML output for dir {}\n",dd->name());
2294 }
2296 {
2297 msg(
"Generating XML output for module {}\n",mod->name());
2299 }
2301 {
2302 msg(
"Generating XML output for example {}\n",pd->name());
2304 }
2306 {
2307 msg(
"Generating XML output for the main page\n");
2309 }
2310
2311
2312 t << "</doxygenindex>\n";
2313 }
2314
2317}
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()