38 lines
1.4 KiB
C
38 lines
1.4 KiB
C
enum scene_operator
|
|
{
|
|
S_Operator_Invalid,
|
|
S_Operator_Not,
|
|
S_Operator_Equal,
|
|
S_Operator_Equals,
|
|
S_Operator_NotEquals,
|
|
S_Operator_GreaterThanOrEquals,
|
|
S_Operator_LessThanOrEquals,
|
|
S_Operator_Greater,
|
|
S_Operator_Less,
|
|
S_Operator_Add,
|
|
S_Operator_Minus,
|
|
S_Operator_Multiply,
|
|
S_Operator_Divide,
|
|
};
|
|
|
|
inline scene_operator S_OperatorFromString(string String)
|
|
{
|
|
scene_operator Result = S_Operator_Invalid;
|
|
if(0) {}
|
|
else if(AreEqual(String, StrLit("###"))) { Result = S_Operator_Invalid; }
|
|
else if(AreEqual(String, StrLit("!"))) { Result = S_Operator_Not; }
|
|
else if(AreEqual(String, StrLit("="))) { Result = S_Operator_Equal; }
|
|
else if(AreEqual(String, StrLit("=="))) { Result = S_Operator_Equals; }
|
|
else if(AreEqual(String, StrLit("!="))) { Result = S_Operator_NotEquals; }
|
|
else if(AreEqual(String, StrLit(">="))) { Result = S_Operator_GreaterThanOrEquals; }
|
|
else if(AreEqual(String, StrLit("<="))) { Result = S_Operator_LessThanOrEquals; }
|
|
else if(AreEqual(String, StrLit(">"))) { Result = S_Operator_Greater; }
|
|
else if(AreEqual(String, StrLit("<"))) { Result = S_Operator_Less; }
|
|
else if(AreEqual(String, StrLit("+"))) { Result = S_Operator_Add; }
|
|
else if(AreEqual(String, StrLit("-"))) { Result = S_Operator_Minus; }
|
|
else if(AreEqual(String, StrLit("*"))) { Result = S_Operator_Multiply; }
|
|
else if(AreEqual(String, StrLit("/"))) { Result = S_Operator_Divide; }
|
|
return(Result);
|
|
}
|
|
|