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

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   cout << "Initial: " << uCalc::DefaultCount() << endl;

   // The implicit 'uc' is the first default. Pushing it again adds to the stack.
   uc.IsDefault(true);
   cout << "After pushing 'uc' again: " << uCalc::DefaultCount() << endl;

   uCalc ucB;
   ucB.IsDefault(true);
   cout << "After pushing ucB: " << uCalc::DefaultCount() << endl;

   uCalc ucC;
   ucC.IsDefault(true);
   cout << "After pushing ucC: " << uCalc::DefaultCount() << endl;

   // Clear all user-defined defaults, leaving only the mandatory root instance.
   uCalc::DefaultClear();
   cout << "After Clear: " << uCalc::DefaultCount() << endl;
}