Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berry::EvaluationResult Class Reference

#include <berryEvaluationResult.h>

Inheritance diagram for berry::EvaluationResult:
Collaboration diagram for berry::EvaluationResult:

Public Member Functions

 berryObjectMacro (berry::EvaluationResult) bool operator
 
bool operator!= (const Object *) const
 
EvaluationResult::ConstPointer And (const EvaluationResult::ConstPointer &other) const
 
EvaluationResult::ConstPointer Or (const EvaluationResult::ConstPointer &other) const
 
EvaluationResult::ConstPointer Not () const
 
QString ToString () const override
 
- Public Member Functions inherited from berry::Object
virtual QString GetClassName () const
 
virtual Reflection::TypeInfo GetTypeInfo () const
 
virtual QList< Reflection::TypeInfoGetSuperclasses () const
 
virtual void Delete ()
 
QDebug Print (QDebug os, Indent Indent=0) const
 
virtual uint HashCode () 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
 
virtual bool operator== (const Object *) const
 

Static Public Member Functions

static EvaluationResult::ConstPointer ValueOf (bool b)
 
- Static Public Member Functions inherited from berry::Object
static const char * GetStaticClassName ()
 
static Reflection::TypeInfo GetStaticTypeInfo ()
 
static QList< Reflection::TypeInfoGetStaticSuperclasses ()
 

Static Public Attributes

static const SmartPointer< const EvaluationResultFALSE_EVAL
 
static const SmartPointer< const EvaluationResultTRUE_EVAL
 
static const SmartPointer< const EvaluationResultNOT_LOADED
 

Additional Inherited Members

- Public Types inherited from berry::Object
typedef Object Self
 
typedef berry::SmartPointer< SelfPointer
 
typedef berry::SmartPointer< const SelfConstPointer
 
typedef berry::WeakPointer< SelfWeakPtr
 
typedef berry::WeakPointer< const SelfConstWeakPtr
 
- 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
 
- Protected Attributes inherited from berry::Object
QAtomicInt m_ReferenceCount
 
QMutex m_ReferenceCountLock
 

Detailed Description

An evaluation result represents the result of an expression evaluation. There are exact three instances of evaluation result. They are: FALSE_EVAL, TRUE_EVAL and NOT_LOADED. NOT_LOADED represents the fact that an expression couldn't be evaluated since a plug-in providing certain test expressions isn't loaded yet.

In addition the class implements the three operation and , or and not. The operation are defined as follows:

The and operation:

<col width="120"> <col width="120"> <col width="120"> <col width="120"> </colgroup> <tbody>

AND

FALSE_EVAL

TRUE_EVAL

NOT_LOADED

FALSE_EVAL

FALSE_EVAL

FALSE_EVAL

FALSE_EVAL

TRUE_EVAL

FALSE_EVAL

TRUE_EVAL

NOT_LOADED

NOT_LOADED

FALSE_EVAL

NOT_LOADED

NOT_LOADED </tbody>

The or operation:

<col width="120"> <col width="120"> <col width="120"> <col width="120"> </colgroup> <tbody>

OR

FALSE_EVAL

TRUE_EVAL

NOT_LOADED

FALSE_EVAL

FALSE_EVAL

TRUE_EVAL

NOT_LOADED

TRUE_EVAL

TRUE_EVAL

TRUE_EVAL

TRUE_EVAL

NOT_LOADED

NOT_LOADED

TRUE_EVAL

NOT_LOADED </tbody>

The not operation:

<col width="120"> <col width="120"> <col width="120"> <col width="120"> </colgroup> <tbody>

NOT

FALSE_EVAL

TRUE_EVAL

NOT_LOADED

TRUE_EVAL

FALSE_EVAL

NOT_LOADED </tbody>

The class is not intended to be subclassed by clients.

Since
3.0

Definition at line 145 of file berryEvaluationResult.h.

Member Function Documentation

EvaluationResult::ConstPointer berry::EvaluationResult::And ( const EvaluationResult::ConstPointer other) const

Returns an EvaluationResult whose value is this && other).

Parameters
otherthe right hand side of the and operation.
Returns
this && other as defined by the evaluation result

Definition at line 75 of file berryEvaluationResult.cpp.

berry::EvaluationResult::berryObjectMacro ( berry::EvaluationResult  )
EvaluationResult::ConstPointer berry::EvaluationResult::Not ( ) const

Returns the inverted value of this evaluation result

Returns
the inverted value of this evaluation result

Definition at line 88 of file berryEvaluationResult.cpp.

bool berry::EvaluationResult::operator!= ( const Object result) const

Definition at line 38 of file berryEvaluationResult.cpp.

EvaluationResult::ConstPointer berry::EvaluationResult::Or ( const EvaluationResult::ConstPointer other) const

Returns an EvaluationResult whose value is this || other).

Parameters
otherthe right hand side of the or operation.
Returns
this || other as defined by the evaluation result

Definition at line 81 of file berryEvaluationResult.cpp.

QString berry::EvaluationResult::ToString ( ) const
overridevirtual

For debugging purpose only

Returns
a string representing this object. The result is not human readable

Reimplemented from berry::Object.

Definition at line 100 of file berryEvaluationResult.cpp.

EvaluationResult::ConstPointer berry::EvaluationResult::ValueOf ( bool  b)
static

Returns an evaluation result instance representing the given boolean value. If the given boolean value is TRUE_EVAL then ExpressionResult.TRUE_EVAL is returned. If the value is FALSE_EVAL then ExpressionResult.FALSE_EVAL is returned.

Parameters
ba boolean value
Returns
the expression result representing the boolean value

Definition at line 94 of file berryEvaluationResult.cpp.

References FALSE_EVAL, and TRUE_EVAL.

Member Data Documentation

const SmartPointer< const EvaluationResult > berry::EvaluationResult::FALSE_EVAL
static

The evaluation result representing the value FALSE

Definition at line 158 of file berryEvaluationResult.h.

Referenced by berry::FALSE_EVALExpression::Evaluate(), and ValueOf().

const SmartPointer< const EvaluationResult > berry::EvaluationResult::NOT_LOADED
static

The evaluation result representing the value NOT_LOADED

Definition at line 162 of file berryEvaluationResult.h.

const SmartPointer< const EvaluationResult > berry::EvaluationResult::TRUE_EVAL
static

The evaluation result representing the value TRUE

Definition at line 160 of file berryEvaluationResult.h.

Referenced by berry::TRUE_EVALExpression::Evaluate(), and ValueOf().


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