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

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   auto t = uc.NewTransformer();
   t.Text("ID:100, Name:Admin, ID:200");

   // Define two rules, but only one is marked as 'focusable'
   auto idRule = t.Pattern("ID:{@Number}").SetFocusable(true);
   auto nameRule = t.Pattern("Name:{@Alpha}").SetFocusable(false);
   t.Find();

   auto matches = t.GetMatches(MatchesOption::All);
   cout << "--- All Matches ---" << endl;
   cout << "Count: " << matches.Count() << endl;
   cout << matches.Text() << endl;

   // Now, re-filter the same results to get only the focusable ones
   matches.Reset(MatchesOption::FocusableOnly);
   cout << "" << endl;
   cout << "--- Focusable Matches Only ---" << endl;
   cout << "Count: " << matches.Count() << endl;
   cout << matches.Text() << endl;
}