CPPSERV


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

csp::tags::DefineTag Class Reference

Inheritance diagram for csp::tags::DefineTag:
Collaboration diagram for csp::tags::DefineTag:

List of all members.


Public Member Functions

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

Protected Types

typedef set< string > deflist_t

Protected Attributes

string m_defname
stringstream func_body
bool with_servlet

Static Protected Attributes

static deflist_t m_defines

Detailed Description

Tag synopsys: <csp:define name="<name>" params="<C++ argument definitions>"> Tag so defined, can later on be used with <csp:call> construct or as C++ function (<% myDef(a, b, c); %> ) Note1: current implementation does no param syntax checking Note2: current implementation doesn't allow referencing variables from the caller function Note3: argument names MUST be unique

Definition at line 41 of file MacroTags.cpp.


Member Typedef Documentation

typedef set<string> csp::tags::DefineTag::deflist_t [protected]

Definition at line 44 of file MacroTags.cpp.


Constructor & Destructor Documentation

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

Definition at line 50 of file MacroTags.cpp.


Member Function Documentation

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

Called when closing tag is encountered

Implements servlet::taglib::Generator.

Reimplemented in csp::tags::UseDefTag, csp::tags::DefunTag, and csp::tags::CallTag.

Definition at line 98 of file MacroTags.cpp.

References servlet::taglib::Generator::body, func_body, m_defines, servlet::taglib::Generator::member, and with_servlet.

virtual void csp::tags::DefineTag::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.

Reimplemented in csp::tags::UseDefTag, csp::tags::DefunTag, and csp::tags::CallTag.

void csp::tags::DefineTag::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.

Reimplemented in csp::tags::UseDefTag.

Definition at line 60 of file MacroTags.cpp.

References func_body, and servlet::taglib::Generator::m_child_body.


Member Data Documentation

string csp::tags::DefineTag::m_defname [protected]

Definition at line 46 of file MacroTags.cpp.

Reimplemented in csp::tags::UseDefTag.

Definition at line 48 of file MacroTags.cpp.

Referenced by doEndTag().


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

SourceForge.net Logo