// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "GraphingInterfaces/IGraph.h" #include "GraphingOptions.h" #include "Mocks/GraphRenderer.h" namespace MockGraphingImpl { class Graph : public Graphing::IGraph { public: Graph() { m_graphRenderer = std::make_shared(); } virtual std::optional>> TryInitialize(const Graphing::IExpression* graphingExp = nullptr) { if (graphingExp != nullptr) { std::vector> equations; equations.push_back(nullptr); m_variables.push_back(std::make_shared(MockVariable{})); return std::optional>>(equations); } return std::nullopt; } HRESULT GetInitializationError() { return S_OK; } virtual Graphing::IGraphingOptions& GetOptions() { return m_graphingOptions; } virtual std::vector> GetVariables() { return m_variables; } virtual void SetArgValue(std::wstring variableName, double value) { } virtual std::shared_ptr GetRenderer() const { return m_graphRenderer; } virtual bool TryResetSelection() { return true; } virtual std::shared_ptr GetAnalyzer() const { return nullptr; } private: std::vector> m_variables; GraphingOptions m_graphingOptions; std::shared_ptr m_graphRenderer; }; }