Doxygen
TextGeneratorHtml类 参考
+ 类 TextGeneratorHtml 继承关系图:
+ TextGeneratorHtml 的协作图:

Public 成员函数

 TextGeneratorHtml (TextStream &ts, const QCString &relPath)
 
void writeString (const QCString &s, bool keepSpaces) const
 
void writeBreak (int indent) const
 
void writeLink (const QCString &ref, const QCString &f, const QCString &anchor, const QCString &name) const
 
- Public 成员函数 继承自 TextGeneratorIntf
virtual ~TextGeneratorIntf ()
 

Private 属性

TextStreamm_ts
 
QCString m_relPath
 

详细描述

在文件 context.cpp3394 行定义.

构造及析构函数说明

◆ TextGeneratorHtml()

TextGeneratorHtml::TextGeneratorHtml ( TextStream ts,
const QCString relPath 
)
inline

在文件 context.cpp3397 行定义.

3398  : m_ts(ts), m_relPath(relPath) {}

成员函数说明

◆ writeBreak()

void TextGeneratorHtml::writeBreak ( int  indent) const
inlinevirtual

实现了 TextGeneratorIntf.

在文件 context.cpp3439 行定义.

3440  {
3441  m_ts << "<br />";
3442  for (int i=0;i<indent;i++)
3443  {
3444  m_ts << "&#160;";
3445  }
3446  }

引用了 m_ts.

◆ writeLink()

void TextGeneratorHtml::writeLink ( const QCString ref,
const QCString f,
const QCString anchor,
const QCString name 
) const
inlinevirtual

实现了 TextGeneratorIntf.

在文件 context.cpp3448 行定义.

3451  {
3452  if (!ref.isEmpty())
3453  {
3454  m_ts << "<a class=\"elRef\" ";
3455  m_ts << externalLinkTarget();
3456  }
3457  else
3458  {
3459  m_ts << "<a class=\"el\" ";
3460  }
3461  m_ts << "href=\"";
3462  m_ts << externalRef(m_relPath,ref,TRUE);
3463  if (!f.isEmpty()) m_ts << addHtmlExtensionIfMissing(f);
3464  if (!anchor.isEmpty()) m_ts << "#" << anchor;
3465  m_ts << "\">";
3466  m_ts << convertToHtml(name);
3467  m_ts << "</a>";
3468  }

引用了 addHtmlExtensionIfMissing(), convertToHtml(), externalLinkTarget(), externalRef(), QCString::isEmpty(), m_relPath, m_ts , 以及 TRUE.

◆ writeString()

void TextGeneratorHtml::writeString ( const QCString s,
bool  keepSpaces 
) const
inlinevirtual

实现了 TextGeneratorIntf.

在文件 context.cpp3399 行定义.

3400  {
3401  static const char *hex="0123456789ABCDEF";
3402  if (s.isEmpty()) return;
3403  if (keepSpaces)
3404  {
3405  const char *p=s.data();
3406  char c;
3407  while ((c=*p++))
3408  {
3409  switch(c)
3410  {
3411  case '<': m_ts << "&lt;"; break;
3412  case '>': m_ts << "&gt;"; break;
3413  case '\'': m_ts << "&#39;"; break;
3414  case '"': m_ts << "&quot;"; break;
3415  case '&': m_ts << "&amp;"; break;
3416  case ' ': m_ts << "&#160;"; break;
3417  default:
3418  {
3419  uchar uc = static_cast<uchar>(c);
3420  if (uc<32 && !isspace(c)) // non-printable control characters
3421  {
3422  m_ts << "&#x24" << hex[uc>>4] << hex[uc&0xF] << ";";
3423  }
3424  else
3425  {
3426  m_ts << c;
3427  }
3428  }
3429  break;
3430  }
3431  }
3432  }
3433  else
3434  {
3435  m_ts << convertToHtml(s);
3436  }
3437  }

引用了 convertToHtml(), QCString::data(), hex, QCString::isEmpty(), reg::isspace() , 以及 m_ts.

类成员变量说明

◆ m_relPath

QCString TextGeneratorHtml::m_relPath
private

在文件 context.cpp3472 行定义.

被这些函数引用 writeLink().

◆ m_ts

TextStream& TextGeneratorHtml::m_ts
private

在文件 context.cpp3471 行定义.

被这些函数引用 writeBreak(), writeLink() , 以及 writeString().


该类的文档由以下文件生成:
Rtf_Style_Default::name
const char * name
Definition: rtfstyle.h:40
TextGeneratorHtml::m_ts
TextStream & m_ts
Definition: context.cpp:3471
QCString::isEmpty
bool isEmpty() const
Returns TRUE iff the string is empty
Definition: qcstring.h:144
addHtmlExtensionIfMissing
QCString addHtmlExtensionIfMissing(const QCString &fName)
Definition: util.cpp:5275
reg::isspace
static bool isspace(char c)
Definition: regex.cpp:33
TextGeneratorHtml::m_relPath
QCString m_relPath
Definition: context.cpp:3472
uchar
unsigned char uchar
Definition: qcstring.h:38
TRUE
#define TRUE
Definition: qcstring.h:36
externalLinkTarget
QCString externalLinkTarget(const bool parent)
Definition: util.cpp:6323
hex
static const char * hex
Definition: htmldocvisitor.cpp:65
QCString::data
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string
Definition: qcstring.h:153
externalRef
QCString externalRef(const QCString &relPath, const QCString &ref, bool href)
Definition: util.cpp:6334
convertToHtml
QCString convertToHtml(const QCString &s, bool keepEntities)
Definition: util.cpp:4063