mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 16:57:31 +01:00
[apps] Store function metadata in record
This commit is contained in:
@@ -13,19 +13,19 @@ uint32_t StorageFunction::checksum() {
|
||||
}
|
||||
|
||||
bool StorageFunction::isActive() const {
|
||||
return true; //TODO
|
||||
return recordData()->isActive();
|
||||
}
|
||||
|
||||
KDColor StorageFunction::color() const {
|
||||
return KDColorRed; //TODO
|
||||
return recordData()->color();
|
||||
}
|
||||
|
||||
void StorageFunction::setActive(bool active) {
|
||||
//TODO
|
||||
recordData()->setActive(active);
|
||||
}
|
||||
|
||||
void StorageFunction::setColor(KDColor color) {
|
||||
//TODO
|
||||
recordData()->setColor(color);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
@@ -33,6 +33,12 @@ T StorageFunction::templatedApproximateAtAbscissa(T x, Poincare::Context * conte
|
||||
return reducedExpression(context).approximateWithValueForSymbol(symbol(), x, *context, Preferences::sharedPreferences()->angleUnit());
|
||||
}
|
||||
|
||||
StorageFunction::FunctionRecordData * StorageFunction::recordData() const {
|
||||
assert(!record().isNull());
|
||||
Ion::Storage::Record::Data d = record().value();
|
||||
return reinterpret_cast<FunctionRecordData *>(const_cast<void *>(d.buffer));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
template float Shared::StorageFunction::templatedApproximateAtAbscissa<float>(float, Poincare::Context*) const;
|
||||
|
||||
Reference in New Issue
Block a user