Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
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== (const Object *) const override
 
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
 

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:

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

The or operation:

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

The not operation:

NOT FALSE_EVAL TRUE_EVAL NOT_LOADED
TRUE_EVAL FALSE_EVAL NOT_LOADED

The class is not intended to be subclassed by clients.

Since
3.0

Definition at line 117 of file berryEvaluationResult.h.

Member Function Documentation

◆ And()

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

◆ berryObjectMacro()

berry::EvaluationResult::berryObjectMacro ( berry::EvaluationResult  )

◆ Not()

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

Returns the inverted value of this evaluation result

Returns
the inverted value of this evaluation result

◆ operator!=()

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

◆ operator==()

bool berry::EvaluationResult::operator== ( const Object ) const
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.

◆ Or()

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

◆ ToString()

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.

◆ ValueOf()

static 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

Member Data Documentation

◆ FALSE_EVAL

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

The evaluation result representing the value FALSE

Definition at line 130 of file berryEvaluationResult.h.

Referenced by berry::FALSE_EVALExpression::Evaluate().

◆ NOT_LOADED

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

The evaluation result representing the value NOT_LOADED

Definition at line 134 of file berryEvaluationResult.h.

◆ TRUE_EVAL

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

The evaluation result representing the value TRUE

Definition at line 132 of file berryEvaluationResult.h.

Referenced by berry::TRUE_EVALExpression::Evaluate().


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