Public Member Functions | Private Attributes | List of all members
TextGeneratorHtml Class Reference
Inheritance diagram for TextGeneratorHtml:
TextGeneratorIntf

Public Member Functions

 TextGeneratorHtml (FTextStream &ts, const QCString &relPath)
 
void writeString (const char *s, bool keepSpaces) const
 
void writeBreak (int indent) const
 
void writeLink (const char *ref, const char *f, const char *anchor, const char *name) const
 
- Public Member Functions inherited from TextGeneratorIntf
virtual ~TextGeneratorIntf ()
 

Private Attributes

FTextStreamm_ts
 
QCString m_relPath
 

Detailed Description

Definition at line 3698 of file context.cpp.

Constructor & Destructor Documentation

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

Definition at line 3701 of file context.cpp.

3702  : m_ts(ts), m_relPath(relPath) {}
QCString m_relPath
Definition: context.cpp:3762
FTextStream & m_ts
Definition: context.cpp:3761

Member Function Documentation

void TextGeneratorHtml::writeBreak ( int  indent) const
inlinevirtual

Implements TextGeneratorIntf.

Definition at line 3729 of file context.cpp.

3730  {
3731  m_ts << "<br />";
3732  for (int i=0;i<indent;i++)
3733  {
3734  m_ts << "&#160;";
3735  }
3736  }
FTextStream & m_ts
Definition: context.cpp:3761
void TextGeneratorHtml::writeLink ( const char *  ref,
const char *  f,
const char *  anchor,
const char *  name 
) const
inlinevirtual

Implements TextGeneratorIntf.

Definition at line 3738 of file context.cpp.

3741  {
3742  if (ref)
3743  {
3744  m_ts << "<a class=\"elRef\" ";
3746  }
3747  else
3748  {
3749  m_ts << "<a class=\"el\" ";
3750  }
3751  m_ts << "href=\"";
3752  m_ts << externalRef(m_relPath,ref,TRUE);
3753  if (f) m_ts << f << Doxygen::htmlFileExtension;
3754  if (anchor) m_ts << "#" << anchor;
3755  m_ts << "\">";
3756  m_ts << convertToHtml(name);
3757  m_ts << "</a>";
3758  }
static QCString name
Definition: declinfo.cpp:673
static QCString htmlFileExtension
Definition: doxygen.h:130
QCString m_relPath
Definition: context.cpp:3762
const bool FALSE
Definition: qglobal.h:370
QCString convertToHtml(const char *s, bool keepEntities)
Definition: util.cpp:5746
FTextStream & m_ts
Definition: context.cpp:3761
QCString externalLinkTarget()
Definition: util.cpp:7850
const bool TRUE
Definition: qglobal.h:371
QCString externalRef(const QCString &relPath, const QCString &ref, bool href)
Definition: util.cpp:7856
void TextGeneratorHtml::writeString ( const char *  s,
bool  keepSpaces 
) const
inlinevirtual

Implements TextGeneratorIntf.

Definition at line 3703 of file context.cpp.

3704  {
3705  if (s==0) return;
3706  if (keepSpaces)
3707  {
3708  const char *p=s;
3709  char c;
3710  while ((c=*p++))
3711  {
3712  switch(c)
3713  {
3714  case '<': m_ts << "&lt;"; break;
3715  case '>': m_ts << "&gt;"; break;
3716  case '\'': m_ts << "&#39;"; break;
3717  case '"': m_ts << "&quot;"; break;
3718  case '&': m_ts << "&amp;"; break;
3719  case ' ': m_ts << "&#160;"; break;
3720  }
3721  }
3722  }
3723  else
3724  {
3725  m_ts << convertToHtml(s);
3726  }
3727  }
QCString convertToHtml(const char *s, bool keepEntities)
Definition: util.cpp:5746
FTextStream & m_ts
Definition: context.cpp:3761
p
Definition: test.py:223
static QCString * s
Definition: config.cpp:1042

Member Data Documentation

QCString TextGeneratorHtml::m_relPath
private

Definition at line 3762 of file context.cpp.

FTextStream& TextGeneratorHtml::m_ts
private

Definition at line 3761 of file context.cpp.


The documentation for this class was generated from the following file: