#include #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; auto t = uc.NewTransformer(); auto txt = "a b c d e"; t.Text(txt); t.FromTo("a", "aaa"); t.FromTo("c", "xyz"); cout << "Input: " << t << endl; cout << "Transformed: " << t.Transform() << endl; cout << "" << endl; cout << "Resetting..." << endl; t.Reset(); cout << "Input after reset: " << t << "(empty)" << endl; t.Text("a b c d e"); cout << "New input: " << t.Text() << endl; cout << "Transform after reset: " << t.Transform().Text() << " (no rules exist)" << endl; cout << "" << endl; cout << "Defining new rules..." << endl; t.FromTo("b", "ABC"); t.FromTo("d", "DDD"); cout << "Final transformed: " << t.Transform().Text() << endl; }