[shared] StorageExpressionModel: add method 'addEmptyModel'

This commit is contained in:
Émilie Feral
2018-10-10 20:17:38 +02:00
parent 3e4b2a20a1
commit 5158957d48
3 changed files with 8 additions and 5 deletions

View File

@@ -12,18 +12,20 @@ namespace Graph {
StorageCartesianFunctionStore::StorageCartesianFunctionStore() :
Shared::StorageFunctionStore()
{
addEmptyModel();
Ion::Storage::Record::ErrorStatus error = addEmptyModel();
assert(error == Ion::Storage::Record::ErrorStatus::None);
}
void StorageCartesianFunctionStore::removeAll() {
StorageFunctionStore::removeAll();
addEmptyModel();
Ion::Storage::Record::ErrorStatus error = addEmptyModel();
assert(error == Ion::Storage::Record::ErrorStatus::None);
}
void StorageCartesianFunctionStore::addEmptyModel() {
Ion::Storage::Record::ErrorStatus StorageCartesianFunctionStore::addEmptyModel() {
Ion::Storage::Record::ErrorStatus error;
StorageCartesianFunction newModel = StorageCartesianFunction::NewModel(&error);
assert(error == Ion::Storage::Record::ErrorStatus::None);
return error;
}
void StorageCartesianFunctionStore::privateSetMemoizedModelAtIndex(int cacheIndex, Ion::Storage::Record record) const {