Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
berry::ElementHandler Class Referenceabstract

#include <berryElementHandler.h>

Inheritance diagram for berry::ElementHandler:
Collaboration diagram for berry::ElementHandler:

Public Member Functions

 berryObjectMacro (ElementHandler)
 
 ~ElementHandler () override
 
virtual SmartPointer< ExpressionCreate (ExpressionConverter *converter, SmartPointer< IConfigurationElement > config)=0
 
virtual SmartPointer< ExpressionCreate (ExpressionConverter *converter, Poco::XML::Element *element)
 
- 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 Member Functions

static ElementHandler::Pointer GetDefault ()
 
- Static Public Member Functions inherited from berry::Object
static const char * GetStaticClassName ()
 
static Reflection::TypeInfo GetStaticTypeInfo ()
 
static QList< Reflection::TypeInfoGetStaticSuperclasses ()
 

Protected Member Functions

virtual void ProcessChildren (ExpressionConverter *converter, SmartPointer< IConfigurationElement > element, SmartPointer< CompositeExpression > expression)
 
virtual void ProcessChildren (ExpressionConverter *converter, Poco::XML::Element *element, SmartPointer< CompositeExpression > expression)
 
- 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
 

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 Attributes inherited from berry::Object
QAtomicInt m_ReferenceCount
 
QMutex m_ReferenceCountLock
 

Detailed Description

An element handler converts an IConfigurationElement into a corresponding expression object.

The class should be subclassed by clients wishing to provide an element handler for special expressions.

Since
3.0

Definition at line 43 of file berryElementHandler.h.

Constructor & Destructor Documentation

◆ ~ElementHandler()

berry::ElementHandler::~ElementHandler ( )
override

Member Function Documentation

◆ berryObjectMacro()

berry::ElementHandler::berryObjectMacro ( ElementHandler  )

◆ Create() [1/2]

virtual SmartPointer<Expression> berry::ElementHandler::Create ( ExpressionConverter converter,
Poco::XML::Element *  element 
)
virtual

Creates the corresponding expression for the given DOM element. This is an optional operation that is only required if the handler supports conversion of DOM elements.

Parameters
converterthe expression converter used to initiate the conversion process
elementthe DOM element to convert
Returns
the corresponding expression
Exceptions
CoreExceptionif the conversion failed
Since
3.3

◆ Create() [2/2]

virtual SmartPointer<Expression> berry::ElementHandler::Create ( ExpressionConverter converter,
SmartPointer< IConfigurationElement config 
)
pure virtual

Creates the corresponding expression for the given configuration element.

Parameters
converterthe expression converter used to initiate the conversion process
configthe configuration element to convert
Returns
the corresponding expression
Exceptions
CoreExceptionif the conversion failed

◆ GetDefault()

static ElementHandler::Pointer berry::ElementHandler::GetDefault ( )
static

The default element handler which can cope with all XML expression elements defined by the common expression language.

Returns
the default element handler

◆ ProcessChildren() [1/2]

virtual void berry::ElementHandler::ProcessChildren ( ExpressionConverter converter,
Poco::XML::Element *  element,
SmartPointer< CompositeExpression >  expression 
)
protectedvirtual

Converts the children of the given DOM element and adds them to the given composite expression.

Note this is an internal method and should not be called by clients.

Parameters
converterthe converter used to do the actual conversion
elementthe DOM element for which the children are to be processed
expressionthe composite expression representing the result of the conversion
Exceptions
CoreExceptionif the conversion failed
Since
3.3

◆ ProcessChildren() [2/2]

virtual void berry::ElementHandler::ProcessChildren ( ExpressionConverter converter,
SmartPointer< IConfigurationElement element,
SmartPointer< CompositeExpression >  expression 
)
protectedvirtual

Converts the children of the given configuration element and adds them to the given composite expression.

Note this is an internal method and should not be called by clients.

Parameters
converterthe converter used to do the actual conversion
elementthe configuration element for which the children are to be processed
expressionthe composite expression representing the result of the conversion
Exceptions
CoreExceptionif the conversion failed

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