Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
berry::IEvaluationContext Struct Referenceabstract

#include <berryIEvaluationContext.h>

Inheritance diagram for berry::IEvaluationContext:
Collaboration diagram for berry::IEvaluationContext:

Public Member Functions

 berryObjectMacro (berry::IEvaluationContext)
 
 ~IEvaluationContext () override
 
virtual IEvaluationContextGetParent () const =0
 
virtual IEvaluationContextGetRoot () const =0
 
virtual void SetAllowPluginActivation (bool value)=0
 
virtual bool GetAllowPluginActivation () const =0
 
virtual Object::ConstPointer GetDefaultVariable () const =0
 
virtual void AddVariable (const QString &name, const Object::ConstPointer &value)=0
 
virtual Object::ConstPointer RemoveVariable (const QString &name)=0
 
virtual Object::ConstPointer GetVariable (const QString &name) const =0
 
virtual Object::ConstPointer ResolveVariable (const QString &name, const QList< Object::Pointer > &args) const =0
 
- 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 QString ToString () 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 Attributes

static Object::ConstPointer UNDEFINED_VARIABLE
 

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
 
- Static Public Member Functions inherited from berry::Object
static const char * GetStaticClassName ()
 
static Reflection::TypeInfo GetStaticTypeInfo ()
 
static QList< Reflection::TypeInfoGetStaticSuperclasses ()
 
- 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 context is used to manage a set of objects needed during XML expression evaluation. A context has a parent context, can manage a set of named variables and has a default variable. The default variable is used during XML expression evaluation if no explicit variable is referenced.

This interface is not intended to be implemented by clients. Clients are allowed to instantiate EvaluationContext.

Since
3.0

Definition at line 36 of file berryIEvaluationContext.h.

Constructor & Destructor Documentation

◆ ~IEvaluationContext()

berry::IEvaluationContext::~IEvaluationContext ( )
override

Member Function Documentation

◆ AddVariable()

virtual void berry::IEvaluationContext::AddVariable ( const QString &  name,
const Object::ConstPointer value 
)
pure virtual

Adds a new named variable to this context. If a variable with the name already exists the new one overrides the existing one.

Parameters
namethe variable's name
valuethe variable's value

Implemented in berry::EvaluationContext.

◆ berryObjectMacro()

berry::IEvaluationContext::berryObjectMacro ( berry::IEvaluationContext  )

◆ GetAllowPluginActivation()

virtual bool berry::IEvaluationContext::GetAllowPluginActivation ( ) const
pure virtual

Returns whether this evaluation context supports plug-in activation. If not set via SetAllowPluginActivation the parent value is returned. If no parent is set false is returned.

Returns
whether plug-in activation is supported or not
Since
3.2

Implemented in berry::EvaluationContext.

◆ GetDefaultVariable()

virtual Object::ConstPointer berry::IEvaluationContext::GetDefaultVariable ( ) const
pure virtual

Returns the default variable.

Returns
the default variable or null if no default variable is managed.

Implemented in berry::EvaluationContext.

◆ GetParent()

virtual IEvaluationContext* berry::IEvaluationContext::GetParent ( ) const
pure virtual

Returns the parent context or null if this is the root of the evaluation context hierarchy.

Returns
the parent evaluation context or null

Implemented in berry::EvaluationContext.

◆ GetRoot()

virtual IEvaluationContext* berry::IEvaluationContext::GetRoot ( ) const
pure virtual

Returns the root evaluation context.

Returns
the root evaluation context

Implemented in berry::EvaluationContext.

◆ GetVariable()

virtual Object::ConstPointer berry::IEvaluationContext::GetVariable ( const QString &  name) const
pure virtual

Returns the variable managed under the given name.

Parameters
namethe variable's name
Returns
the variable's value or null if the content doesn't manage a variable with the given name

Implemented in berry::EvaluationContext.

◆ RemoveVariable()

virtual Object::ConstPointer berry::IEvaluationContext::RemoveVariable ( const QString &  name)
pure virtual

Removes the variable managed under the given name from this evaluation context.

Parameters
namethe variable's name
Returns
the currently stored value or null if the variable doesn't exist

Implemented in berry::EvaluationContext.

◆ ResolveVariable()

virtual Object::ConstPointer berry::IEvaluationContext::ResolveVariable ( const QString &  name,
const QList< Object::Pointer > &  args 
) const
pure virtual

Resolves a variable for the given name and arguments. This method can be used to dynamically resolve variable such as plug-in descriptors, resources, etc. The method is used by the resolve expression.

Parameters
namethe variable to resolve
argsan object array of arguments used to resolve the variable
Returns
the variable's value or null if no variable can be resolved for the given name and arguments
Exceptions
CoreExceptionif an errors occurs while resolving the variable

Implemented in berry::EvaluationContext.

◆ SetAllowPluginActivation()

virtual void berry::IEvaluationContext::SetAllowPluginActivation ( bool  value)
pure virtual

Specifies whether this evaluation context allows activation of plug-ins for testers used in the expression tree. To actual trigger the plug-in loading this flag has to be set to true and the actual test expression must have the attribute forcePluginActivation set to true as well.

Parameters
valuewhether this evaluation context allows plug-in activation
Since
3.2

Implemented in berry::EvaluationContext.

Member Data Documentation

◆ UNDEFINED_VARIABLE

Object::ConstPointer berry::IEvaluationContext::UNDEFINED_VARIABLE
static

Represents the value used by variables that exist but are not defined in a evaluation context. When tested by the 'with' expression, false will be returned.

Definition at line 46 of file berryIEvaluationContext.h.


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