#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

#define tf(IsTrue) ((IsTrue) ? "True" : "False")

int main() {
   uCalc uc;
   uc.DefineVariable("MyVar");

   cout << uc.EvalStr("'Cos is a function? '") << tf(uc.ItemOf("Cos").IsProperty(ItemIs::Function)) << endl;
   cout << uc.EvalStr("'Cos is a variable? '") << tf(uc.ItemOf("Cos").IsProperty(ItemIs::Variable)) << endl;
   cout << uc.EvalStr("'Cos is an operator? '") << tf(uc.ItemOf("Cos").IsProperty(ItemIs::Operator)) << endl;
   cout << uc.EvalStr("'MyVar is a function? '") << tf(uc.ItemOf("MyVar").IsProperty(ItemIs::Function)) << endl;
   cout << uc.EvalStr("'MyVar is a variable? '") << tf(uc.ItemOf("MyVar").IsProperty(ItemIs::Variable)) << endl;
   cout << uc.EvalStr("'MyVar is an operator? '") << tf(uc.ItemOf("MyVar").IsProperty(ItemIs::Operator)) << endl;
   cout << uc.EvalStr("'+ is a function? '") << tf(uc.ItemOf("+").IsProperty(ItemIs::Function)) << endl;
   cout << uc.EvalStr("'+ is a variable? '") << tf(uc.ItemOf("+").IsProperty(ItemIs::Variable)) << endl;
   cout << uc.EvalStr("'+ is an operator? '") << tf(uc.ItemOf("+").IsProperty(ItemIs::Operator)) << endl;
   cout << uc.EvalStr("'Cos not found? '") << tf(uc.ItemOf("Cos").IsProperty(ItemIs::NotFound)) << endl;
   cout << uc.EvalStr("'XYZABC not found? '") << tf(uc.ItemOf("XYZABC").IsProperty(ItemIs::NotFound)) << endl;
}