2131{
2132
2133
2134
2135
2136
2137
2138
2139
2141 Dir xmlDir(outputDirectory.
str());
2143
2146
2147 QCString fileName=outputDirectory+
"/compound.xsd";
2149 if (!f.is_open())
2150 {
2151 err(
"Cannot open file {} for writing!\n",fileName);
2152 return;
2153 }
2154 {
2156
2157
2159 const char *startLine = compound_xsd.
data();
2160 while (*startLine)
2161 {
2162
2163 const char *endLine = startLine+1;
2164 while (*endLine && *(endLine-1)!='\n') endLine++;
2165 int len=static_cast<int>(endLine-startLine);
2166 if (len>0)
2167 {
2169 if (s.find("<!-- Automatically insert here the HTML entities -->")!=-1)
2170 {
2172 }
2173 else
2174 {
2175 t.write(startLine,len);
2176 }
2177 }
2178 startLine=endLine;
2179 }
2180 }
2181 f.close();
2182
2183 fileName=outputDirectory+"/doxyfile.xsd";
2185 if (!f.is_open())
2186 {
2187 err(
"Cannot open file {} for writing!\n",fileName);
2188 return;
2189 }
2190 {
2192
2193
2195 const char *startLine = doxyfile_xsd.
data();
2196 while (*startLine)
2197 {
2198
2199 const char *endLine = startLine+1;
2200 while (*endLine && *(endLine-1)!='\n') endLine++;
2201 int len=static_cast<int>(endLine-startLine);
2202 if (len>0)
2203 {
2205 if (s.find("<!-- Automatically insert here the configuration settings -->")!=-1)
2206 {
2208 }
2209 else
2210 {
2211 t.write(startLine,len);
2212 }
2213 }
2214 startLine=endLine;
2215 }
2216 }
2217 f.close();
2218
2219 fileName=outputDirectory+"/Doxyfile.xml";
2221 if (!f.is_open())
2222 {
2223 err(
"Cannot open file {} for writing\n",fileName);
2224 return;
2225 }
2226 else
2227 {
2230 }
2231 f.close();
2232
2233 fileName=outputDirectory+"/index.xml";
2235 if (!f.is_open())
2236 {
2237 err(
"Cannot open file {} for writing!\n",fileName);
2238 return;
2239 }
2240 else
2241 {
2243
2244
2245 t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";
2246 t << "<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
2247 t << "xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
2248 t << "version=\"" << getDoxygenVersion() << "\" ";
2250 t << ">\n";
2251
2253 {
2255 }
2257 {
2258 msg(
"Generating XML output for concept {}\n",cd->displayName());
2260 }
2262 {
2263 msg(
"Generating XML output for namespace {}\n",nd->displayName());
2265 }
2267 {
2268 for (const auto &fd : *fn)
2269 {
2270 msg(
"Generating XML output for file {}\n",fd->name());
2272 }
2273 }
2275 {
2276 msg(
"Generating XML output for group {}\n",gd->name());
2278 }
2280 {
2281 msg(
"Generating XML output for page {}\n",pd->name());
2283 }
2285 {
2286 msg(
"Generate XML output for dir {}\n",dd->name());
2288 }
2290 {
2291 msg(
"Generating XML output for module {}\n",mod->name());
2293 }
2295 {
2296 msg(
"Generating XML output for example {}\n",pd->name());
2298 }
2300 {
2301 msg(
"Generating XML output for the main page\n");
2303 }
2304
2305
2306 t << "</doxygenindex>\n";
2307 }
2308
2311}
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()