Classes | |
struct | condition |
Public Member Functions | |
SwitchTag (const string &name) | |
virtual void | doStartTag (const attribs_t &attribs) |
virtual void | doEndTag () |
virtual void | initChildBuffers () |
Private Member Functions | |
void | doTopEndTag () |
void | doChildEndTag () |
Private Attributes | |
stringstream | m_my_body |
string | m_test |
list< condition > | m_conditions |
condition * | m_my_condition |
test | Expression whose result to test. | |
value | integer or enum value | |
fallthrough | true or false. If true, no break will be generated at the end of case statement This tag generates switch statement construct. Currently only minimal checking is done to ensure no invalid constructs are present |
Definition at line 175 of file ConditionalTags.cpp.
csp::tags::SwitchTag::SwitchTag | ( | const string & | name | ) | [inline] |
Definition at line 190 of file ConditionalTags.cpp.
void csp::tags::SwitchTag::doChildEndTag | ( | ) | [private] |
Definition at line 239 of file ConditionalTags.cpp.
References csp::tags::SwitchTag::SwitchTag::condition::body, m_my_body, and m_my_condition.
Referenced by doEndTag().
void csp::tags::SwitchTag::doEndTag | ( | ) | [virtual] |
Called when closing tag is encountered
Implements servlet::taglib::Generator.
Definition at line 232 of file ConditionalTags.cpp.
References doChildEndTag(), doTopEndTag(), and servlet::taglib::Generator::getName().
virtual void csp::tags::SwitchTag::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::SwitchTag::doTopEndTag | ( | ) | [private] |
FIXME: provide some checking for <csp:switch> body
Definition at line 243 of file ConditionalTags.cpp.
References servlet::taglib::Generator::body, m_conditions, and m_test.
Referenced by doEndTag().
void csp::tags::SwitchTag::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 202 of file ConditionalTags.cpp.
References csp::tags::SwitchTag::SwitchTag::condition::fallthrough, servlet::taglib::Generator::getName(), servlet::taglib::Generator::m_child_body, m_conditions, m_my_body, m_my_condition, csp::tags::SwitchTag::SwitchTag::condition::name, and servlet::taglib::Generator::parent.
list<condition> csp::tags::SwitchTag::m_conditions [private] |
Definition at line 187 of file ConditionalTags.cpp.
Referenced by doTopEndTag(), and initChildBuffers().
stringstream csp::tags::SwitchTag::m_my_body [private] |
Definition at line 178 of file ConditionalTags.cpp.
Referenced by doChildEndTag(), and initChildBuffers().
condition* csp::tags::SwitchTag::m_my_condition [private] |
Definition at line 188 of file ConditionalTags.cpp.
Referenced by doChildEndTag(), and initChildBuffers().
string csp::tags::SwitchTag::m_test [private] |