Medical Imaging Interaction Toolkit
2024.06.00
Medical Imaging Interaction Toolkit
|
#include <berryEvaluationContext.h>
Public Member Functions | |
EvaluationContext (IEvaluationContext *parent, const Object::ConstPointer &defaultVariable) | |
EvaluationContext (IEvaluationContext *parent, const Object::ConstPointer &defaultVariable, const std::vector< IVariableResolver * > &resolvers) | |
IEvaluationContext * | GetParent () const override |
IEvaluationContext * | GetRoot () const override |
Object::ConstPointer | GetDefaultVariable () const override |
void | SetAllowPluginActivation (bool value) override |
bool | GetAllowPluginActivation () const override |
void | AddVariable (const QString &name, const Object::ConstPointer &value) override |
Object::ConstPointer | RemoveVariable (const QString &name) override |
Object::ConstPointer | GetVariable (const QString &name) const override |
Object::ConstPointer | ResolveVariable (const QString &name, const QList< Object::Pointer > &args) const override |
Public Member Functions inherited from berry::IEvaluationContext | |
berryObjectMacro (berry::IEvaluationContext) | |
~IEvaluationContext () 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 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 |
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 () |
Static Public Attributes inherited from berry::IEvaluationContext | |
static Object::ConstPointer | UNDEFINED_VARIABLE |
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 |
A default implementation of an evaluation context.
Clients may instantiate this default context. The class is not intended to be subclassed by clients.
Definition at line 37 of file berryEvaluationContext.h.
berry::EvaluationContext::EvaluationContext | ( | IEvaluationContext * | parent, |
const Object::ConstPointer & | defaultVariable | ||
) |
Create a new evaluation context with the given parent and default variable.
parent | the parent context. Can be null . |
defaultVariable | the default variable |
berry::EvaluationContext::EvaluationContext | ( | IEvaluationContext * | parent, |
const Object::ConstPointer & | defaultVariable, | ||
const std::vector< IVariableResolver * > & | resolvers | ||
) |
Create a new evaluation context with the given parent and default variable.
parent | the parent context. Can be null . |
defaultVariable | the default variable |
resolvers | an array of IVariableResolvers to resolve additional variables. |
|
overridevirtual |
Adds a new named variable to this context. If a variable with the name already exists the new one overrides the existing one.
name | the variable's name |
value | the variable's value |
Implements berry::IEvaluationContext.
|
overridevirtual |
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.
Implements berry::IEvaluationContext.
|
overridevirtual |
Returns the default variable.
null
if no default variable is managed.Implements berry::IEvaluationContext.
|
overridevirtual |
Returns the parent context or null
if this is the root of the evaluation context hierarchy.
null
Implements berry::IEvaluationContext.
|
overridevirtual |
Returns the root evaluation context.
Implements berry::IEvaluationContext.
|
overridevirtual |
Returns the variable managed under the given name.
name | the variable's name |
null
if the content doesn't manage a variable with the given nameImplements berry::IEvaluationContext.
|
overridevirtual |
Removes the variable managed under the given name from this evaluation context.
name | the variable's name |
null
if the variable doesn't existImplements berry::IEvaluationContext.
|
overridevirtual |
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.
name | the variable to resolve |
args | an object array of arguments used to resolve the variable |
null
if no variable can be resolved for the given name and arguments CoreException | if an errors occurs while resolving the variable |
Implements berry::IEvaluationContext.
|
overridevirtual |
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.
value | whether this evaluation context allows plug-in activation |
Implements berry::IEvaluationContext.