73 if (hiPriority) ui->
freq|=1;
94 QCString url=isSourceFile ? ((
FileDef*)ctx)->getSourceFileBase() : ctx->getOutputFileBase();
97 if (anchor) url+=
QCString(
"#")+anchor;
98 if (!isSourceFile) baseUrl=
url;
115 switch (ctx->definitionType())
185 if (word==0)
return -1;
199 if (c1==0)
return -1;
201 if (c2==0)
return -1;
207 static QRegExp nextPart(
"[_a-z:][A-Z]");
208 if (word==0 || word[0]==
'\0')
return;
235 if ((i=nextPart.
match(word))>=1)
258 while (*p) f.
putch(*p++);
267 int wordsOffset =
size;
287 int offset=wordsOffset;
293 indexOffsets[i]=offset;
310 padding = size - padding;
314 int *wordStatOffsets =
new int[
m_words.count()];
329 wordStatOffsets[count++] =
size;
367 writeInt(f,wordStatOffsets[count++]);
373 for (i=0;i<padding;i++) f.
putch(0);
388 for (uli.toFirst();(ui=uli.
current());++uli)
407 delete[] wordStatOffsets;
480 return ((
ClassDef*)ctx)->compoundTypeString();
505 if (anchor) url+=
QCString(
"#")+anchor;
514 e->
name = ctx->qualifiedName();
542 t <<
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>" <<
endl;
543 t <<
"<add>" <<
endl;
546 for (it.toFirst();(doc=it.current());++it)
550 t <<
" <doc>" <<
endl;
551 t <<
" <field name=\"type\">" << doc->
type <<
"</field>" <<
endl;
564 t <<
" </doc>" <<
endl;
566 t <<
"</add>" <<
endl;
570 err(
"Failed to open file %s for writing!\n",fileName);
590 static bool hideFriendCompounds =
Config_getBool(
"HIDE_FRIEND_COMPOUNDS");
607 bool isFriendToHide = hideFriendCompounds &&
611 if (!(md->
isFriend() && isFriendToHide))
644 (md->
isFriend() && !isFriendToHide))
650 else if (isLinkable &&
697 for (i=0;i<s.
length();i++)
706 result+=(char)tolower(c);
711 sprintf(val,
"_%02x",(
uchar)c);
759 for (;(cd=cli.current());++
cli)
772 for (;(nd=nli.current());++nli)
785 for (;(fn=fnli.
current());++fnli)
789 for (;(fd=fni.
current());++fni)
805 for (mnli.toFirst();(mn=mnli.current());++mnli)
822 for (fnli.toFirst();(mn=fnli.current());++fnli)
837 for (gli.toFirst();(gd=gli.current());++gli)
845 uint letter = charCode<128 ? tolower(charCode) : charCode;
858 for (pdi.toFirst();(pd=pdi.current());++pdi)
866 uint letter = charCode<128 ? tolower(charCode) : charCode;
881 uint letter = charCode<128 ? tolower(charCode) : charCode;
896 for (it.toFirst();(sl=it.current());++it)
914 for (it.toFirst();(sl=it.current());++it,++
p)
920 QCString dataFileName = searchDirName +
"/"+baseName+
".js";
923 QFile dataOutFile(dataFileName);
929 t <<
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"" 930 " \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" <<
endl;
931 t <<
"<html><head><title></title>" <<
endl;
932 t <<
"<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>" <<
endl;
933 t <<
"<meta name=\"generator\" content=\"Doxygen " <<
versionString <<
"\"/>" <<
endl;
934 t <<
"<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>" <<
endl;
935 t <<
"<script type=\"text/javascript\" src=\"" << baseName <<
".js\"></script>" <<
endl;
936 t <<
"<script type=\"text/javascript\" src=\"search.js\"></script>" <<
endl;
937 t <<
"</head>" <<
endl;
938 t <<
"<body class=\"SRPage\">" <<
endl;
939 t <<
"<div id=\"SRIndex\">" <<
endl;
941 t <<
"<div id=\"SRResults\"></div>" <<
endl;
942 t <<
"<script type=\"text/javascript\"><!--" <<
endl;
943 t <<
"createResults();" <<
endl;
944 t <<
"--></script>" <<
endl;
945 t <<
"<div class=\"SRStatus\" id=\"Searching\">" 947 t <<
"<div class=\"SRStatus\" id=\"NoMatches\">" 950 t <<
"<script type=\"text/javascript\"><!--" <<
endl;
951 t <<
"document.getElementById(\"Loading\").style.display=\"none\";" <<
endl;
952 t <<
"document.getElementById(\"NoMatches\").style.display=\"none\";" <<
endl;
953 t <<
"var searchResults = new SearchResults(\"searchResults\");" <<
endl;
954 t <<
"searchResults.Search();" <<
endl;
955 t <<
"--></script>" <<
endl;
956 t <<
"</div>" <<
endl;
957 t <<
"</body>" <<
endl;
958 t <<
"</html>" <<
endl;
962 ti <<
"var searchData=" <<
endl;
974 bool firstEntry=
TRUE;
979 for (li.toFirst();(dl=li.current());++li)
1002 ti <<
"#" << anchor;
1006 static bool extLinksInWindow =
Config_getBool(
"EXT_LINKS_IN_WINDOW");
1038 bool overloadedFunction =
FALSE;
1061 ti <<
"#" << anchor;
1065 static bool extLinksInWindow =
Config_getBool(
"EXT_LINKS_IN_WINDOW");
1075 overloadedFunction = ((prevScope!=0 && scope==prevScope) ||
1076 (scope && scope==nextScope)
1081 if (overloadedFunction)
1109 if (!prefix.
isEmpty()) prefix+=
": ";
1133 ti <<
"'" << name <<
"'";
1154 err(
"Failed to open file '%s' for writing...\n",fileName.
data());
1160 QFile f(searchDirName+
"/searchdata.js");
1164 t <<
"var indexSectionsWithContent =" <<
endl;
1170 if (g_searchIndexInfo[i].symbolList.count()>0)
1172 if (!first) t <<
"," <<
endl;
1173 t <<
" " << j <<
": \"";
1177 for (it.toFirst();(sl=it.current());++it)
1186 if (!first) t <<
"\n";
1187 t <<
"};" << endl <<
endl;
1188 t <<
"var indexSectionNames =" <<
endl;
1194 if (g_searchIndexInfo[i].symbolList.count()>0)
1196 if (!first) t <<
"," <<
endl;
1197 t <<
" " << j <<
": \"" << g_searchIndexInfo[i].
name <<
"\"";
1202 if (!first) t <<
"\n";
1203 t <<
"};" << endl <<
endl;
1204 t <<
"var indexSectionLabels =" <<
endl;
1210 if (g_searchIndexInfo[i].symbolList.count()>0)
1212 if (!first) t <<
"," <<
endl;
1213 t <<
" " << j <<
": \"" <<
convertToXML(g_searchIndexInfo[i].text) <<
"\"";
1218 if (!first) t <<
"\n";
1219 t <<
"};" << endl <<
endl;
1224 QFile f(searchDirName+
"/nomatches.html");
1228 t <<
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" " 1229 "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" <<
endl;
1230 t <<
"<html><head><title></title>" <<
endl;
1231 t <<
"<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>" <<
endl;
1232 t <<
"<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>" <<
endl;
1233 t <<
"<script type=\"text/javascript\" src=\"search.js\"></script>" <<
endl;
1234 t <<
"</head>" <<
endl;
1235 t <<
"<body class=\"SRPage\">" <<
endl;
1236 t <<
"<div id=\"SRIndex\">" <<
endl;
1237 t <<
"<div class=\"SRStatus\" id=\"NoMatches\">" 1239 t <<
"</div>" <<
endl;
1240 t <<
"</body>" <<
endl;
1241 t <<
"</html>" <<
endl;
1272 dispName = ((
GroupDef*)d)->groupTitle();
1276 dispName = ((
PageDef*)d)->title();
1301 static bool serverBasedSearch =
Config_getBool(
"SERVER_BASED_SEARCH");
1303 if (searchEngine && serverBasedSearch)
QCString convertToXML(const char *s)
virtual QCString trTypedefs()=0
static GroupSDict * groupSDict
static MemberNameSDict * functionNameSDict
virtual QCString trClasses()=0
void addWord(const char *word, bool hiPriority)
virtual QCString trFile(bool first_capital, bool singular)=0
void write(const char *file)
virtual QCString getReference() const
void addStr(const char *s)
The QRegExp class provides pattern matching using regular expressions or wildcards.
#define SEARCH_INDEX_EVENTS
virtual QCString trEnumerationValues()=0
void append(const type *d)
static QCString htmlFileExtension
static int charsToIndex(const char *word)
virtual QCString trNoMatches()=0
virtual QCString trFriends()=0
void write(const char *file)
FileDef * getBodyDef() const
QCString compoundTypeString() const
QVector< QList< IndexWord > > m_index
static FileNameList * inputNameList
bool copyResource(const char *name, const char *targetDir) const
static ResourceMgr & instance()
#define SEARCH_INDEX_PROPERTIES
static void addMemberToSearchIndex(MemberDef *md)
QIntDict< URLInfo > m_urls
#define SEARCH_INDEX_VARIABLES
static QCString stripPath(const QCString &s)
int compareValues(const SearchDefinitionList *md1, const SearchDefinitionList *md2) const
#define SEARCH_INDEX_GROUPS
uint getUtf8CodeToLower(const QCString &s, int idx)
Returns one unicode character as an unsigned integer from utf-8 string, making the character lower ca...
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
Simplified and optimized version of QTextStream.
virtual QCString getOutputFileBase() const =0
const char * groupTitle() const
SearchIndexList(uint letter)
The QChar class provides a light-weight Unicode character.
void append(const char *key, const T *d)
virtual QCString trModule(bool first_capital, bool singular)=0
IndexWord(const char *word)
virtual QCString trSubprogram(bool first_capital, bool singular)=0
virtual QCString trLoading()=0
static void writeString(QFile &f, const char *s)
#define SEARCH_INDEX_RELATED
void setAutoDelete(bool val)
void append(Definition *d)
FileDef * getFileDef() const
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
static NamespaceSDict * namespaceSDict
static NamespaceDef * globalScope
virtual QCString trGlobalNamespace()=0
ClassDef * templateMaster() const
virtual DefType definitionType() const =0
const char * typeString() const
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
static SearchIndexIntf * searchIndex
void insert(long k, const type *d)
const QCString & name() const
int qstricmp(const char *str1, const char *str2)
void createJavascriptSearchIndex()
static QCString definitionToName(Definition *ctx)
virtual QCString trVariables()=0
void finializeSearchIndexer()
SrcLangExt getLanguage() const
void addStyleSheetFile(const char *name)
QCString & prepend(const char *s)
virtual QCString trFunctions()=0
#define SEARCH_INDEX_PAGES
#define SEARCH_INDEX_FILES
A bunch of utility functions.
static PageSDict * pageSDict
const char * data() const
#define SEARCH_INDEX_ENUMS
static SearchIndexInfo g_searchIndexInfo[NUM_SEARCH_INDICES]
#define Config_getString(val)
static QCString searchId(const QCString &s)
#define Config_getBool(val)
ClassDef * getClassDef() const
virtual QCString trGroup(bool first_capital, bool singular)=0
int getPrefixIndex(const QCString &name)
virtual QCString qualifiedName() const
const int numIndexEntries
void err(const char *fmt,...)
#define SEARCH_INDEX_NAMESPACES
SDict< SearchDocEntry > docEntries
#define SEARCH_INDEX_TYPEDEFS
virtual QCString trEnumerations()=0
void addWord(const char *word, bool hiPriority)
virtual QCString trAll()=0
int match(const QCString &str, int index=0, int *len=0, bool indexIsStart=TRUE) const
The QFile class is an I/O device that operates on files.
virtual QCString trPage(bool first_capital, bool singular)=0
void setAutoDelete(bool enable)
QCString & sprintf(const char *format,...)
void setCurrentDoc(Definition *ctx, const char *anchor, bool isSourceFile)
virtual QCString trEvents()=0
virtual Definition * getOuterScope() const
GroupDef * getGroupDef() const
virtual QCString trPackage(const char *name)=0
#define NUM_SEARCH_INDICES
static MemberNameSDict * memberNameSDict
const QIntDict< URLInfo > & urls() const
A model of a page symbol.
void append(uint letter, typename T::ElementType *elem)
virtual QCString trNamespace(bool first_capital, bool singular)=0
static void writeInt(QFile &f, int index)
#define SEARCH_INDEX_DEFINES
#define SEARCH_INDEX_FUNCTIONS
void setCurrentDoc(Definition *ctx, const char *anchor, bool isSourceFile)
NamespaceDef * getNamespaceDef() const
Translator * theTranslator
QDict< IndexWord > m_words
void addUrlIndex(int, bool)
void writeJavascriptSearchIndex()
virtual QCString trProperties()=0
LetterToIndexMap< SearchIndexList > symbolList
virtual QCString trSearching()=0
#define SEARCH_INDEX_ENUMVALUES
const char * argsString() const
#define SEARCH_INDEX_CLASSES
T * find(const char *key)
const SearchIndexInfo * getSearchIndices()
static ClassSDict * classSDict
static PageDef * mainPage
virtual QCString trMember(bool first_capital, bool singular)=0
QCString localName() const
union ptb::content::word::word word
static IndexList * indexList
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
virtual QCString anchor() const =0
type * find(long k) const
QTextStream & endl(QTextStream &s)
bool insert(uint i, const type *d)
QCString externalRef(const QCString &relPath, const QCString &ref, bool href)
virtual QCString trDefines()=0