The QScxmlNullDataModel class is the null data model for a Qt SCXML stateMachine . 更多...
| 头: | #include <QScxmlNullDataModel> | 
| qmake: | QT += scxml | 
| Since: | Qt 5.7 | 
| 继承: | QScxmlDataModel | 
| QScxmlNullDataModel (QObject * parent = nullptr) | |
| virtual | ~QScxmlNullDataModel () | 
| virtual void | evaluateAssignment (QScxmlExecutableContent::EvaluatorId id , bool * ok ) override | 
| virtual void | evaluateForeach (QScxmlExecutableContent::EvaluatorId id , bool * ok , QScxmlDataModel::ForeachLoopBody * body ) override | 
| virtual void | evaluateInitialization (QScxmlExecutableContent::EvaluatorId id , bool * ok ) override | 
| virtual bool | evaluateToBool (QScxmlExecutableContent::EvaluatorId id , bool * ok ) override | 
| virtual QString | evaluateToString (QScxmlExecutableContent::EvaluatorId id , bool * ok ) override | 
| virtual QVariant | evaluateToVariant (QScxmlExecutableContent::EvaluatorId id , bool * ok ) override | 
| virtual void | evaluateToVoid (QScxmlExecutableContent::EvaluatorId id , bool * ok ) override | 
| virtual bool | hasScxmlProperty (const QString & name ) const override | 
| virtual QVariant | scxmlProperty (const QString & name ) const override | 
| virtual void | setScxmlEvent (const QScxmlEvent & event ) override | 
| virtual bool | setScxmlProperty (const QString & name , const QVariant & value , const QString & context ) override | 
| virtual bool | setup (const QVariantMap & initialDataValues ) override | 
| const QMetaObject | staticMetaObject | 
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"
						
						为
						
							datamodel
						
						属性在
						
<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 .
Creates a new Qt SCXML null data model, with the parent object parent .
[虚拟]
						
						QScxmlNullDataModel::
						
							~QScxmlNullDataModel
						
						()
						
					Destroys the data model.
[override virtual]
						
						
							void
						
						QScxmlNullDataModel::
						
							evaluateAssignment
						
						(
						
							
								QScxmlExecutableContent::EvaluatorId
							
						
						
							id
						
						,
						
							bool
						
						*
						
							ok
						
						)
						
					重实现自 QScxmlDataModel::evaluateAssignment ().
						Throws an error and sets
						
							ok
						
						to
						
false
						
						, because the null data model cannot evaluate assignments.
					
[override virtual]
						
						
							void
						
						QScxmlNullDataModel::
						
							evaluateForeach
						
						(
						
							
								QScxmlExecutableContent::EvaluatorId
							
						
						
							id
						
						,
						
							bool
						
						*
						
							ok
						
						,
						
							
								QScxmlDataModel::ForeachLoopBody
							
						
						*
						
							body
						
						)
						
					重实现自 QScxmlDataModel::evaluateForeach ().
						Throws an error and sets
						
							ok
						
						to
						
false
						
						, because the null data model cannot evaluate
						
<foreach>
						
						blocks.
					
[override virtual]
						
						
							void
						
						QScxmlNullDataModel::
						
							evaluateInitialization
						
						(
						
							
								QScxmlExecutableContent::EvaluatorId
							
						
						
							id
						
						,
						
							bool
						
						*
						
							ok
						
						)
						
					重实现自 QScxmlDataModel::evaluateInitialization ().
						Throws an error and sets
						
							ok
						
						to
						
false
						
						, because the null data model cannot initialize data.
					
[override virtual]
						
						
							bool
						
						QScxmlNullDataModel::
						
							evaluateToBool
						
						(
						
							
								QScxmlExecutableContent::EvaluatorId
							
						
						
							id
						
						,
						
							bool
						
						*
						
							ok
						
						)
						
					重实现自 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.
					
[override virtual]
						
						
							
								QString
							
						
						QScxmlNullDataModel::
						
							evaluateToString
						
						(
						
							
								QScxmlExecutableContent::EvaluatorId
							
						
						
							id
						
						,
						
							bool
						
						*
						
							ok
						
						)
						
					重实现自 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
					
[override virtual]
						
						
							
								QVariant
							
						
						QScxmlNullDataModel::
						
							evaluateToVariant
						
						(
						
							
								QScxmlExecutableContent::EvaluatorId
							
						
						
							id
						
						,
						
							bool
						
						*
						
							ok
						
						)
						
					重实现自 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
						
						设为
						
false
						
						. Returns an empty
						
							QVariant
						
						.
					
[override virtual]
						
						
							void
						
						QScxmlNullDataModel::
						
							evaluateToVoid
						
						(
						
							
								QScxmlExecutableContent::EvaluatorId
							
						
						
							id
						
						,
						
							bool
						
						*
						
							ok
						
						)
						
					重实现自 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
						
						设为
						
false
						
						.
					
[override virtual]
						
						
							bool
						
						QScxmlNullDataModel::
						
							hasScxmlProperty
						
						(const
						
							
								QString
							
						
						&
						name
						) const
						
					重实现自 QScxmlDataModel::hasScxmlProperty ().
						返回
						
false
						
						, because the null data model does not support properties.
					
[override virtual]
						
						
							
								QVariant
							
						
						QScxmlNullDataModel::
						
							scxmlProperty
						
						(const
						
							
								QString
							
						
						&
						name
						) const
						
					重实现自 QScxmlDataModel::scxmlProperty ().
Returns an invalid variant, because the null data model does not support properties.
另请参阅 setScxmlProperty ().
[override virtual]
						
						
							void
						
						QScxmlNullDataModel::
						
							setScxmlEvent
						
						(const
						
							
								QScxmlEvent
							
						
						&
						event
						)
						
					重实现自 QScxmlDataModel::setScxmlEvent ().
Does not actually set the event , because the null data model does not handle events.
[override virtual]
						
						
							bool
						
						QScxmlNullDataModel::
						
							setScxmlProperty
						
						(const
						
							
								QString
							
						
						&
						name
						, const
						
							
								QVariant
							
						
						&
						value
						, const
						
							
								QString
							
						
						&
						
							context
						
						)
						
					重实现自 QScxmlDataModel::setScxmlProperty ().
						返回
						
false
						
						, because the null data model does not support properties.
					
另请参阅 scxmlProperty ().
[override virtual]
						
						
							bool
						
						QScxmlNullDataModel::
						
							setup
						
						(const
						
							
								QVariantMap
							
						
						&
						
							initialDataValues
						
						)
						
					重实现自 QScxmlDataModel::setup ().
注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .