Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <berryExpression.h>
Public Member Functions | |
berryObjectMacro (Expression) | |
Expression () | |
virtual | ~Expression () |
virtual uint | HashCode () const override |
virtual SmartPointer< const EvaluationResult > | Evaluate (IEvaluationContext *context) const =0 |
virtual const ExpressionInfo * | ComputeExpressionInfo () const |
virtual void | CollectExpressionInfo (ExpressionInfo *info) const |
virtual QString | ToString () const override |
virtual bool | operator== (const Object *object) const override |
Public Member Functions inherited from berry::Object | |
virtual QString | GetClassName () const |
virtual Reflection::TypeInfo | GetTypeInfo () const |
virtual QList< Reflection::TypeInfo > | GetSuperclasses () const |
virtual void | Delete () |
QDebug | Print (QDebug os, Indent Indent=0) const |
virtual bool | operator< (const Object *) const |
void | Register () const |
void | UnRegister (bool del=true) const |
int | GetReferenceCount () const |
void | SetReferenceCount (int) |
void | AddDestroyListener (const MessageAbstractDelegate<> &delegate) const |
void | RemoveDestroyListener (const MessageAbstractDelegate<> &delegate) const |
Static Public Attributes | |
static const uint | HASH_CODE_NOT_COMPUTED |
static const uint | HASH_FACTOR |
static const QString | ATT_VALUE |
static const Expression::Pointer | TRUE_EVAL |
static const Expression::Pointer | FALSE_EVAL |
Protected Member Functions | |
virtual uint | ComputeHashCode () const |
Protected Member Functions inherited from berry::Object | |
Object () | |
virtual | ~Object () |
virtual QDebug | PrintSelf (QDebug os, Indent indent) const |
virtual QDebug | PrintHeader (QDebug os, Indent indent) const |
virtual QDebug | PrintTrailer (QDebug os, Indent indent) const |
Static Protected Member Functions | |
static bool | Equals (const QList< Expression::Pointer > &leftArray, const QList< Expression::Pointer > &rightArray) |
static bool | Equals (const QList< Object::Pointer > &leftArray, const QList< Object::Pointer > &rightArray) |
static uint | HashCode (Expression::Pointer object) |
static uint | HashCode (const QList< Expression::Pointer > &array) |
static uint | HashCode (const QList< Object::Pointer > &array) |
Additional Inherited Members | |
Public Types inherited from berry::Object | |
typedef Object | Self |
typedef berry::SmartPointer< Self > | Pointer |
typedef berry::SmartPointer< const Self > | ConstPointer |
typedef berry::WeakPointer< Self > | WeakPtr |
typedef berry::WeakPointer< const Self > | ConstWeakPtr |
Static Public Member Functions inherited from berry::Object | |
static const char * | GetStaticClassName () |
static Reflection::TypeInfo | GetStaticTypeInfo () |
static QList< Reflection::TypeInfo > | GetStaticSuperclasses () |
Protected Attributes inherited from berry::Object | |
QAtomicInt | m_ReferenceCount |
QMutex | m_ReferenceCountLock |
Abstract base class for all expressions provided by the common expression language.
An expression is evaluated by calling evaluate(IEvaluationContext).
This class may be subclassed to provide specific expressions.
Definition at line 41 of file berryExpression.h.
berry::Expression::Expression | ( | ) |
Definition at line 30 of file berryExpression.cpp.
References HASH_CODE_NOT_COMPUTED.
|
virtual |
Definition at line 35 of file berryExpression.cpp.
berry::Expression::berryObjectMacro | ( | Expression | ) |
|
virtual |
Collects information about this expression tree. This default implementation add the expression's type to the set of misbehaving expression types.
info | the expression information object used to collect the information |
Reimplemented in berry::FALSE_EVALExpression, and berry::TRUE_EVALExpression.
Definition at line 97 of file berryExpression.cpp.
References berry::ExpressionInfo::AddMisBehavingExpressionType().
Referenced by ComputeExpressionInfo().
|
virtual |
Computes the expression information for the given expression tree.
This is a convenience method for collecting the expression information using Expression#collectExpressionInfo(ExpressionInfo).
Definition at line 89 of file berryExpression.cpp.
References CollectExpressionInfo().
|
protectedvirtual |
Method to compute the hash code for this object. The result returned from this method is cached in the fHashCode
field. If the value returned from the method equals HASH_CODE_NOT_COMPUTED (e.g. -1
) then the value is incremented by one.
This default implementation calls super.hashCode()
Definition at line 103 of file berryExpression.cpp.
References qHash().
Referenced by HashCode().
|
staticprotected |
Checks whether two objects are equal using the equals(Object)
method of the left
object. This method handles null
for either the left
or right
object.
left | the first object to compare; may be null . |
right | the second object to compare; may be null . |
TRUE_EVAL
if the two objects are equivalent; FALSE_EVAL
otherwise. Tests whether two arrays of objects are equal to each other. The arrays must not be null
, but their elements may be null
.leftArray | the left array to compare; may be null , and may be empty and may contain null elements. |
rightArray | the right array to compare; may be null , and may be empty and may contain null elements. |
TRUE_EVAL
if the arrays are equal length and the elements at the same position are equal; FALSE_EVAL
otherwise. Definition at line 40 of file berryExpression.cpp.
|
staticprotected |
|
pure virtual |
Evaluates this expression.
context | an evaluation context providing information like variable, name spaces, etc. necessary to evaluate this expression |
CoreException | if the evaluation failed. The concrete reason is defined by the subclass implementing this method |
Implemented in berry::FALSE_EVALExpression, and berry::TRUE_EVALExpression.
|
staticprotected |
Returns the hash code for the given object
. This method handles null
.
object | the object for which the hash code is desired; may be null . |
null
. Definition at line 53 of file berryExpression.cpp.
|
staticprotected |
Returns the hash code for the given array. This method handles null
.
array | the array for which the hash code is desired; may be null . |
null
. Definition at line 59 of file berryExpression.cpp.
References HASH_FACTOR, HashCode(), and qHash().
|
staticprotected |
|
overridevirtual |
Returns a hash code value for the object.
Reimplemented from berry::Object.
Definition at line 108 of file berryExpression.cpp.
References ComputeHashCode(), and HASH_CODE_NOT_COMPUTED.
Referenced by HashCode(), and operator==().
|
overridevirtual |
A generic comparison method. Override this method in subclasses and cast to your derived class to provide a more detailed comparison.
Reimplemented from berry::Object.
Definition at line 119 of file berryExpression.cpp.
References HashCode().
|
overridevirtual |
Returns a string representation of this object. The default implementation returns an empty string.
Reimplemented from berry::Object.
Definition at line 127 of file berryExpression.cpp.
|
static |
Name of the value attribute of an expression (value is value
).
Definition at line 61 of file berryExpression.h.
|
static |
The expression corresponding to EvaluationResult#FALSE_EVAL.
Definition at line 153 of file berryExpression.h.
|
static |
The constant integer hash code value meaning the hash code has not yet been computed.
Definition at line 51 of file berryExpression.h.
Referenced by Expression(), and HashCode().
|
static |
A factor for computing the hash code for all expressions.
Definition at line 56 of file berryExpression.h.
Referenced by HashCode().
|
static |
The expression corresponding to EvaluationResult#TRUE_EVAL.
Definition at line 148 of file berryExpression.h.