17#ifndef __albaHTMLTemplateParserBlock_H__
18#define __albaHTMLTemplateParserBlock_H__
62 } HTMLTemplateSubstitution;
68 } HTMLTemplateParsedItems;
76 void AddVar(wxString name,
double varValue);
78 void AddVar(wxString name,
int varValue);
80 void AddVar(wxString name, wxString varValue);
82 void AddImageVar(wxString name, wxString imagePath =
"", wxString label =
"");
86 void AddImageVar(wxString name, vtkImageData *imageData, wxString label =
"",
int flipAxis = -1);
88 void PushImageVar(wxString name, wxString imagePath, wxString label =
"");
92 void PushImageVar(wxString name, vtkImageData *imageData, wxString label =
"");
94 void PushVar(wxString name,
double varValue);
96 void PushVar(wxString name,
int varValue);
98 void PushVar(wxString name, wxString varValue);
151 void PreParse(wxString *inputTemplate,
int &parsingPos);
179 void ReadTagName(wxString *inputTemplate,
int &parsingPos, wxString &tagName);
@ alba_HTML_TEMPLATE_MAIN
@ alba_HTML_TEMPLATE_LOOP
@ alba_HTML_SUBSTITUTION_FORWARD_UP
@ alba_HTML_SUBSTITUTION_VARIABLE_ARRAY
@ alba_HTML_SUBSTITUTION_BLOCK
@ alba_HTML_SUBSTITUTION_VARIABLE
@ alba_HTML_SUBSTITUTION_BLOCK_ARRAY
class name: albaHTMLTemplateParserBlock sub-class for Template parsing used by albaHTMLTemplateParser
int m_ImageRTF_HeightGoal
void PushImageVar(wxString name, vtkImageData *imageData, wxString label="")
Push the variable specified in the name string to the list of variables.
std::vector< albaHTMLTemplateParserBlock * > m_SubBlocks
int ConsistenceCheck()
Check the consistence of the generated structure.
void SkipInputSpaces(wxString *inputTemplate, int &parsingPos)
Utility function that skip spaces on input template.
void PushImageVar(wxString name, albaView *view, wxString label="")
Push the variable specified in the name string to the list of variables.
void AddBlock(wxString name, int blockType)
Add the Block specified in the list of Blocks.
void PushVar(wxString name, wxString varValue)
Push the variable specified in the name string to the list of variables.
std::vector< HTMLTemplateSubstitution > m_SubstitutionTable
void SetImageRTFProps(int widthGoal=8640, int heightGoal=12960, int mode=1)
int SubStringCompare(wxString *input, char *subString, int inputPos)
Return true if input contains subString starting from inputPos.
void AddImageVar(wxString name, wxString imagePath="", wxString label="")
Add the variable specified in the name string to the list of variables.
wxString GetNthVar(wxString name, int arrayPos=-1)
Return the string of the Variable Used for variable-arrays, if pos=-1 last pushed variable will be re...
~albaHTMLTemplateParserBlock()
destructor
albaHTMLTemplateParserBlock * GetNthBlock(wxString name, int pos=-1)
Return the pointer to the block specified in name and pos.
void WriteSubstitution(HTMLTemplateSubstitution var, wxString *outputHTML)
Write a specified Var to the output.
void CleanPreParsingInfo()
Clean the structures generated on PreParse phase.
void AddImageVar(wxString name, vtkImageData *imageData, wxString label="", int flipAxis=-1)
Add the variable specified in the name string to the list of variables.
void PushVar(wxString name, double varValue)
Push the variable specified in the name string to the list of variables.
void AddVar(wxString name, wxString varValue)
Add the variable specified in the name string to the list of variables.
wxString GetVar(wxString name)
Return the string of the Variable used for added vars.
int GetNLoops()
Set the number of loops for the "if" blocks.
wxString CalculateImageRTF(wxString imagePath, int width, int height)
int PreParseTag(wxString *inputTemplate, int &parsingPos)
Parse the input starting from a tag.
void SetFather(albaHTMLTemplateParserBlock *father)
Sets the father for the block.
std::vector< std::vector< wxString > > m_VariablesArray
void SetIfCondition(int condition)
Set the verity value for the "if" blocks.
void PushBlock(wxString name, int blockType)
Push the Block specified in the list of Blocks.
void ReadTagName(wxString *inputTemplate, int &parsingPos, wxString &tagName)
Reads the name of the tag from the input template and save it to varName.
void PushVar(wxString name, int varValue)
Push the variable specified in the name string to the list of variables.
void SetNLoops(int nloops)
Set the number of loops for the "if" blocks.
std::vector< HTMLTemplateParsedItems > m_Substitutions
void PushImageVar(wxString name, wxString imagePath, wxString label="")
Push the variable specified in the name string to the list of variables.
albaHTMLTemplateParserBlock * m_Father
std::vector< wxString > m_Variables
int AddForward(wxString *tagName, int substitutionType)
This function is called when a substitution is not found in local scope in order to search it upward ...
int AddSubstitution(wxString *tagName, int SubstitutionType)
AddSubstitution to m_Subistitution if necessary search the correspondent variable to the block root,...
void PreParse(wxString *inputTemplate, int &parsingPos)
Generate PreParsing structures from input template for this block and return the number of parsed cha...
void GenerateOutput(wxString *outputHTML)
Generate HTML output.
void AddVar(wxString name, int varValue)
Add the variable specified in the name string to the list of variables.
void AddVar(wxString name, double varValue)
Add the variable specified in the name string to the list of variables.
albaHTMLTemplateParserBlock(int blockType, wxString name)
constructor
std::vector< std::vector< albaHTMLTemplateParserBlock * > > m_SubBlocksArray
int GetIfCondition()
Set the verity value for the "if" blocks.
void AddImageVar(wxString name, albaView *view, wxString label="")
Add the variable specified in the name string to the list of variables.
int SubstitutionPos(wxString *name)
Return the position of the variable in the Variable Table.
HTMLTemplateSubstitution GetSubstitution(wxString name)
Finds a variable starting from his name.
albaHTMLTemplateParserBlock * GetBlock(wxString name)
Return the pointer to the block specified in name if the block is part of an block-array last pushed ...
albaView is the base class for Views in alba.