Add Graph Settings (#879)

This commit is contained in:
Rudy Huyn
2020-01-03 15:06:14 -08:00
committed by GitHub
parent 234ac8deb3
commit 8357f5d5c5
35 changed files with 1882 additions and 195 deletions

View File

@@ -0,0 +1,58 @@
// 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<GraphRenderer>();
}
virtual std::optional<std::vector<std::shared_ptr<Graphing::IEquation>>> TryInitialize(const Graphing::IExpression* graphingExp = nullptr)
{
return std::nullopt;
}
virtual Graphing::IGraphingOptions& GetOptions()
{
return m_graphingOptions;
}
virtual std::vector<std::shared_ptr<Graphing::IVariable>> GetVariables()
{
return m_variables;
}
virtual void SetArgValue(std::wstring variableName, double value)
{
}
virtual std::shared_ptr<Graphing::Renderer::IGraphRenderer> GetRenderer() const
{
return m_graphRenderer;
}
virtual bool TryResetSelection()
{
return true;
}
virtual std::shared_ptr<Graphing::Analyzer::IGraphAnalyzer> GetAnalyzer() const
{
return nullptr;
}
private:
std::vector<std::shared_ptr<Graphing::IVariable>> m_variables;
GraphingOptions m_graphingOptions;
std::shared_ptr<Graphing::Renderer::IGraphRenderer> m_graphRenderer;
};
}