Convert ExpressionCommand and History collector to use Rational instead of PRAT

This commit is contained in:
Josh Koon
2019-01-28 19:14:15 -08:00
parent c13b8a099e
commit 4883fab7f7
5 changed files with 31 additions and 60 deletions

View File

@@ -3,7 +3,8 @@
#pragma once
#include "ExpressionCommandInterface.h"
#include "Header Files\CalcEngine.h"
#include "Header Files/CalcEngine.h"
#include "Header Files/Rational.h"
class CParentheses : public IParenthesisCommand
{
@@ -49,11 +50,11 @@ class COpndCommand : public IOpndCommand
{
public:
COpndCommand(_In_ std::shared_ptr<CalculatorVector<int>> const &commands,
_In_ bool fNegative,
_In_ bool fDecimal,
_In_ bool fSciFmt);
CalcEngine::Rational const& rat,
bool fNegative,
bool fDecimal,
bool fSciFmt);
~COpndCommand();
void Initialize(_In_ PRAT hNoNum);
const std::shared_ptr<CalculatorVector<int>> & GetCommands() const;
void SetCommands(std::shared_ptr<CalculatorVector<int>> const& commands);
@@ -74,7 +75,7 @@ private:
bool m_fSciFmt;
bool m_fDecimal;
std::wstring m_token;
PRAT m_hnoNum;
CalcEngine::Rational m_value;
void ClearAllAndAppendCommand(CalculationManager::Command command);
};