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< condition > | m_conditions |
condition * | m_my_condition |
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.
csp::tags::ChoiceTag::ChoiceTag | ( | const string & | name | ) | [inline] |
Definition at line 86 of file ConditionalTags.cpp.
void csp::tags::ChoiceTag::doChildEndTag | ( | ) | [private] |
Definition at line 135 of file ConditionalTags.cpp.
References csp::tags::ChoiceTag::ChoiceTag::condition::body, m_my_body, and m_my_condition.
Referenced by doEndTag().
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().
virtual void csp::tags::ChoiceTag::doStartTag | ( | const attribs_t & | attribs | ) | [virtual] |
doStartTag is called when opening tag is encountered
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.
list<condition> csp::tags::ChoiceTag::m_conditions [private] |
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().
condition* csp::tags::ChoiceTag::m_my_condition [private] |
Definition at line 84 of file ConditionalTags.cpp.
Referenced by doChildEndTag(), and initChildBuffers().