Calculator.h
1 #pragma once 2 3 #include "Calculator.g.h" 4 5 namespace winrt::CalculatorEngineCommon::implementation 6 { 7 struct Calculator : CalculatorT<Calculator> 8 { 9 Calculator() = default; 10 11 Calculator(winrt::Windows::Foundation::Collections::IPropertySet const& constants); 12 13 winrt::hstring EvaluateExpression(winrt::hstring const& expression); 14 15 private: 16 std::unordered_map<std::string, double> m_constants; 17 }; 18 } 19 20 namespace winrt::CalculatorEngineCommon::factory_implementation 21 { 22 struct Calculator : CalculatorT<Calculator, implementation::Calculator> 23 { 24 }; 25 }