Doxygen
HtmlHelp::Private类 参考
+ HtmlHelp::Private 的协作图:

Public 成员函数

 Private ()
 
void createProjectFile ()
 

Public 属性

std::ofstream cts
 
std::ofstream kts
 
bool ctsItemPresent = false
 
int dc = 0
 
StringSet indexFiles
 
StringSet imageFiles
 
HtmlHelpRecoder recoder
 
HtmlHelpIndex index
 

详细描述

在文件 htmlhelp.cpp313 行定义.

构造及析构函数说明

◆ Private()

HtmlHelp::Private::Private ( )
inline

在文件 htmlhelp.cpp316 行定义.

316 : index(recoder) {}

成员函数说明

◆ createProjectFile()

void HtmlHelp::Private::createProjectFile ( )

在文件 htmlhelp.cpp496 行定义.

497 {
498  /* Write the project file */
499  QCString fName = Config_getString(HTML_OUTPUT) + "/index.hhp";
500  std::ofstream t(fName.str(),std::ofstream::out | std::ofstream::binary);
501  if (t.is_open())
502  {
503  const char *hhcFile = "\"index.hhc\"";
504  const char *hhkFile = "\"index.hhk\"";
505  bool hhkPresent = index.size()>0;
506  if (!ctsItemPresent) hhcFile = "";
507  if (!hhkPresent) hhkFile = "";
508 
509  QCString indexName="index"+Doxygen::htmlFileExtension;
510  t << "[OPTIONS]\n";
511  if (!Config_getString(CHM_FILE).isEmpty())
512  {
513  t << "Compiled file=" << Config_getString(CHM_FILE) << "\n";
514  }
515  t << "Compatibility=1.1\n"
516  "Full-text search=Yes\n";
517  if (ctsItemPresent) t << "Contents file=index.hhc\n";
518  t << "Default Window=main\n"
519  "Default topic=" << indexName << "\n";
520  if (hhkPresent) t << "Index file=index.hhk\n";
521  t << "Language=" << getLanguageString() << "\n";
522  if (Config_getBool(BINARY_TOC)) t << "Binary TOC=YES\n";
523  if (Config_getBool(GENERATE_CHI)) t << "Create CHI file=YES\n";
524  t << "Title=" << recoder.recode(Config_getString(PROJECT_NAME)) << "\n\n";
525 
526  t << "[WINDOWS]\n";
527 
528  // NOTE: the 0x10387e number is a set of bits specifying the buttons
529  // which should appear in the CHM viewer; that specific value
530  // means "show all buttons including the font-size one";
531  // the font-size one is not normally settable by the HTML Help Workshop
532  // utility but the way to set it is described here:
533  // http://support.microsoft.com/?scid=kb%3Ben-us%3B240062&x=17&y=18
534  // NOTE: the 0x70387e number in addition to the above the Next and Prev button
535  // are shown. They can only be shown in case of a binary toc.
536  // dee http://www.mif2go.com/xhtml/htmlhelp_0016_943addingtabsandtoolbarbuttonstohtmlhelp.htm#Rz108x95873
537  // Value has been taken from htmlhelp.h file of the HTML Help Workshop
538  if (Config_getBool(BINARY_TOC))
539  {
540  t << "main=\"" << recoder.recode(Config_getString(PROJECT_NAME)) << "\"," << hhcFile << ","
541  << hhkFile << ",\"" << indexName << "\",\"" <<
542  indexName << "\",,,,,0x23520,,0x70387e,,,,,,,,0\n\n";
543  }
544  else
545  {
546  t << "main=\"" << recoder.recode(Config_getString(PROJECT_NAME)) << "\"," << hhcFile << ","
547  << hhkFile << ",\"" << indexName << "\",\"" <<
548  indexName << "\",,,,,0x23520,,0x10387e,,,,,,,,0\n\n";
549  }
550 
551  t << "[FILES]\n";
552  for (auto &s : indexFiles)
553  {
554  t << s.c_str() << "\n";
555  }
556  for (auto &s : imageFiles)
557  {
558  t << s.c_str() << "\n";
559  }
560  t.close();
561  }
562  else
563  {
564  err("Could not open file %s for writing\n",qPrint(fName));
565  }
566 }

引用了 Config_getBool, Config_getString, ctsItemPresent, err(), HtmlHelp::getLanguageString(), Doxygen::htmlFileExtension, imageFiles, index, indexFiles, qPrint(), HtmlHelpRecoder::recode(), recoder, HtmlHelpIndex::size() , 以及 QCString::str().

类成员变量说明

◆ cts

std::ofstream HtmlHelp::Private::cts

在文件 htmlhelp.cpp318 行定义.

◆ ctsItemPresent

bool HtmlHelp::Private::ctsItemPresent = false

在文件 htmlhelp.cpp319 行定义.

被这些函数引用 createProjectFile().

◆ dc

int HtmlHelp::Private::dc = 0

在文件 htmlhelp.cpp320 行定义.

◆ imageFiles

StringSet HtmlHelp::Private::imageFiles

在文件 htmlhelp.cpp322 行定义.

被这些函数引用 createProjectFile().

◆ index

HtmlHelpIndex HtmlHelp::Private::index

在文件 htmlhelp.cpp324 行定义.

被这些函数引用 createProjectFile().

◆ indexFiles

StringSet HtmlHelp::Private::indexFiles

在文件 htmlhelp.cpp321 行定义.

被这些函数引用 createProjectFile().

◆ kts

std::ofstream HtmlHelp::Private::kts

在文件 htmlhelp.cpp318 行定义.

◆ recoder

HtmlHelpRecoder HtmlHelp::Private::recoder

在文件 htmlhelp.cpp323 行定义.

被这些函数引用 createProjectFile().


该类的文档由以下文件生成:
HtmlHelp::Private::indexFiles
StringSet indexFiles
Definition: htmlhelp.cpp:321
HtmlHelpRecoder::recode
QCString recode(const QCString &s)
Definition: htmlhelp.cpp:84
HtmlHelp::Private::ctsItemPresent
bool ctsItemPresent
Definition: htmlhelp.cpp:319
QCString::str
std::string str() const
Definition: qcstring.h:442
HtmlHelp::Private::index
HtmlHelpIndex index
Definition: htmlhelp.cpp:324
err
void err(const char *fmt,...)
Definition: message.cpp:203
HtmlHelp::Private::recoder
HtmlHelpRecoder recoder
Definition: htmlhelp.cpp:323
HtmlHelp::getLanguageString
static QCString getLanguageString()
Definition: htmlhelp.cpp:480
Config_getBool
#define Config_getBool(name)
Definition: config.h:33
Doxygen::htmlFileExtension
static QCString htmlFileExtension
Definition: doxygen.h:103
qPrint
const char * qPrint(const char *s)
Definition: qcstring.h:589
Config_getString
#define Config_getString(name)
Definition: config.h:32
HtmlHelpIndex::size
size_t size() const
Definition: htmlhelp.cpp:123
HtmlHelp::Private::imageFiles
StringSet imageFiles
Definition: htmlhelp.cpp:322
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108