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

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   auto t = uc.NewTransformer();
   // Pattern: Name followed optionally by a Title in parens.
   t.FromTo("Name: {n} [({title})]",
   "User: {n} {title:[Title: {title}]}");

   // Case 1: Title exists
   cout << t.Transform("Name: Alice (Manager)") << endl;

   // Case 2: Title missing
   cout << t.Transform("Name: Bob") << endl;
   // (The entire "[Title: ...]" block is omitted)
}