diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-08-10 05:37:19 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-08-10 08:01:37 (GMT) |
commit | 8c3405bbf65826f0ab0be0bd090d723f8efaa3af (patch) | |
tree | f6886a2b8a86f567b98728bba9cdc3d1be780dcf /src/declarative/qml/qmlexpression_p.h | |
parent | 12ffa33ddc725cd94662a383af6e1793049c807c (diff) | |
download | Qt-8c3405bbf65826f0ab0be0bd090d723f8efaa3af.zip Qt-8c3405bbf65826f0ab0be0bd090d723f8efaa3af.tar.gz Qt-8c3405bbf65826f0ab0be0bd090d723f8efaa3af.tar.bz2 |
Abstract expression and binding APIs
By splitting the interface through which the system interacts with bindings
away from a specific implementation, we can introduce highly specialized
implementations for specific optimizations.
This commit also includes a sample optimization for object properties being
assigned directly from a local id.
Diffstat (limited to 'src/declarative/qml/qmlexpression_p.h')
-rw-r--r-- | src/declarative/qml/qmlexpression_p.h | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/declarative/qml/qmlexpression_p.h b/src/declarative/qml/qmlexpression_p.h index bf95c0e0..997bf8d 100644 --- a/src/declarative/qml/qmlexpression_p.h +++ b/src/declarative/qml/qmlexpression_p.h @@ -61,19 +61,33 @@ QT_BEGIN_NAMESPACE +class QmlAbstractExpression +{ +public: + QmlAbstractExpression(); + virtual ~QmlAbstractExpression(); + + bool isValid() const; + + QmlContext *context() const; + void setContext(QmlContext *); + +private: + friend class QmlContext; + QmlContext *m_context; + QmlAbstractExpression **m_prevExpression; + QmlAbstractExpression *m_nextExpression; +}; + class QmlExpression; class QString; -class QmlExpressionPrivate : public QObjectPrivate +class QmlExpressionPrivate : public QObjectPrivate, public QmlAbstractExpression { Q_DECLARE_PUBLIC(QmlExpression) public: QmlExpressionPrivate(); ~QmlExpressionPrivate(); - // Forms the QmlContext "expressions" linked list - QmlExpressionPrivate *nextExpression; - QmlExpressionPrivate **prevExpression; - enum CompiledDataType { BasicScriptEngineData = 1, PreTransformedQtScriptData = 2 @@ -82,7 +96,6 @@ public: void init(QmlContext *, const QString &, QObject *); void init(QmlContext *, void *, QmlRefCount *, QObject *); - QmlContext *ctxt; QString expression; bool expressionFunctionValid:1; bool expressionRewritten:1; |