Doxygen
|
Citation manager class. More...
#include <src/cite.h>
Classes | |
struct | Private |
Public Member Functions | |
void | insert (const QCString &label) |
Insert a citation identified by label into the database. | |
const CiteInfo * | find (const QCString &label) const |
Return the citation info for a given label. | |
void | generatePage () |
Generate the citations page. | |
void | clear () |
clears the database | |
bool | isEmpty () const |
return TRUE if there are no citations. | |
QCString | latexBibFiles () |
lists the bibtex cite files in a comma separated list | |
QCString | fileName () const |
QCString | anchorPrefix () const |
Static Public Member Functions | |
static CitationManager & | instance () |
Private Member Functions | |
CitationManager () | |
Create the database, with an expected maximum of size entries. | |
~CitationManager ()=default | |
void | insertCrossReferencesForBibFile (const QCString &bibFile) |
QCString | getFormulas (const QCString &s) |
QCString | replaceFormulas (const QCString &s) |
Private Attributes | |
std::unique_ptr< Private > | p |
Citation manager class.
This class provides access do the database of bibliographic references through the bibtex backend.
|
private |
Create the database, with an expected maximum of size entries.
Definition at line 86 of file cite.cpp.
References p.
Referenced by instance().
|
privatedefault |
QCString CitationManager::anchorPrefix | ( | ) | const |
Definition at line 122 of file cite.cpp.
Referenced by DocAnchor::DocAnchor(), DocCite::DocCite(), LatexDocVisitor::operator()(), and TextDocVisitor::operator()().
void CitationManager::clear | ( | ) |
clears the database
Definition at line 106 of file cite.cpp.
References p.
Referenced by clearAll().
QCString CitationManager::fileName | ( | ) | const |
Definition at line 117 of file cite.cpp.
Referenced by DocAnchor::DocAnchor(), DocCite::DocCite(), and generatePage().
Return the citation info for a given label.
Ownership of the info stays with the manager.
Definition at line 96 of file cite.cpp.
References QCString::lower(), p, and QCString::str().
Referenced by DocAnchor::DocAnchor(), DocCite::DocCite(), and insertCrossReferencesForBibFile().
void CitationManager::generatePage | ( | ) |
Generate the citations page.
Definition at line 327 of file cite.cpp.
References addRelatedPage(), bibTmpDir, bibTmpFile, Debug::Cite, Config_getBool, Config_getList, Config_getString, copyFile(), ResourceMgr::copyResource(), Dir::currentDirPath(), Entry::doc, err, Dir::exists(), FileInfo::exists(), FALSE, fileName(), QCString::find(), getBibFile(), getFormulas(), insertCrossReferencesForBibFile(), ResourceMgr::instance(), isEmpty(), QCString::isEmpty(), Debug::isFlagSet(), QCString::left(), QCString::length(), QCString::lower(), QCString::mid(), Dir::mkdir(), Portable::openInputStream(), Portable::openOutputStream(), p, CommentScanner::parseCommentBlock(), Public, qPrint(), Dir::remove(), replaceFormulas(), QCString::right(), Dir::rmdir(), Dir::setCurrent(), QCString::setNum(), QCString::str(), Portable::system(), theTranslator, Translator::trCiteReferences(), and TRUE.
Referenced by parseInput().
Definition at line 232 of file cite.cpp.
References GrowBuf::addChar(), GrowBuf::addStr(), GrowBuf::clear(), QCString::data(), g_formulaMarker, GrowBuf::get(), QCString::isEmpty(), p, and qsnprintf.
Referenced by generatePage().
void CitationManager::insert | ( | const QCString & | label | ) |
Insert a citation identified by label into the database.
Definition at line 90 of file cite.cpp.
References QCString::lower(), p, and QCString::str().
Referenced by addCite(), and insertCrossReferencesForBibFile().
|
private |
Definition at line 127 of file cite.cpp.
References err, FileInfo::exists(), find(), QCString::find(), insert(), QCString::isEmpty(), lineCount, QCString::lower(), QCString::mid(), Portable::openInputStream(), p, qPrint(), QCString::startsWith(), QCString::str(), QCString::stripWhiteSpace(), and warn.
Referenced by generatePage().
|
static |
Definition at line 80 of file cite.cpp.
References CitationManager().
Referenced by addCite(), clearAll(), DocAnchor::DocAnchor(), DocCite::DocCite(), LatexDocVisitor::operator()(), TextDocVisitor::operator()(), parseInput(), substituteLatexKeywords(), writeLatexMakefile(), and writeMakeBat().
bool CitationManager::isEmpty | ( | ) | const |
return TRUE if there are no citations.
Definition at line 111 of file cite.cpp.
References Config_getList, and p.
Referenced by generatePage(), substituteLatexKeywords(), writeLatexMakefile(), and writeMakeBat().
QCString CitationManager::latexBibFiles | ( | ) |
lists the bibtex cite files in a comma separated list
Definition at line 559 of file cite.cpp.
References bibTmpFile, Config_getList, FileInfo::exists(), getBibFile(), QCString::isEmpty(), QCString::setNum(), and QCString::str().
Referenced by substituteLatexKeywords().
Definition at line 307 of file cite.cpp.
References QCString::data(), QCString::find(), g_formulaMarker, QCString::isEmpty(), QCString::mid(), and p.
Referenced by generatePage().
|
private |
Definition at line 78 of file cite.h.
Referenced by CitationManager(), clear(), find(), generatePage(), getFormulas(), insert(), insertCrossReferencesForBibFile(), isEmpty(), and replaceFormulas().