51 if (!
p->docFile.is_open())
53 term(
"Could not open file %s for writing\n",
qPrint(fileName));
55 p->doc.setStream(&
p->docFile);
57 p->doc <<
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
58 p->doc <<
"<urlset\n";
59 p->doc <<
" xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"\n";
60 p->doc <<
" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n";
61 p->doc <<
" xsi:schemaLocation=\"http://www.sitemaps.org/schemas/sitemap/0.9\n";
62 p->doc <<
" http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd\">\n";
67 p->doc <<
"</urlset>\n";
74 QCString fn = fileName;
78 p->doc <<
" <loc>" <<
convertToXML(sidemapUrl + fn) <<
"</loc>\n";
79 p->doc <<
" </url>\n";
100 if (!
p->crawlFile.is_open())
102 term(
"Could not open file %s for writing\n",
qPrint(fileName));
104 p->crawl.setStream(&
p->crawlFile);
105 p->crawl <<
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
107 p->crawl <<
"<head>\n";
108 p->crawl <<
"<title>Validator / crawler helper</title>\n";
109 p->crawl <<
"<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n";
110 p->crawl <<
"<meta http-equiv=\"X-UA-Compatible\" content=\"IE=11\"/>\n";
112 p->crawl <<
"<meta name=\"generator\" content=\"Doxygen " + getDoxygenVersion() +
"\"/>\n";
113 p->crawl <<
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>\n";
114 p->crawl <<
"</head>\n";
115 p->crawl <<
"<body>\n";
120 std::sort(
p->crawlLinks.begin(),
p->crawlLinks.end());
121 p->crawlLinks.erase(std::unique(
p->crawlLinks.begin(),
p->crawlLinks.end()),
p->crawlLinks.end());
122 for (
auto &s :
p->crawlLinks)
124 p->crawl <<
"<a href=\"" << s <<
"\"/>\n";
127 p->crawl <<
"</body>\n";
128 p->crawl <<
"</html>\n";
130 p->crawlFile.close();
135 QCString fn = fileName;
137 p->crawlLinks.push_back(fn.
str());
150 if (file[0]==
'!' || file[0]==
'^')
156 QCString currFile = file;
158 QCString currAnc = anchor;
159 link += currFile.
data();
163 link += currAnc.
str();
166 p->crawlLinks.push_back(link);
175 if (result.
at(0)==
'!')
177 result=result.
mid(1);
191 if (anchor.
isEmpty())
return result;
192 return result+
"#"+anchor;
201 QCString anchor = !sectionAnchor.
isEmpty() ? sectionAnchor : md->
anchor();
202 QCString ref =
makeRef(cfname, anchor);
203 p->crawlLinks.push_back(ref.
str());
208 QCString ref =
makeRef(contRef,sectionAnchor);
209 p->crawlLinks.push_back(ref.
str());
std::unique_ptr< Private > p
void addContentsItem(bool isDir, const QCString &name, const QCString &ref, const QCString &file, const QCString &anchor, bool separateIndex, bool addToNavIndex, const Definition *def)
void addIndexFile(const QCString &name)
void addIndexItem(const Definition *context, const MemberDef *md, const QCString §ionAnchor, const QCString &title)
static const QCString crawlFileName
The common base class of all entity definitions found in the sources.
virtual QCString anchor() const =0
virtual QCString getOutputFileBase() const =0
A model of a class/file/namespace member symbol.
This is an alternative implementation of QCString.
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
char & at(size_t i)
Returns a reference to the character at index i.
bool isEmpty() const
Returns TRUE iff the string is empty.
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 const QCString sitemapFileName
std::unique_ptr< Private > p
void addIndexFile(const QCString &name)
virtual QCString trISOLang()=0
#define Config_getString(name)
std::vector< std::string > StringVector
Translator * theTranslator
std::ofstream openOutputStream(const QCString &name, bool append=false)
Portable versions of functions that are platform dependent.
const char * qPrint(const char *s)
static QCString makeRef(const QCString &withoutExtension, const QCString &anchor)
static QCString makeRef(const QCString &withoutExtension, const QCString &anchor)
static QCString makeFileName(const QCString &withoutExtension)
QCString convertToXML(const QCString &s, bool keepEntities)
void addHtmlExtensionIfMissing(QCString &fName)
A bunch of utility functions.