#include <albaHTMLTemplateParserBlock.h>
|
| albaHTMLTemplateParserBlock (int blockType, wxString name) |
|
| ~albaHTMLTemplateParserBlock () |
|
void | AddVar (wxString name, double varValue) |
|
void | AddVar (wxString name, int varValue) |
|
void | AddVar (wxString name, wxString varValue) |
|
void | AddImageVar (wxString name, wxString imagePath="", wxString label="") |
|
void | AddImageVar (wxString name, albaView *view, wxString label="") |
|
void | AddImageVar (wxString name, vtkImageData *imageData, wxString label="", int flipAxis=-1) |
|
void | PushImageVar (wxString name, wxString imagePath, wxString label="") |
|
void | PushImageVar (wxString name, albaView *view, wxString label="") |
|
void | PushImageVar (wxString name, vtkImageData *imageData, wxString label="") |
|
void | PushVar (wxString name, double varValue) |
|
void | PushVar (wxString name, int varValue) |
|
void | PushVar (wxString name, wxString varValue) |
|
wxString | GetVar (wxString name) |
|
wxString | GetNthVar (wxString name, int arrayPos=-1) |
|
void | AddBlock (wxString name, int blockType) |
|
void | PushBlock (wxString name, int blockType) |
|
albaHTMLTemplateParserBlock * | GetBlock (wxString name) |
|
albaHTMLTemplateParserBlock * | GetNthBlock (wxString name, int pos=-1) |
|
void | SetIfCondition (int condition) |
|
int | GetIfCondition () |
|
void | SetNLoops (int nloops) |
|
int | GetNLoops () |
|
void | SetImageRTFProps (int widthGoal=8640, int heightGoal=12960, int mode=1) |
|
|
int | SubstitutionPos (wxString *name) |
|
HTMLTemplateSubstitution | GetSubstitution (wxString name) |
|
void | WriteSubstitution (HTMLTemplateSubstitution var, wxString *outputHTML) |
|
void | PreParse (wxString *inputTemplate, int &parsingPos) |
|
int | PreParseTag (wxString *inputTemplate, int &parsingPos) |
|
void | SkipInputSpaces (wxString *inputTemplate, int &parsingPos) |
|
int | AddSubstitution (wxString *tagName, int SubstitutionType) |
|
int | AddForward (wxString *tagName, int substitutionType) |
|
int | SubStringCompare (wxString *input, char *subString, int inputPos) |
|
void | CleanPreParsingInfo () |
|
void | GenerateOutput (wxString *outputHTML) |
|
void | ReadTagName (wxString *inputTemplate, int &parsingPos, wxString &tagName) |
|
int | ConsistenceCheck () |
|
void | SetFather (albaHTMLTemplateParserBlock *father) |
|
wxString | CalculateImageRTF (wxString imagePath, int width, int height) |
|
class name: albaHTMLTemplateParserBlock sub-class for Template parsing used by albaHTMLTemplateParser
Definition at line 53 of file albaHTMLTemplateParserBlock.h.
◆ HTMLTemplateSubstitution
◆ HTMLTemplateParsedItems
◆ albaHTMLTemplateParserBlock()
albaHTMLTemplateParserBlock::albaHTMLTemplateParserBlock |
( |
int |
blockType, |
|
|
wxString |
name |
|
) |
| |
◆ ~albaHTMLTemplateParserBlock()
albaHTMLTemplateParserBlock::~albaHTMLTemplateParserBlock |
( |
| ) |
|
◆ AddVar() [1/3]
void albaHTMLTemplateParserBlock::AddVar |
( |
wxString |
name, |
|
|
double |
varValue |
|
) |
| |
Add the variable specified in the name string to the list of variables.
◆ AddVar() [2/3]
void albaHTMLTemplateParserBlock::AddVar |
( |
wxString |
name, |
|
|
int |
varValue |
|
) |
| |
Add the variable specified in the name string to the list of variables.
◆ AddVar() [3/3]
void albaHTMLTemplateParserBlock::AddVar |
( |
wxString |
name, |
|
|
wxString |
varValue |
|
) |
| |
Add the variable specified in the name string to the list of variables.
◆ AddImageVar() [1/3]
void albaHTMLTemplateParserBlock::AddImageVar |
( |
wxString |
name, |
|
|
wxString |
imagePath = "" , |
|
|
wxString |
label = "" |
|
) |
| |
Add the variable specified in the name string to the list of variables.
◆ AddImageVar() [2/3]
void albaHTMLTemplateParserBlock::AddImageVar |
( |
wxString |
name, |
|
|
albaView * |
view, |
|
|
wxString |
label = "" |
|
) |
| |
Add the variable specified in the name string to the list of variables.
◆ AddImageVar() [3/3]
void albaHTMLTemplateParserBlock::AddImageVar |
( |
wxString |
name, |
|
|
vtkImageData * |
imageData, |
|
|
wxString |
label = "" , |
|
|
int |
flipAxis = -1 |
|
) |
| |
Add the variable specified in the name string to the list of variables.
◆ PushImageVar() [1/3]
void albaHTMLTemplateParserBlock::PushImageVar |
( |
wxString |
name, |
|
|
wxString |
imagePath, |
|
|
wxString |
label = "" |
|
) |
| |
Push the variable specified in the name string to the list of variables.
◆ PushImageVar() [2/3]
void albaHTMLTemplateParserBlock::PushImageVar |
( |
wxString |
name, |
|
|
albaView * |
view, |
|
|
wxString |
label = "" |
|
) |
| |
Push the variable specified in the name string to the list of variables.
◆ PushImageVar() [3/3]
void albaHTMLTemplateParserBlock::PushImageVar |
( |
wxString |
name, |
|
|
vtkImageData * |
imageData, |
|
|
wxString |
label = "" |
|
) |
| |
Push the variable specified in the name string to the list of variables.
◆ PushVar() [1/3]
void albaHTMLTemplateParserBlock::PushVar |
( |
wxString |
name, |
|
|
double |
varValue |
|
) |
| |
Push the variable specified in the name string to the list of variables.
◆ PushVar() [2/3]
void albaHTMLTemplateParserBlock::PushVar |
( |
wxString |
name, |
|
|
int |
varValue |
|
) |
| |
Push the variable specified in the name string to the list of variables.
◆ PushVar() [3/3]
void albaHTMLTemplateParserBlock::PushVar |
( |
wxString |
name, |
|
|
wxString |
varValue |
|
) |
| |
Push the variable specified in the name string to the list of variables.
◆ GetVar()
wxString albaHTMLTemplateParserBlock::GetVar |
( |
wxString |
name | ) |
|
Return the string of the Variable used for added vars.
◆ GetNthVar()
wxString albaHTMLTemplateParserBlock::GetNthVar |
( |
wxString |
name, |
|
|
int |
arrayPos = -1 |
|
) |
| |
Return the string of the Variable Used for variable-arrays, if pos=-1 last pushed variable will be returned used for pushed vars.
◆ AddBlock()
void albaHTMLTemplateParserBlock::AddBlock |
( |
wxString |
name, |
|
|
int |
blockType |
|
) |
| |
Add the Block specified in the list of Blocks.
◆ PushBlock()
void albaHTMLTemplateParserBlock::PushBlock |
( |
wxString |
name, |
|
|
int |
blockType |
|
) |
| |
Push the Block specified in the list of Blocks.
◆ GetBlock()
Return the pointer to the block specified in name if the block is part of an block-array last pushed block will be returned.
◆ GetNthBlock()
Return the pointer to the block specified in name and pos.
Used for block-arrays, if pos=-1 last pushed block will be returned
◆ SetIfCondition()
void albaHTMLTemplateParserBlock::SetIfCondition |
( |
int |
condition | ) |
|
Set the verity value for the "if" blocks.
◆ GetIfCondition()
int albaHTMLTemplateParserBlock::GetIfCondition |
( |
| ) |
|
Set the verity value for the "if" blocks.
◆ SetNLoops()
void albaHTMLTemplateParserBlock::SetNLoops |
( |
int |
nloops | ) |
|
Set the number of loops for the "if" blocks.
◆ GetNLoops()
int albaHTMLTemplateParserBlock::GetNLoops |
( |
| ) |
|
Set the number of loops for the "if" blocks.
◆ SetImageRTFProps()
void albaHTMLTemplateParserBlock::SetImageRTFProps |
( |
int |
widthGoal = 8640 , |
|
|
int |
heightGoal = 12960 , |
|
|
int |
mode = 1 |
|
) |
| |
◆ SubstitutionPos()
int albaHTMLTemplateParserBlock::SubstitutionPos |
( |
wxString * |
name | ) |
|
|
protected |
Return the position of the variable in the Variable Table.
Returns -1 if variable is not found
◆ GetSubstitution()
Finds a variable starting from his name.
◆ WriteSubstitution()
Write a specified Var to the output.
◆ PreParse()
void albaHTMLTemplateParserBlock::PreParse |
( |
wxString * |
inputTemplate, |
|
|
int & |
parsingPos |
|
) |
| |
|
protected |
Generate PreParsing structures from input template for this block and return the number of parsed chars.
◆ PreParseTag()
int albaHTMLTemplateParserBlock::PreParseTag |
( |
wxString * |
inputTemplate, |
|
|
int & |
parsingPos |
|
) |
| |
|
protected |
Parse the input starting from a tag.
◆ SkipInputSpaces()
void albaHTMLTemplateParserBlock::SkipInputSpaces |
( |
wxString * |
inputTemplate, |
|
|
int & |
parsingPos |
|
) |
| |
|
protected |
Utility function that skip spaces on input template.
◆ AddSubstitution()
int albaHTMLTemplateParserBlock::AddSubstitution |
( |
wxString * |
tagName, |
|
|
int |
SubstitutionType |
|
) |
| |
|
protected |
AddSubstitution to m_Subistitution if necessary search the correspondent variable to the block root, returns the position of the added substitution.
◆ AddForward()
int albaHTMLTemplateParserBlock::AddForward |
( |
wxString * |
tagName, |
|
|
int |
substitutionType |
|
) |
| |
|
protected |
This function is called when a substitution is not found in local scope in order to search it upward to the blocks root.
Returns the father substitution pos and generates a path to the substitution if is necessary
◆ SubStringCompare()
int albaHTMLTemplateParserBlock::SubStringCompare |
( |
wxString * |
input, |
|
|
char * |
subString, |
|
|
int |
inputPos |
|
) |
| |
|
protected |
Return true if input contains subString starting from inputPos.
◆ CleanPreParsingInfo()
void albaHTMLTemplateParserBlock::CleanPreParsingInfo |
( |
| ) |
|
|
protected |
Clean the structures generated on PreParse phase.
◆ GenerateOutput()
void albaHTMLTemplateParserBlock::GenerateOutput |
( |
wxString * |
outputHTML | ) |
|
|
protected |
◆ ReadTagName()
void albaHTMLTemplateParserBlock::ReadTagName |
( |
wxString * |
inputTemplate, |
|
|
int & |
parsingPos, |
|
|
wxString & |
tagName |
|
) |
| |
|
protected |
Reads the name of the tag from the input template and save it to varName.
This function skips spaces and the closing char ']'
◆ ConsistenceCheck()
int albaHTMLTemplateParserBlock::ConsistenceCheck |
( |
| ) |
|
|
protected |
Check the consistence of the generated structure.
◆ SetFather()
Sets the father for the block.
◆ CalculateImageRTF()
wxString albaHTMLTemplateParserBlock::CalculateImageRTF |
( |
wxString |
imagePath, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
|
protected |
◆ m_ImageRTF_WidthGoal
int albaHTMLTemplateParserBlock::m_ImageRTF_WidthGoal |
|
protected |
◆ m_ImageRTF_HeightGoal
int albaHTMLTemplateParserBlock::m_ImageRTF_HeightGoal |
|
protected |
◆ m_ImageRTF_Mode
int albaHTMLTemplateParserBlock::m_ImageRTF_Mode |
|
protected |
◆ m_Father
◆ m_BlockName
wxString albaHTMLTemplateParserBlock::m_BlockName |
|
protected |
◆ m_BlockType
int albaHTMLTemplateParserBlock::m_BlockType |
|
protected |
◆ m_IfChars
int albaHTMLTemplateParserBlock::m_IfChars |
|
protected |
◆ m_IfCondition
bool albaHTMLTemplateParserBlock::m_IfCondition |
|
protected |
◆ m_DoubleFormat
wxString albaHTMLTemplateParserBlock::m_DoubleFormat |
|
protected |
◆ m_CurrentLoop
int albaHTMLTemplateParserBlock::m_CurrentLoop |
|
protected |
◆ m_LoopsNumber
int albaHTMLTemplateParserBlock::m_LoopsNumber |
|
protected |
◆ m_SubstitutionTable
◆ m_Variables
std::vector< wxString > albaHTMLTemplateParserBlock::m_Variables |
|
protected |
◆ m_VariablesArray
std::vector< std::vector<wxString> > albaHTMLTemplateParserBlock::m_VariablesArray |
|
protected |
◆ m_SubBlocks
◆ m_SubBlocksArray
◆ m_PreParsedHTML
wxString albaHTMLTemplateParserBlock::m_PreParsedHTML |
|
protected |
◆ m_Substitutions
The documentation for this class was generated from the following file: