Files
Upsilon/apps/graph/storage_cartesian_function_store.h
Émilie Feral 64978202b4 [apps/shared] ExpressionModelHandle: specify the symbol that is turned
into Unknown X in Derived classes
2019-04-12 15:16:52 +02:00

26 lines
1.1 KiB
C++

#ifndef GRAPH_STORAGE_CARTESIAN_FUNCTION_STORE_H
#define GRAPH_STORAGE_CARTESIAN_FUNCTION_STORE_H
#include "../shared/storage_cartesian_function.h"
#include "../shared/storage_function_store.h"
#include <stdint.h>
#include <escher.h>
namespace Graph {
class StorageCartesianFunctionStore : public Shared::StorageFunctionStore {
public:
Shared::ExpiringPointer<Shared::StorageCartesianFunction> modelForRecord(Ion::Storage::Record record) const { return Shared::ExpiringPointer<Shared::StorageCartesianFunction>(static_cast<Shared::StorageCartesianFunction *>(privateModelForRecord(record))); }
char symbol() const override { return Shared::StorageCartesianFunction::Symbol(); }
private:
Ion::Storage::Record::ErrorStatus addEmptyModel() override;
const char * modelExtension() const override { return Shared::GlobalContext::funcExtension; }
void setMemoizedModelAtIndex(int cacheIndex, Ion::Storage::Record record) const override;
Shared::ExpressionModelHandle * memoizedModelAtIndex(int cacheIndex) const override;
mutable Shared::StorageCartesianFunction m_functions[k_maxNumberOfMemoizedModels];
};
}
#endif