QScxmlNullDataModel Class
The QScxmlNullDataModel class is the null data model for a Qt SCXML stateMachine 更多...
头文件: | #include <QScxmlNullDataModel> |
qmake: | QT += scxml |
开始支持版本: | Qt 5.7 |
基类: | QScxmlDataModel |
公有函数
QScxmlNullDataModel(QObject *parent = nullptr) | |
~QScxmlNullDataModel() |
重新实现的公有函数
virtual void | evaluateAssignment(QScxmlExecutableContent::EvaluatorId id, bool *ok) |
virtual void | evaluateForeach(QScxmlExecutableContent::EvaluatorId id, bool *ok, ForeachLoopBody *body) |
virtual void | evaluateInitialization(QScxmlExecutableContent::EvaluatorId id, bool *ok) |
virtual bool | evaluateToBool(QScxmlExecutableContent::EvaluatorId id, bool *ok) |
virtual QString | evaluateToString(QScxmlExecutableContent::EvaluatorId id, bool *ok) |
virtual QVariant | evaluateToVariant(QScxmlExecutableContent::EvaluatorId id, bool *ok) |
virtual void | evaluateToVoid(QScxmlExecutableContent::EvaluatorId id, bool *ok) |
virtual bool | hasScxmlProperty(const QString &name) const |
virtual QVariant | scxmlProperty(const QString &name) const |
virtual void | setScxmlEvent(const QScxmlEvent &event) |
virtual bool | setScxmlProperty(const QString &name, const QVariant &value, const QString &context) |
virtual bool | setup(const QVariantMap &initialDataValues) |
- 14 个公有函数继承自 QScxmlDataModel
- 32 个公有函数继承自 QObject
其他继承的成员
- 1 个属性继承自 QScxmlDataModel
- 1 个属性继承自 QObject
- 1 个公有槽函数继承自 QObject
- 1 个信号继承自 QScxmlDataModel
- 2 个信号继承自 QObject
- 1 个公有变量继承自 QObject
- 10 个静态公有成员继承自 QObject
- 9 个受保护的函数继承自 QObject
- 2 个受保护的变量继承自 QObject
详细描述
The QScxmlNullDataModel class is the null data model for a Qt SCXML stateMachine
This class implements the null data model as described in the SCXML Specification - B.1 The Null Data Model. Using the value "null"
for the datamodel attribute of the <scxml>
element means that there is no underlying data model, but some executable content, like In(...)
or <log>
can still be used.
参见 QScxmlStateMachine and QScxmlDataModel.
成员函数
QScxmlNullDataModel::QScxmlNullDataModel(QObject *parent = nullptr)
Creates a new Qt SCXML null data model, with the parent object parent.
QScxmlNullDataModel::~QScxmlNullDataModel()
Destroys the data model.
[virtual]
void QScxmlNullDataModel::evaluateAssignment(QScxmlExecutableContent::EvaluatorId id, bool *ok)
Reimplemented from QScxmlDataModel::evaluateAssignment().
Throws an error and sets ok to false
, because the null data model cannot evaluate assignments.
[virtual]
void QScxmlNullDataModel::evaluateForeach(QScxmlExecutableContent::EvaluatorId id, bool *ok, ForeachLoopBody *body)
Reimplemented from QScxmlDataModel::evaluateForeach().
Throws an error and sets ok to false
, because the null data model cannot evaluate <foreach>
blocks.
[virtual]
void QScxmlNullDataModel::evaluateInitialization(QScxmlExecutableContent::EvaluatorId id, bool *ok)
Reimplemented from QScxmlDataModel::evaluateInitialization().
Throws an error and sets ok to false
, because the null data model cannot initialize data.
[virtual]
bool QScxmlNullDataModel::evaluateToBool(QScxmlExecutableContent::EvaluatorId id, bool *ok)
Reimplemented from QScxmlDataModel::evaluateToBool().
Evaluates the executable content pointed to by id and records in ok whether there was an error. Returns the result of the evaluation as a boolean value. The null data model can evaluate the instruction In(...)
, so this might result in an actual value, rather than an error.
[virtual]
QString QScxmlNullDataModel::evaluateToString(QScxmlExecutableContent::EvaluatorId id, bool *ok)
Reimplemented from QScxmlDataModel::evaluateToString().
Evaluates the executable content pointed to by id and records in ok whether there was an error. Returns the result of the evaluation as a string. The null data model can evaluate the <log>
element, so this might result in an actual value, rather than an error
[virtual]
QVariant QScxmlNullDataModel::evaluateToVariant(QScxmlExecutableContent::EvaluatorId id, bool *ok)
Reimplemented from QScxmlDataModel::evaluateToVariant().
Evaluates the executable content pointed to by id and records in ok whether there was an error. As this is the null data model, any evaluation will in fact result in an error, with ok set to false
. Returns an empty QVariant.
[virtual]
void QScxmlNullDataModel::evaluateToVoid(QScxmlExecutableContent::EvaluatorId id, bool *ok)
Reimplemented from QScxmlDataModel::evaluateToVoid().
Evaluates the executable content pointed to by id and records in ok whether there was an error. As this is the null data model, any evaluation will in fact result in an error, with ok set to false
.
[virtual]
bool QScxmlNullDataModel::hasScxmlProperty(const QString &name) const
Reimplemented from QScxmlDataModel::hasScxmlProperty().
Returns false
, because the null data model does not support properties.
[virtual]
QVariant QScxmlNullDataModel::scxmlProperty(const QString &name) const
Reimplemented from QScxmlDataModel::scxmlProperty().
Returns an invalid variant, because the null data model does not support properties.
参见 setScxmlProperty().
[virtual]
void QScxmlNullDataModel::setScxmlEvent(const QScxmlEvent &event)
Reimplemented from QScxmlDataModel::setScxmlEvent().
Does not actually set the event, because the null data model does not handle events.
[virtual]
bool QScxmlNullDataModel::setScxmlProperty(const QString &name, const QVariant &value, const QString &context)
Reimplemented from QScxmlDataModel::setScxmlProperty().
Returns false
, because the null data model does not support properties.
参见 scxmlProperty().
[virtual]
bool QScxmlNullDataModel::setup(const QVariantMap &initialDataValues)
Reimplemented from QScxmlDataModel::setup().