NVelocity.Runtime.Directive
Class Macro

Macro.java Macro implements the macro definition directive of VTL. example : #macro( isnull $i ) #if( $i ) $i #end #end This object is used at parse time to mainly process and register the macro. It is used inline in the parser when processing a directive.

Fields inherited from class NVelocity.Runtime.Directive.Directive
rsvc

Constructor Summary
Macro()
        Initializes a new instance of the Macro class.

Property Summary
string Name
int Type

Properties inherited from class NVelocity.Runtime.Directive.Directive
Column, Line

Method Summary
void init(NVelocity.Runtime.RuntimeServices rs, NVelocity.Context.InternalContextAdapter context, NVelocity.Runtime.Parser.Node.INode node)
void processAndRegister(NVelocity.Runtime.RuntimeServices rs, NVelocity.Runtime.Parser.Node.INode node, string sourceTemplate)
         Used by Parser.java to process VMs withing the parsing process processAndRegister() doesn't actually render the macro to the output Processes the macro body into the internal representation used by the VelocimacroProxy objects, and if not currently used, adds it to the macro Factory
bool render(NVelocity.Context.InternalContextAdapter context, System.IO.TextWriter writer, NVelocity.Runtime.Parser.Node.INode node)
         render() doesn't do anything in the final output rendering. There is no output from a #macro() directive.

Methods inherited from class NVelocity.Runtime.Directive.Directive
setLocation

Methods inherited from class System.Object
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString


Constructor Detail

Macro

public Macro()

Initializes a new instance of the Macro class.

Property Detail

Name

public string Name


Type

public int Type

Method Detail

init

public void init(NVelocity.Runtime.RuntimeServices rs,
                 NVelocity.Context.InternalContextAdapter context,
                 NVelocity.Runtime.Parser.Node.INode node)


processAndRegister

public void processAndRegister(NVelocity.Runtime.RuntimeServices rs,
                               NVelocity.Runtime.Parser.Node.INode node,
                               string sourceTemplate)

Used by Parser.java to process VMs withing the parsing process processAndRegister() doesn't actually render the macro to the output Processes the macro body into the internal representation used by the VelocimacroProxy objects, and if not currently used, adds it to the macro Factory


render

public bool render(NVelocity.Context.InternalContextAdapter context,
                   System.IO.TextWriter writer,
                   NVelocity.Runtime.Parser.Node.INode node)

render() doesn't do anything in the final output rendering. There is no output from a #macro() directive.