Public Member Functions | Private Attributes | List of all members
TemplateNodeText Class Reference

Class representing a piece of plain text in a template. More...

Inheritance diagram for TemplateNodeText:
TemplateNode

Public Member Functions

 TemplateNodeText (TemplateParser *, TemplateNode *parent, int, const QCString &data)
 
void render (FTextStream &ts, TemplateContext *c)
 
- Public Member Functions inherited from TemplateNode
 TemplateNode (TemplateNode *parent)
 
virtual ~TemplateNode ()
 
TemplateNodeparent ()
 

Private Attributes

QCString m_data
 

Detailed Description

Class representing a piece of plain text in a template.

Definition at line 2578 of file template.cpp.

Constructor & Destructor Documentation

TemplateNodeText::TemplateNodeText ( TemplateParser ,
TemplateNode parent,
int  ,
const QCString data 
)
inline

Definition at line 2581 of file template.cpp.

2582  : TemplateNode(parent), m_data(data)
2583  {
2584  TRACE(("TemplateNodeText('%s')\n",replace(data,'\n',' ').data()));
2585  }
TemplateNode(TemplateNode *parent)
Definition: template.cpp:1642
#define TRACE(x)
Definition: template.cpp:43

Member Function Documentation

void TemplateNodeText::render ( FTextStream ts,
TemplateContext c 
)
inlinevirtual

Implements TemplateNode.

Definition at line 2587 of file template.cpp.

2588  {
2589  //printf("TemplateNodeText::render(%s)\n",m_data.data());
2590  TemplateContextImpl* ci = dynamic_cast<TemplateContextImpl*>(c);
2591  if (ci==0) return; // should not happen
2592  if (ci->spacelessEnabled())
2593  {
2594  ts << ci->spacelessIntf()->remove(m_data);
2595  }
2596  else
2597  {
2598  ts << m_data;
2599  }
2600  }
bool spacelessEnabled() const
Definition: template.cpp:550
Internal class representing the implementation of a template context.
Definition: template.cpp:511
TemplateSpacelessIntf * spacelessIntf() const
Definition: template.cpp:546
virtual QCString remove(const QCString &input)=0

Member Data Documentation

QCString TemplateNodeText::m_data
private

Definition at line 2602 of file template.cpp.


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