#include #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; uCalc::Transformer t; t.Text("The quick brown fox."); // 1. Define the original rule auto ruleV1 = t.FromTo("brown", "BROWN_V1"); cout << "Initial transform: " << t.Transform() << endl; // 2. Define a new rule with the same pattern, shadowing the original t.Text("The quick brown fox."); auto ruleV2 = t.FromTo("brown", "BROWN_V2"); cout << "After shadowing: " << t.Transform() << endl; // 3. Release the new rule. The original rule should become active again. t.Text("The quick brown fox."); ruleV2.Release(); cout << "After release (reverted): " << t.Transform() << endl; }