Rename Shared::CartesianFunction to Shared::ContinuousFunction

This commit is contained in:
Ruben Dashyan
2019-09-09 15:55:56 +02:00
committed by LeaNumworks
parent be019cd5cf
commit df2897925b
30 changed files with 170 additions and 162 deletions

View File

@@ -9,22 +9,22 @@ using namespace Shared;
namespace Graph {
int ContinuousFunctionStore::numberOfActiveFunctionsOfType(CartesianFunction::PlotType plotType) const {
int ContinuousFunctionStore::numberOfActiveFunctionsOfType(ContinuousFunction::PlotType plotType) const {
int count = 0;
for (int i = 0; i < numberOfActiveFunctions(); i++) {
Ion::Storage::Record record = activeRecordAtIndex(i);
ExpiringPointer<CartesianFunction> function = modelForRecord(record);
ExpiringPointer<ContinuousFunction> function = modelForRecord(record);
count += (plotType == function->plotType());
}
return count;
}
Ion::Storage::Record ContinuousFunctionStore::activeRecordOfTypeAtIndex(CartesianFunction::PlotType plotType, int index) const {
Ion::Storage::Record ContinuousFunctionStore::activeRecordOfTypeAtIndex(ContinuousFunction::PlotType plotType, int index) const {
int count = 0;
Ion::Storage::Record record;
for (int i = 0; i < numberOfActiveFunctions(); i++) {
record = activeRecordAtIndex(i);
ExpiringPointer<CartesianFunction> function = modelForRecord(record);
ExpiringPointer<ContinuousFunction> function = modelForRecord(record);
if (plotType == function->plotType()) {
if (count == index) {
break;
@@ -37,13 +37,13 @@ Ion::Storage::Record ContinuousFunctionStore::activeRecordOfTypeAtIndex(Cartesia
Ion::Storage::Record::ErrorStatus ContinuousFunctionStore::addEmptyModel() {
Ion::Storage::Record::ErrorStatus error;
CartesianFunction newModel = CartesianFunction::NewModel(&error);
ContinuousFunction newModel = ContinuousFunction::NewModel(&error);
return error;
}
ExpressionModelHandle * ContinuousFunctionStore::setMemoizedModelAtIndex(int cacheIndex, Ion::Storage::Record record) const {
assert(cacheIndex >= 0 && cacheIndex < maxNumberOfMemoizedModels());
m_functions[cacheIndex] = CartesianFunction(record);
m_functions[cacheIndex] = ContinuousFunction(record);
return &m_functions[cacheIndex];
}