|
Doxygen
|
A helper class for HtmlHelp that manages a two level index in alphabetical order. More...
Public Member Functions | |
| HtmlHelpIndex (HtmlHelpRecoder &recoder) | |
| ~HtmlHelpIndex () | |
| void | addItem (const DString &first, const DString &second, const DString &url, const DString &anchor, bool hasLink, bool reversed) |
| void | writeFields (std::ostream &t) |
| size_t | size () const |
Private Attributes | |
| LinkedMap< IndexField > | m_map |
| HtmlHelpRecoder & | m_recoder |
A helper class for HtmlHelp that manages a two level index in alphabetical order.
Definition at line 113 of file htmlhelp.cpp.
| HtmlHelpIndex::HtmlHelpIndex | ( | HtmlHelpRecoder & | recoder | ) |
Constructs a new HtmlHelp index
Definition at line 130 of file htmlhelp.cpp.
References m_recoder.
Referenced by ~HtmlHelpIndex().
|
default |
Destroys the HtmlHelp index
References addItem(), HtmlHelpIndex(), NON_COPYABLE, and writeFields().
| void HtmlHelpIndex::addItem | ( | const DString & | level1, |
| const DString & | level2, | ||
| const DString & | url, | ||
| const DString & | anchor, | ||
| bool | hasLink, | ||
| bool | reversed ) |
Stores an item in the index if it is not already present. Items are stored in alphabetical order, by sorting on the concatenation of level1 and level2 (if present).
| level1 | the string at level 1 in the index. |
| level2 | the string at level 2 in the index (or 0 if not applicable). |
| url | the url of the documentation (without .html extension). |
| anchor | the anchor of the documentation within the page. |
| hasLink | if true, the url (without anchor) can be used in the level1 item, when writing the header of a list of level2 items. |
| reversed | true if level1 is the member name and level2 the compound name. |
Definition at line 151 of file htmlhelp.cpp.
References LinkedMap< T, Hash, KeyEqual, Map >::add(), DString::empty(), m_map, reg::search(), DString::str(), and substitute().
Referenced by ~HtmlHelpIndex().
|
inline |
Definition at line 123 of file htmlhelp.cpp.
References m_map, and LinkedMap< T, Hash, KeyEqual, Map >::size().
Referenced by HtmlHelp::Private::createProjectFile().
| void HtmlHelpIndex::writeFields | ( | std::ostream & | t | ) |
Writes the sorted list of index items into a html like list.
An list of calls with name = level1,level2 as follows:
a1,b1 a1,b2 a2,b1 a2,b2 a3 a4,b1
Will result in the following list:
a1 -> link to url if hasLink==true
b1 -> link to url#anchor
b2 -> link to url#anchor
a2 -> link to url if hasLink==true
b1 -> link to url#anchor
b2 -> link to url#anchor
a3 -> link to url if hasLink==true
a4 -> link to url if hasLink==true
b1 -> link to url#anchor
Definition at line 234 of file htmlhelp.cpp.
References convertToHtml(), convertToHtmlAndTruncate(), dstricmp_sort(), DString::empty(), field2URL(), DString::left(), m_map, m_recoder, DString::mid(), DString::npos, and HtmlHelpRecoder::recode().
Referenced by ~HtmlHelpIndex().
|
private |
Definition at line 125 of file htmlhelp.cpp.
Referenced by addItem(), size(), and writeFields().
|
private |
Definition at line 126 of file htmlhelp.cpp.
Referenced by HtmlHelpIndex(), and writeFields().