Detailed Description

Handles a variable tag within a language file. Variable tags define what a should be replaced with and essentially seperate layout or structure from the language.

Inheritance diagram for Wrench.VariableTag:
Wrench.LanguageTagHandler Wrench.TagHandler

Public Member Functions

override string[] GetTags ()
 Returns all tags that are handled by this handler, e.g. "div" or "span". Usually there will be just one in the set but some tags may wish to have more. More...
 
override TagHandler GetInstance ()
 Makes a new instance of this tag handler. A global instance is made of this handler so this is used to generate a new instance in an efficient way. More...
 
override bool OnAttributeChange (string property)
 Called on an instance of this handler when an attribute on the element it's attached to changes. It's also called when the tag is being loaded. More...
 
override void OnParseContent (MLLexer lexer)
 Called when the parser is reading the content of this tag for custom reading, e.g. a script/style tag. Non-self closing tags only. Anything that's not read by this method is assumed to be a child element. More...
 
- Public Member Functions inherited from Wrench.LanguageTagHandler
 LanguageTagHandler ()
 
- Public Member Functions inherited from Wrench.TagHandler
virtual bool SelfClosing ()
 Returns true if this tag has no kids and closes itself. For example <input type='text' />. Note that this method exists to make that final slash essentially optional. More...
 
virtual void OnTagLoaded ()
 Called when the tag is instanced and the element plus its attributes and kids have been fully parsed. More...
 

Public Attributes

string Gender
 The gender defined on this variable, if any. More...
 
LanguageSet Parent
 The parent language that this variable belongs to. More...
 
LanguageElement Element
 The parsed variable element. More...
 

Private Member Functions

bool AtEnd (MLLexer lexer)
 Checks if the given lexer is at the end of the variable tag currently being parsed. More...
 

Member Function Documentation

bool Wrench.VariableTag.AtEnd ( MLLexer  lexer)
inlineprivate

Checks if the given lexer is at the end of the variable tag currently being parsed.

Parameters
lexerThe lexer to check.
Returns
True if the lexer is now at the end of the variable tags content; false otherwise.
override TagHandler Wrench.VariableTag.GetInstance ( )
inlinevirtual

Makes a new instance of this tag handler. A global instance is made of this handler so this is used to generate a new instance in an efficient way.

Reimplemented from Wrench.TagHandler.

override string [] Wrench.VariableTag.GetTags ( )
inlinevirtual

Returns all tags that are handled by this handler, e.g. "div" or "span". Usually there will be just one in the set but some tags may wish to have more.

Reimplemented from Wrench.TagHandler.

override bool Wrench.VariableTag.OnAttributeChange ( string  attribute)
inlinevirtual

Called on an instance of this handler when an attribute on the element it's attached to changes. It's also called when the tag is being loaded.

Parameters
attributeThe attribute that changed.

Reimplemented from Wrench.TagHandler.

override void Wrench.VariableTag.OnParseContent ( MLLexer  lexer)
inlinevirtual

Called when the parser is reading the content of this tag for custom reading, e.g. a script/style tag. Non-self closing tags only. Anything that's not read by this method is assumed to be a child element.

Parameters
lexerThe lexer to read the content from.

Reimplemented from Wrench.TagHandler.

Member Data Documentation

LanguageElement Wrench.VariableTag.Element

The parsed variable element.

string Wrench.VariableTag.Gender

The gender defined on this variable, if any.

LanguageSet Wrench.VariableTag.Parent

The parent language that this variable belongs to.