Doxygen
Loading...
Searching...
No Matches
qhp.cpp File Reference
#include <algorithm>
#include <memory>
#include <string.h>
#include <vector>
#include <cassert>
#include <mutex>
#include "config.h"
#include "debug.h"
#include "doxygen.h"
#include "groupdef.h"
#include "memberdef.h"
#include "message.h"
#include "qhp.h"
#include "textstream.h"
#include "util.h"
#include "portable.h"
#include "language.h"
#include "version.h"
+ Include dependency graph for qhp.cpp:

Go to the source code of this file.

Classes

class  QhpSectionTree
 
struct  QhpSectionTree::Node
 
class  Qhp::Private
 

Functions

static void writeIndent (TextStream &t, int indent)
 
static QCString getFullProjectName ()
 
static QCString makeFileName (const QCString &withoutExtension)
 
static QCString makeRef (const QCString &withoutExtension, const QCString &anchor)
 

Variables

static std::once_flag g_blankWritten
 

Function Documentation

◆ getFullProjectName()

static QCString getFullProjectName ( )
static

Definition at line 161 of file qhp.cpp.

162{
163 QCString projectName = Config_getString(PROJECT_NAME);
164 QCString versionText = Config_getString(PROJECT_NUMBER);
165 if (projectName.isEmpty()) projectName="Root";
166 if (!versionText.isEmpty()) projectName+=" "+versionText;
167 return projectName;
168}
This is an alternative implementation of QCString.
Definition qcstring.h:101
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
#define Config_getString(name)
Definition config.h:32

References Config_getString, and QCString::isEmpty().

Referenced by Qhp::initialize().

◆ makeFileName()

static QCString makeFileName ( const QCString & withoutExtension)
static

Definition at line 170 of file qhp.cpp.

171{
172 QCString result=withoutExtension;
173 if (!result.isEmpty())
174 {
175 if (result.at(0)=='!') // relative URL -> strip marker
176 {
177 result=result.mid(1);
178 }
179 else // add specified HTML extension
180 {
182 }
183 }
184 return result;
185}
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:226
char & at(size_t i)
Returns a reference to the character at index i.
Definition qcstring.h:578
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:5243

References addHtmlExtensionIfMissing(), QCString::at(), QCString::isEmpty(), and QCString::mid().

Referenced by makeRef().

◆ makeRef()

static QCString makeRef ( const QCString & withoutExtension,
const QCString & anchor )
static

Definition at line 187 of file qhp.cpp.

188{
189 //printf("QHP::makeRef(%s,%s)\n",withoutExtension,anchor);
190 if (withoutExtension.isEmpty()) return QCString();
191 QCString result = makeFileName(withoutExtension);
192 if (anchor.isEmpty()) return result;
193 return result+"#"+anchor;
194}
static QCString makeFileName(const QCString &withoutExtension)
Definition qhp.cpp:170

References QCString::isEmpty(), and makeFileName().

Referenced by Qhp::addContentsItem(), Crawlmap::addIndexItem(), and Qhp::addIndexItem().

◆ writeIndent()

static void writeIndent ( TextStream & t,
int indent )
inlinestatic

Definition at line 37 of file qhp.cpp.

38{
40 {
41 for (int i=0;i<indent;i++) t << " ";
42 }
43}
@ Qhp
Definition debug.h:43
static bool isFlagSet(const DebugMask mask)
Definition debug.cpp:135

References Debug::isFlagSet(), and Debug::Qhp.

Referenced by Qhp::addIndexItem(), Qhp::finalize(), generateXMLForPage(), Qhp::initialize(), QhpSectionTree::traverse(), HtmlGenerator::writeLocalToc(), and QhpSectionTree::writeToc().

Variable Documentation

◆ g_blankWritten

std::once_flag g_blankWritten
static

Definition at line 34 of file qhp.cpp.

Referenced by Qhp::addContentsItem().