CPPSERV


Home Projects Jobs Clientele Contact
CPPSERV Documentation Download TODO Mailing lists Bug tracker News RSS Feed Browse source

csp::tags::ChoiceTag Class Reference

Inheritance diagram for csp::tags::ChoiceTag:
Collaboration diagram for csp::tags::ChoiceTag:

List of all members.


Classes

struct  condition

Public Member Functions

 ChoiceTag (const string &name)
virtual void doStartTag (const attribs_t &attribs)
virtual void doEndTag ()
virtual void initChildBuffers ()

Private Member Functions

void doWhenStartTag (const attribs_t &attribs)
void doTopEndTag ()
void doChildEndTag ()

Private Attributes

stringstream m_my_body
list< conditionm_conditions
conditionm_my_condition

Detailed Description

Tag synopsys <csp:choice> <csp:when test="[condition]">...</csp:when> <csp:when test="[condition]">...</csp:when> <csp:otherwise>...</csp:otherwise> </csp:choice>
Parameters:
test Boolean C++ expression This tag generates if..else if..else construct. Currently only minimal checking is done to ensure no invalid constructs are present

Definition at line 73 of file ConditionalTags.cpp.


Constructor & Destructor Documentation

csp::tags::ChoiceTag::ChoiceTag ( const string &  name  )  [inline]

Definition at line 86 of file ConditionalTags.cpp.


Member Function Documentation

void csp::tags::ChoiceTag::doChildEndTag (  )  [private]

void csp::tags::ChoiceTag::doEndTag (  )  [virtual]

Called when closing tag is encountered

Implements servlet::taglib::Generator.

Definition at line 128 of file ConditionalTags.cpp.

References doChildEndTag(), doTopEndTag(), and servlet::taglib::Generator::getName().

Here is the call graph for this function:

virtual void csp::tags::ChoiceTag::doStartTag ( const attribs_t attribs  )  [virtual]

doStartTag is called when opening tag is encountered

Parameters:
attribs key-value map of the tag attributes Override this function in your tag handler to generate pre-amble code for your tag

Implements servlet::taglib::Generator.

void csp::tags::ChoiceTag::doTopEndTag (  )  [private]

FIXME: provide some checking for <csp:choice> body

Definition at line 139 of file ConditionalTags.cpp.

References servlet::taglib::Generator::body, and m_conditions.

Referenced by doEndTag().

void csp::tags::ChoiceTag::doWhenStartTag ( const attribs_t attribs  )  [private]

void csp::tags::ChoiceTag::initChildBuffers (  )  [virtual]

Sets up child buffers (buffers where contents _inside_ this tag is sent By default it's same as its own buffers (set by setBuffers) If this function is overridden and different set of buffers is generated, it's tag writer's responsibility to ensure that output is actually sent to parent's buffers

Reimplemented from servlet::taglib::Generator.

Definition at line 99 of file ConditionalTags.cpp.

References servlet::taglib::Generator::getName(), servlet::taglib::Generator::m_child_body, m_conditions, m_my_body, m_my_condition, csp::tags::ChoiceTag::ChoiceTag::condition::name, and servlet::taglib::Generator::parent.

Here is the call graph for this function:


Member Data Documentation

Definition at line 83 of file ConditionalTags.cpp.

Referenced by doTopEndTag(), and initChildBuffers().

stringstream csp::tags::ChoiceTag::m_my_body [private]

Definition at line 76 of file ConditionalTags.cpp.

Referenced by doChildEndTag(), and initChildBuffers().

Definition at line 84 of file ConditionalTags.cpp.

Referenced by doChildEndTag(), and initChildBuffers().


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

SourceForge.net Logo