Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Template Class Reference

The most basic template definition. More...

#include <Template.h>

Inheritance diagram for Template

Inheritance graph

[legend]
List of all members.

Public Methods

 Template (DOM_Document docTemplate)
 The most basic template, temporarily holds the DOM tree for a static XML file. More...

virtual ~Template ()
paramDefinitionaddDefinition (const nsAReadableString& name, const nsAReadableString& type, const nsAReadableString& comment)
 Initial and record (paramDefinitions) a new parameter definition return the newly created parameter. More...

paramDefinitionfindDefinition (const nsAReadableString& name)
 Return the parameter definition for a name or null if not found. More...

virtual void compile ()
 Simplest compile function. More...

virtual void run (DBPage* page)
 The simplest form of running a page. More...

virtual const nsAReadableString& getClassName ()
 return the name used by Javascript error messages. More...

virtual const nsAReadableString& getTemplateName ()
 return the name for the template. More...

virtual void setClassName (const nsAReadableString& className)
 The class name is used in Javascript error messages. More...

DOM_Document getDocTemplate ()
 accessor for the m_pDocTemplate. More...


Static Public Methods

const nsAReadableString& getText (DOM_Element element)
 Scan the immediate children of an element and return the concatenated results of all the TEXT and CDATA nodes. More...


Private Types

typedef std::map<const nsAReadableString*,
paramDefinition*, compareARS
mapStringParamDef
 static parameter definitions. More...


Private Attributes

DOM_Document m_docTemplate
 in memory DOM tree for the XML document. More...

nsString m_className
 Name of the template from the name attribute on the root element. More...

mapStringParamDef m_paramDefinitons

Detailed Description

The most basic template definition.

Only <logic> and <parameter>'s allowed

Author(s):
Author:
Jonsm
Version:
Revision:
21
,
Date:
9/08/00 2:29p

Definition at line 25 of file Template.h.


Member Typedef Documentation

typedef std::map<const nsAReadableString*, paramDefinition*, compareARS> Template::mapStringParamDef [private]
 

static parameter definitions.

Definition at line 157 of file Template.h.


Constructor & Destructor Documentation

Template::Template ( DOM_Document docTemplate )
 

The most basic template, temporarily holds the DOM tree for a static XML file.

Definition at line 19 of file Template.cpp.

Template::~Template ( ) [virtual]
 

Definition at line 26 of file Template.cpp.


Member Function Documentation

paramDefinition * Template::addDefinition ( const nsAReadableString & name,
const nsAReadableString & type,
const nsAReadableString & comment )
 

Initial and record (paramDefinitions) a new parameter definition return the newly created parameter.

The effect is that the last definition wins if the param is multiply defined

Parameters:
name  
type  
comment  

Definition at line 88 of file Template.cpp.

void Template::compile ( ) [virtual]
 

Simplest compile function.

Initial the standard object finally add any logic if found.

Parameters:
request  

Reimplemented in Report, and Transaction.

Definition at line 37 of file Template.cpp.

Referenced by Transaction::compile(), Report::compile(), and px7xpdbc::findTemplate().

paramDefinition * Template::findDefinition ( const nsAReadableString & name )
 

Return the parameter definition for a name or null if not found.

Parameters:
name  

Definition at line 101 of file Template.cpp.

const nsAReadableString & Template::getClassName ( ) [virtual]
 

return the name used by Javascript error messages.

Definition at line 165 of file Template.cpp.

Referenced by DBPage::ParseURI().

DOM_Document Template::getDocTemplate ( )
 

accessor for the m_pDocTemplate.

Definition at line 149 of file Template.cpp.

Referenced by DBPage::ParseURI(), Transaction::compile(), and Report::compile().

const nsAReadableString & Template::getTemplateName ( ) [virtual]
 

return the name for the template.

Definition at line 73 of file Template.cpp.

Referenced by DBPage::ParseURI().

const nsAReadableString & Template::getText ( DOM_Element element ) [static]
 

Scan the immediate children of an element and return the concatenated results of all the TEXT and CDATA nodes.

Parameters:
element  

Definition at line 47 of file Template.cpp.

Referenced by dbMeta::buildPassThrough(), Transaction::validateFields(), and Report::validateFields().

void Template::run ( DBPage * pPage ) [virtual]
 

The simplest form of running a page.

Call the logic, then make all of the params visible to the XSL engine.

Parameters:
DBPage  

Reimplemented in Report, and Transaction.

Definition at line 66 of file Template.cpp.

Referenced by DBPage::ParseURI(), Transaction::run(), and Report::run().

void Template::setClassName ( const nsAReadableString & className ) [virtual]
 

The class name is used in Javascript error messages.

Definition at line 157 of file Template.cpp.


Member Data Documentation

nsString Template::m_className [private]
 

Name of the template from the name attribute on the root element.

Definition at line 153 of file Template.h.

DOM_Document Template::m_docTemplate [private]
 

in memory DOM tree for the XML document.

Definition at line 148 of file Template.h.

mapStringParamDef Template::m_paramDefinitons [private]
 

Definition at line 158 of file Template.h.


The documentation for this class was generated from the following files:
Generated at Tue Sep 12 16:29:59 2000 by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000