Changeset View
Changeset View
Standalone View
Standalone View
src/lib/state_p.h
Context not available. | |||||
28 | #include <QSharedData> | 28 | #include <QSharedData> | ||
---|---|---|---|---|---|
29 | #include <QVector> | 29 | #include <QVector> | ||
30 | 30 | | |||
31 | #include "definitionref_p.h" | ||||
32 | | ||||
31 | QT_BEGIN_NAMESPACE | 33 | QT_BEGIN_NAMESPACE | ||
32 | class QStringList; | 34 | class QStringList; | ||
33 | QT_END_NAMESPACE | 35 | QT_END_NAMESPACE | ||
Context not available. | |||||
36 | { | 38 | { | ||
37 | 39 | | |||
38 | class Context; | 40 | class Context; | ||
39 | class DefinitionData; | | |||
40 | 41 | | |||
41 | class StateData : public QSharedData | 42 | class StateData : public QSharedData | ||
42 | { | 43 | { | ||
43 | friend class State; | 44 | friend class State; | ||
45 | friend class AbstractHighlighter; | ||||
44 | 46 | | |||
45 | public: | 47 | public: | ||
46 | StateData() = default; | 48 | StateData() = default; | ||
Context not available. | |||||
54 | Context* topContext() const; | 56 | Context* topContext() const; | ||
55 | const QStringList &topCaptures() const; | 57 | const QStringList &topCaptures() const; | ||
56 | 58 | | |||
59 | private: | ||||
57 | /** | 60 | /** | ||
58 | * definition pointer to check for invalid states | 61 | * weak reference to the used definition to filter out invalid states | ||
59 | * FIXME: this is a hack, one could get the same pointer | | |||
60 | * later for other object | | |||
61 | */ | 62 | */ | ||
62 | DefinitionData *m_defData = nullptr; | 63 | DefinitionRef m_defRef; | ||
63 | | ||||
64 | private: | | |||
65 | 64 | | |||
66 | /** | 65 | /** | ||
67 | * the context stack combines the active context + valid captures | 66 | * the context stack combines the active context + valid captures | ||
Context not available. |