Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
berry::AbstractSourceProvider Class Reference

#include <berryAbstractSourceProvider.h>

Inheritance diagram for berry::AbstractSourceProvider:
Collaboration diagram for berry::AbstractSourceProvider:

Public Member Functions

 berryObjectMacro (berry::AbstractSourceProvider)
 
void AddSourceProviderListener (ISourceProviderListener *listener) override
 
void RemoveSourceProviderListener (ISourceProviderListener *listener) override
 
virtual void Initialize (IServiceLocator *locator)
 
- Public Member Functions inherited from berry::ISourceProvider
 berryObjectMacro (berry::ISourceProvider)
 
 ~ISourceProvider () override
 
virtual StateMapType GetCurrentState () const =0
 
virtual QList< QString > GetProvidedSourceNames () 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 bool DEBUG
 

Protected Member Functions

void FireSourceChanged (int sourcePriority, const QString &sourceName, Object::ConstPointer sourceValue)
 
void FireSourceChanged (int sourcePriority, const QHash< QString, Object::ConstPointer > &sourceValuesByName)
 
void LogDebuggingInfo (const QString &message)
 
- 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::ISourceProvider
typedef QHash< QString, Object::ConstPointerStateMapType
 
- 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 Attributes inherited from berry::Object
QAtomicInt m_ReferenceCount
 
QMutex m_ReferenceCountLock
 

Detailed Description

An implementation of ISourceProvider that provides listener support. Subclasses need only call fireSourceChanged whenever appropriate.

Definition at line 32 of file berryAbstractSourceProvider.h.

Member Function Documentation

◆ AddSourceProviderListener()

void berry::AbstractSourceProvider::AddSourceProviderListener ( ISourceProviderListener listener)
overridevirtual

Adds a listener to this source provider. This listener will be notified whenever the corresponding source changes.

Parameters
listenerThe listener to add; must not be null.

Implements berry::ISourceProvider.

◆ berryObjectMacro()

berry::AbstractSourceProvider::berryObjectMacro ( berry::AbstractSourceProvider  )

◆ FireSourceChanged() [1/2]

void berry::AbstractSourceProvider::FireSourceChanged ( int  sourcePriority,
const QHash< QString, Object::ConstPointer > &  sourceValuesByName 
)
protected

Notifies all listeners that multiple sources have changed.

Parameters
sourcePriorityThe source priority that has changed.
sourceValuesByNameThe map of source names (String) to source values (Object) that have changed; must not be null. The names must not be null, but the values may be null.

◆ FireSourceChanged() [2/2]

void berry::AbstractSourceProvider::FireSourceChanged ( int  sourcePriority,
const QString &  sourceName,
Object::ConstPointer  sourceValue 
)
protected

Notifies all listeners that a single source has changed.

Parameters
sourcePriorityThe source priority that has changed.
sourceNameThe name of the source that has changed; must not be null.
sourceValueThe new value for the source; may be null.

◆ Initialize()

virtual void berry::AbstractSourceProvider::Initialize ( IServiceLocator locator)
virtual

This method is called when the source provider is instantiated by org.blueberry.ui.services. Clients may override this method to perform initialization.

Parameters
locatorThe global service locator. It can be used to retrieve services like the IContextService

◆ LogDebuggingInfo()

void berry::AbstractSourceProvider::LogDebuggingInfo ( const QString &  message)
protected

Logs a debugging message in an appropriate manner. If the message is null or the DEBUG is false, then this method does nothing.

Parameters
messageThe debugging message to log; if null, then nothing is logged.

◆ RemoveSourceProviderListener()

void berry::AbstractSourceProvider::RemoveSourceProviderListener ( ISourceProviderListener listener)
overridevirtual

Removes a listener from this source provider. This listener will be notified whenever the corresponding source changes.

Parameters
listenerThe listener to remove; must not be null.

Implements berry::ISourceProvider.

Member Data Documentation

◆ DEBUG

bool berry::AbstractSourceProvider::DEBUG
static

Whether source providers should print out debugging information to the console when events arrive.

Definition at line 88 of file berryAbstractSourceProvider.h.


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