Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

CB2::Template Class Reference

Template engine class. More...

#include <Template.h>

Inheritance diagram for CB2::Template:

CB2::Class List of all members.

Public Member Functions

 Template ()
 Constructor.

 Template (const String &value)
 Constructor.

const Templateoperator+= (const String &right)
 Append a string to template.

String::size_type Subst (const String &anchor, const String &value)
 Substitute an anchor in template.

String::size_type SubstURL (const String &anchor, const String &value)
 Substitute an URL anchor in template.

String Render ()
 Render template.


Public Attributes

int tag
 Tag for user-specific data.


Private Attributes

String macro
 Template storage.


Detailed Description

Template engine class.

This class stores a visual template with anchors. These anchors are substituted by the rendered value of other templates or rendered widgets.


Constructor & Destructor Documentation

Template::Template  ) 
 

Constructor.

Create an empty template.

Template::Template const String value  ) 
 

Constructor.

Create a template initialized from string.

Parameters:
value Template value.


Member Function Documentation

const Template & Template::operator+= const String right  ) 
 

Append a string to template.

Parameters:
right String to append.
Returns:
Reference to this.

String Template::Render  ) 
 

Render template.

Generate the final output of the template. Check for any unsubstituted anchors and remove escaped ampersands.

Returns:
Rendered template.

String::size_type Template::Subst const String anchor,
const String value
 

Substitute an anchor in template.

Substitute an anchor in the template with another value.

Parameters:
anchor Anchor name to substitute (the actual substituted string is "&&anchor;").
value Value to substitute.
Returns:
Number of substitutions done.

String::size_type Template::SubstURL const String anchor,
const String value
 

Substitute an URL anchor in template.

TODO

Parameters:
anchor Anchor name to substitute.
value Value to substitute.
Returns:
Number of substitutions done.


Member Data Documentation

String CB2::Template::macro [private]
 

Template storage.

int CB2::Class::tag [inherited]
 

Tag for user-specific data.


The documentation for this class was generated from the following files:
Generated on Thu Sep 16 23:26:50 2004 for ColorBox2 by doxygen 1.3.7