mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[shared] Change name: StorageExpressionModel::expressionWithSymbol -->
expressionClone
This commit is contained in:
@@ -49,7 +49,7 @@ Poincare::Expression GlobalContext::ExpressionFromFunctionRecord(Ion::Storage::R
|
||||
/* An function record value has metadata before the expression. To get the
|
||||
* expression, use the function record handle. */
|
||||
StorageCartesianFunction f = StorageCartesianFunction(record);
|
||||
return f.expressionWithSymbol();
|
||||
return f.expressionClone();
|
||||
}
|
||||
|
||||
void GlobalContext::DestroyRecordsBaseNamedWithoutExtension(const char * baseName, const char * extension) {
|
||||
|
||||
@@ -20,7 +20,7 @@ StorageExpressionModel::StorageExpressionModel(Storage::Record record) :
|
||||
}
|
||||
|
||||
void StorageExpressionModel::text(char * buffer, size_t bufferSize) const {
|
||||
Expression e = expressionWithSymbol();
|
||||
Expression e = expressionClone();
|
||||
if (e.isUninitialized() && bufferSize > 0) {
|
||||
buffer[0] = 0;
|
||||
} else {
|
||||
@@ -44,7 +44,7 @@ Expression StorageExpressionModel::expressionReduced(Poincare::Context * context
|
||||
return m_expression;
|
||||
}
|
||||
|
||||
Expression StorageExpressionModel::expressionWithSymbol() const {
|
||||
Expression StorageExpressionModel::expressionClone() const {
|
||||
assert(!isNull());
|
||||
Ion::Storage::Record::Data recordData = value();
|
||||
/* A new Expression has to be created at each call (because it might be tempered with after calling) */
|
||||
@@ -53,7 +53,7 @@ Expression StorageExpressionModel::expressionWithSymbol() const {
|
||||
|
||||
Layout StorageExpressionModel::layout() {
|
||||
if (m_layout.isUninitialized()) {
|
||||
m_layout = PoincareHelpers::CreateLayout(expressionWithSymbol());
|
||||
m_layout = PoincareHelpers::CreateLayout(expressionClone());
|
||||
if (m_layout.isUninitialized()) {
|
||||
m_layout = HorizontalLayout();
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ public:
|
||||
StorageExpressionModel(Ion::Storage::Record record);
|
||||
void text(char * buffer, size_t bufferSize) const;
|
||||
Poincare::Expression expressionReduced(Poincare::Context * context) const;
|
||||
Poincare::Expression expressionWithSymbol() const;
|
||||
Poincare::Expression expressionClone() const;
|
||||
Poincare::Layout layout();
|
||||
/* TODO This comment will be true when Sequence inherits from this class
|
||||
* Here, isDefined is the exact contrary of isEmpty. However, for Sequence
|
||||
|
||||
Reference in New Issue
Block a user