mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-29 11:39:58 +02:00
[apps/shared] Split ExpressionModelHandle into ExpressionModelHandle and
SingleExpressionModelHandle (in perspective of Sequence model who will be composed of 3 ExpressionModelHandle)
This commit is contained in:
27
apps/shared/single_expression_model_handle.cpp
Normal file
27
apps/shared/single_expression_model_handle.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#include "single_expression_model_handle.h"
|
||||
#include "global_context.h"
|
||||
#include "poincare_helpers.h"
|
||||
#include <poincare/horizontal_layout.h>
|
||||
#include <string.h>
|
||||
#include <cmath>
|
||||
#include <assert.h>
|
||||
|
||||
using namespace Ion;
|
||||
using namespace Poincare;
|
||||
|
||||
namespace Shared {
|
||||
|
||||
SingleExpressionModelHandle::SingleExpressionModelHandle(Storage::Record record) :
|
||||
Storage::Record(record)
|
||||
{
|
||||
}
|
||||
|
||||
bool SingleExpressionModelHandle::isDefined() {
|
||||
return !isEmpty();
|
||||
}
|
||||
|
||||
bool SingleExpressionModelHandle::isEmpty() {
|
||||
return value().size <= metaDataSize();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user