ZPT-Sharp  v1.0.0
Zope Page Templates for .NET
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
CSF.Zpt.Metal.MacroSubstituter Class Reference

Default implementation of IMacroSubstituter. More...

Inheritance diagram for CSF.Zpt.Metal.MacroSubstituter:
Collaboration diagram for CSF.Zpt.Metal.MacroSubstituter:

Public Member Functions

virtual IRenderingContext MakeSubstitutions (IRenderingContext sourceContext, IRenderingContext macroContext, IList< IRenderingContext > macroStack)
 Makes the substitutions from the macro into the given source. More...
 
virtual IRenderingContext ReplaceMacroElement (IRenderingContext sourceContext, IRenderingContext macroContext)
 Replaces the defined macro on the source context with the macro context and returns the result. More...
 
virtual void FillSlots (IEnumerable< SlotToFill > slotsToFill)
 Fills all of the given slots with their corresponding fillers. More...
 
virtual IZptElement FillSlot (SlotToFill slotAndFiller)
 Fills a single slot with its filler. More...
 
virtual IEnumerable< SlotToFillGetSlotsToFill (IRenderingContext sourceContext, IRenderingContext macroContext, IList< IRenderingContext > macroStack)
 Gets a collection of the slots which should be filled, and their corresponding fillers. More...
 
virtual IEnumerable< SlotToFillGetSlotsToFill (IRenderingContext sourceContext, IDictionary< string, IZptElement > availableFillers, IRenderingContext macroContext, IDictionary< string, IZptElement > availableSlotDefinitions)
 Gets a collection of SlotToFill from the given source information. More...
 
virtual IDictionary< string,
IZptElement
GetSlotFillers (IRenderingContext context)
 Gets a collection of all of the elements which have the METAL fill-slot attribute defined. More...
 
virtual IDictionary< string,
IZptElement
GetDefinedSlots (IRenderingContext context)
 Gets a collection of all of the elements which have the METAL define-slot attribute defined. More...
 
virtual IDictionary< string,
IZptElement
GetDefinedSlots (IList< IRenderingContext > macroStack, IEnumerable< string > slotsFoundSoFar)
 Gets a collection of all of the elements which have the METAL define-slot attribute defined. More...
 
virtual IDictionary< string,
IZptElement
GetChildElementsByMetalAttributeValue (IRenderingContext context, string metalAttribute)
 Gets a collection of elements indexed by the value of a given METAL attribute. More...
 

Detailed Description

Default implementation of IMacroSubstituter.

Member Function Documentation

virtual IZptElement CSF.Zpt.Metal.MacroSubstituter.FillSlot ( SlotToFill  slotAndFiller)
inlinevirtual

Fills a single slot with its filler.

Returns
The element created by the operation.
Parameters
slotAndFillerThe slot and its filler.

Reimplemented in CSF.Zpt.Metal.MacroExtensionSubstitutor.

virtual void CSF.Zpt.Metal.MacroSubstituter.FillSlots ( IEnumerable< SlotToFill slotsToFill)
inlinevirtual

Fills all of the given slots with their corresponding fillers.

Parameters
slotsToFillThe slots to fill.
virtual IDictionary<string,IZptElement> CSF.Zpt.Metal.MacroSubstituter.GetChildElementsByMetalAttributeValue ( IRenderingContext  context,
string  metalAttribute 
)
inlinevirtual

Gets a collection of elements indexed by the value of a given METAL attribute.

Returns
The elements found.
Parameters
contextThe rendering context within which to search.
metalAttributeThe name of the METAL attribute for which to search.
virtual IDictionary<string,IZptElement> CSF.Zpt.Metal.MacroSubstituter.GetDefinedSlots ( IRenderingContext  context)
inlinevirtual

Gets a collection of all of the elements which have the METAL define-slot attribute defined.

The returned dictionary is indexed by the value of the METAL define-slot attribute.

Returns
The elements found.
Parameters
contextThe rendering context within which to search.
virtual IDictionary<string,IZptElement> CSF.Zpt.Metal.MacroSubstituter.GetDefinedSlots ( IList< IRenderingContext macroStack,
IEnumerable< string >  slotsFoundSoFar 
)
inlinevirtual

Gets a collection of all of the elements which have the METAL define-slot attribute defined.

The returned dictionary is indexed by the value of the METAL define-slot attribute.

Returns
The elements found.
Parameters
macroStackA collection of macros which have been passed-through.
slotsFoundSoFarA collection of the names of the slots found so far.
virtual IDictionary<string,IZptElement> CSF.Zpt.Metal.MacroSubstituter.GetSlotFillers ( IRenderingContext  context)
inlinevirtual

Gets a collection of all of the elements which have the METAL fill-slot attribute defined.

The returned dictionary is indexed by the value of the METAL fill-slot attribute.

Returns
The elements found.
Parameters
contextThe rendering context within which to search.
virtual IEnumerable<SlotToFill> CSF.Zpt.Metal.MacroSubstituter.GetSlotsToFill ( IRenderingContext  sourceContext,
IRenderingContext  macroContext,
IList< IRenderingContext macroStack 
)
inlinevirtual

Gets a collection of the slots which should be filled, and their corresponding fillers.

Returns
A collection of SlotToFill.
Parameters
sourceContextThe source context, from the original document (to be replaced).
macroContextThe macro context from which to draw replacements.
macroStackA collection of macros which have been passed-through.
virtual IEnumerable<SlotToFill> CSF.Zpt.Metal.MacroSubstituter.GetSlotsToFill ( IRenderingContext  sourceContext,
IDictionary< string, IZptElement availableFillers,
IRenderingContext  macroContext,
IDictionary< string, IZptElement availableSlotDefinitions 
)
inlinevirtual

Gets a collection of SlotToFill from the given source information.

This operation constructs and executes a query across the slots and fillers provided, which matches each filler to a slot.

Returns
A collection of the slots matched with fillers.
Parameters
sourceContextThe source rendering context.
availableFillersA collection of elements in the source context representing slot fillers.
macroContextThe macro rendering context.
availableSlotDefinitionsA collection of elements in the macro context representing slot definitions.
virtual IRenderingContext CSF.Zpt.Metal.MacroSubstituter.MakeSubstitutions ( IRenderingContext  sourceContext,
IRenderingContext  macroContext,
IList< IRenderingContext macroStack 
)
inlinevirtual

Makes the substitutions from the macro into the given source.

These substitutions include replacing the source context with the content of the macro, but also filling slots which have been defined by the macro and for which filler content is found within the source context.

Returns
A rendering context representing the result of the substitutions.
Parameters
sourceContextThe source context, from the original document (to be replaced).
macroContextThe macro context from which to draw replacements.
macroStackA collection of macros which have been passed-through.

Implements CSF.Zpt.Metal.IMacroSubstituter.

virtual IRenderingContext CSF.Zpt.Metal.MacroSubstituter.ReplaceMacroElement ( IRenderingContext  sourceContext,
IRenderingContext  macroContext 
)
inlinevirtual

Replaces the defined macro on the source context with the macro context and returns the result.

Returns
The rendering context for the replacement.
Parameters
sourceContextThe source context (which uses a macro).
macroContextThe macro context (which defines the macro).

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