Skip to content

Commit 7e5f7b8

Browse files
committed
Added Setters for FormElement
1 parent 6c4f19e commit 7e5f7b8

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

GlobalCode/Databases/VariableFormula.hpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ namespace BlazesRusCode
100100
//0 = Num; 1 = Variable; 2 = Formula; 3 = true; 4 = false ; 5 >= Op;
101101
FormulaElementType ElementCat;
102102

103+
//0 = Num; 1 = Variable; 2 = Formula; 3 = true; 4 = false ; 5 >= Op;
104+
void SetCatType(FormulaElementType catType)
105+
{
106+
ElementCat = catType;
107+
}
108+
103109
/// <summary>
104110
/// (Primarily used for FormElements, ++,--, and TernaryOperator)
105111
/// The index/Key position of stored element (not used for booleans)
@@ -108,6 +114,17 @@ namespace BlazesRusCode
108114
/// </summary>
109115
int Index;
110116

117+
/// <summary>
118+
/// (Primarily used for FormElements, ++,--, and TernaryOperator)
119+
/// The index/Key position of stored element (not used for booleans)
120+
// For variable names: If not -1, refers to stored related Value Key(which is used for prefix/postfix ops as well)
121+
// For Increment/Decrement Op: Refers to index of related value
122+
/// </summary>
123+
void SetIndex(int indexVal)
124+
{
125+
Index = indexVal;
126+
}
127+
111128
/// <summary>
112129
/// Initializes a new instance of the <see cref="VarTypeFormElement"/> class. (Defaults as boolean with true value)
113130
/// </summary>

0 commit comments

Comments
 (0)