summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/script/qmlbasicscript_p.h
blob: bcb7d00fb756344525160285d0a100a356641e75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the $MODULE$ of the Qt Toolkit.
**
** $TROLLTECH_DUAL_LICENSE$
**
****************************************************************************/

#ifndef QMLBASICSCRIPT_P_H
#define QMLBASICSCRIPT_P_H

QT_BEGIN_NAMESPACE

class QObject;
class QmlContextPrivate;
class QDebug;
class QByteArray;

class QmlBasicScriptNodeCache
{
public:
    QObject *object;
    const QMetaObject *metaObject;
    enum { Invalid,
           Core, 
           Attached, 
           Signal,
           SignalProperty, 
           Explicit, 
           Variant, 
           ScriptValue } type;
    union {
        int core;
        QObject *attached;
        QmlContextPrivate *context;
    };
    int coreType;

    bool isCore() const { return type == Core; }
    bool isExplicit() const { return type == Explicit; }
    void clear();
    QVariant value(const char *) const;
};

QDebug operator<<(QDebug, const QmlBasicScriptNodeCache &);

#endif // QMLBASICSCRIPT_P_H

QT_END_NAMESPACE