Qt 4.8
Public Functions | Properties | List of all members
QPatternist::ByIDIdentifier Class Reference

Identifies Expression instances by their Expression::id(). More...

#include <qoptimizerblocks_p.h>

Inheritance diagram for QPatternist::ByIDIdentifier:
QPatternist::ExpressionIdentifier QSharedData

Public Functions

 ByIDIdentifier (const Expression::ID id)
 
virtual bool matches (const Expression::Ptr &expr) const
 
- Public Functions inherited from QPatternist::ExpressionIdentifier
 ExpressionIdentifier ()
 
virtual ~ExpressionIdentifier ()
 
- 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

const Expression::ID m_id
 

Additional Inherited Members

- Public Types inherited from QPatternist::ExpressionIdentifier
typedef QList< ExpressionIdentifier::PtrList
 
typedef QExplicitlySharedDataPointer< ExpressionIdentifierPtr
 
- Public Variables inherited from QSharedData
QAtomicInt ref
 

Detailed Description

Identifies Expression instances by their Expression::id().

Author
Frans englich frans.nosp@m..eng.nosp@m.lich@.nosp@m.noki.nosp@m.a.com

Definition at line 71 of file qoptimizerblocks_p.h.

Constructors and Destructors

◆ ByIDIdentifier()

ByIDIdentifier::ByIDIdentifier ( const Expression::ID  id)

Definition at line 57 of file qoptimizerblocks.cpp.

57  : m_id(id)
58 {
59 }

Functions

◆ matches()

bool ByIDIdentifier::matches ( const Expression::Ptr expr) const
virtual
Parameters
exprthe Expression to be tested. This is guranteed to always be a non null, valid pointer.
Returns
true if expr matches as according to this ExpressionIdentifier, otherwise false.

Implements QPatternist::ExpressionIdentifier.

Definition at line 61 of file qoptimizerblocks.cpp.

62 {
63  return expr->is(m_id);
64 }
bool is(const ID id) const

Properties

◆ m_id

const Expression::ID QPatternist::ByIDIdentifier::m_id
private

Definition at line 77 of file qoptimizerblocks_p.h.

Referenced by matches().


The documentation for this class was generated from the following files: