Qt 4.8
|
Houses the data necessary for a template pattern. More...
#include <qtemplatepattern_p.h>
Public Types | |
typedef int | ID |
typedef QExplicitlySharedDataPointer< TemplatePattern > | Ptr |
typedef QVector< Ptr > | Vector |
Public Functions | |
ID | id () const |
const Expression::Ptr & | matchPattern () const |
PatternPriority | priority () const |
void | setMatchPattern (const Expression::Ptr &pattern) |
TemplatePattern (const Expression::Ptr &matchPattern, const PatternPriority pri, const ID id, const Template::Ptr templ) | |
const Template::Ptr & | templateTarget () const |
Public Functions inherited from QSharedData | |
QSharedData () | |
Constructs a QSharedData object with a reference count of 0. More... | |
QSharedData (const QSharedData &) | |
Constructs a QSharedData object with reference count 0. More... | |
Properties | |
ID | m_id |
Expression::Ptr | m_matchPattern |
PatternPriority | m_priority |
Template::Ptr | m_templateTarget |
Additional Inherited Members | |
Public Variables inherited from QSharedData | |
QAtomicInt | ref |
Houses the data necessary for a template pattern.
A template pattern is the match pattern, but have had each operand to | separated out into a separate TemplatePattern. For instance, the pattern
a | b | c
, becomes three separate TemplatePattern instances.
Definition at line 76 of file qtemplatepattern_p.h.
typedef int QPatternist::TemplatePattern::ID |
Definition at line 81 of file qtemplatepattern_p.h.
Definition at line 79 of file qtemplatepattern_p.h.
Definition at line 80 of file qtemplatepattern_p.h.
|
inline |
Definition at line 116 of file qtemplatepattern_p.h.
|
inline |
Definition at line 144 of file qtemplatepattern_p.h.
|
inline |
Definition at line 129 of file qtemplatepattern_p.h.
|
inline |
Definition at line 139 of file qtemplatepattern_p.h.
|
inline |
Definition at line 134 of file qtemplatepattern_p.h.
|
inline |
Definition at line 149 of file qtemplatepattern_p.h.
|
private |
Definition at line 111 of file qtemplatepattern_p.h.
Referenced by id().
|
private |
This ID is used to ensure that, as 6.4 Conflict Resolution for Template Rules reads:
"If the pattern contains multiple alternatives separated by |, then the template rule is treated equivalently to a set of template rules, one for each alternative. However, it is not an error if a node matches more than one of the alternatives."
For patterns separated by |, we have one Template instance for each alternative, but they all have the same ID, hence if several alternatives match, we don't flag it as an error if they have the same ID.
Definition at line 109 of file qtemplatepattern_p.h.
Referenced by matchPattern(), setMatchPattern(), and TemplatePattern().
|
private |
Definition at line 110 of file qtemplatepattern_p.h.
Referenced by priority().
|
private |
Definition at line 112 of file qtemplatepattern_p.h.
Referenced by TemplatePattern(), and templateTarget().