NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Public Types | Public Member Functions | Protected Member Functions | List of all members
niftk::ItkSignalCollector Class Reference

Class for collecting ITK signals and sending notifications of them to registered listeners. More...

Inheritance diagram for niftk::ItkSignalCollector:
Inheritance graph
[legend]
Collaboration diagram for niftk::ItkSignalCollector:
Collaboration graph
[legend]

Public Types

typedef std::pair< const
itk::Object
*, itk::EventObject * > 
Signal
 
typedef std::vector< SignalSignals
 

Public Member Functions

 mitkClassMacroItkParent (ItkSignalCollector, itk::Command) static Pointer New()
 
void Connect (itk::Object *object, const itk::EventObject &event)
 Connects this object to the events of the given object. The current object will collect the given type of signals of that object. More...
 
void AddListener (ItkSignalListener *listener)
 Adds a listener that will get notified of the ITK signals that this object is connected to. More...
 
void RemoveListener (ItkSignalListener *listener)
 Removes a listener. The listener will not get notified about the ITK signals observed by the current object, any more. More...
 
const SignalsGetSignals () const
 Gets the signals collected by this object. More...
 
Signals GetSignals (const itk::EventObject &event) const
 Returns a set of the collected ITK signals that are of the given type or its subtype. More...
 
Signals GetSignals (const itk::Object *object, const itk::EventObject &event=itk::AnyEvent()) const
 Returns a set of the collected ITK signals that are sent from the given object, and are of the given type or its subtype. More...
 
virtual void Clear ()
 Clears all the signals collected by now. More...
 
virtual void ProcessEvent (const itk::Object *object, const itk::EventObject &event)
 Adds the object-event pair to the list of collected signals. More...
 

Protected Member Functions

 ItkSignalCollector ()
 Constructs an ItkSignalCollector object. More...
 
virtual ~ItkSignalCollector ()
 Destructs an ItkSignalCollector object. More...
 
virtual void PrintSelf (std::ostream &os, itk::Indent indent) const override
 Prints the collected signals to the given stream or to the standard output if no stream is given. More...
 

Detailed Description

Class for collecting ITK signals and sending notifications of them to registered listeners.

Member Typedef Documentation

typedef std::pair<const itk::Object*, itk::EventObject*> niftk::ItkSignalCollector::Signal

Constructor & Destructor Documentation

niftk::ItkSignalCollector::ItkSignalCollector ( )
protected

Constructs an ItkSignalCollector object.

niftk::ItkSignalCollector::~ItkSignalCollector ( )
protectedvirtual

Destructs an ItkSignalCollector object.

Member Function Documentation

void niftk::ItkSignalCollector::AddListener ( ItkSignalListener listener)

Adds a listener that will get notified of the ITK signals that this object is connected to.

void niftk::ItkSignalCollector::Clear ( void  )
virtual

Clears all the signals collected by now.

Destruct the copies of the original events.

Remove the elements.

void niftk::ItkSignalCollector::Connect ( itk::Object *  object,
const itk::EventObject &  event 
)

Connects this object to the events of the given object. The current object will collect the given type of signals of that object.

const ItkSignalCollector::Signals & niftk::ItkSignalCollector::GetSignals ( ) const

Gets the signals collected by this object.

ItkSignalCollector::Signals niftk::ItkSignalCollector::GetSignals ( const itk::EventObject &  event) const

Returns a set of the collected ITK signals that are of the given type or its subtype.

ItkSignalCollector::Signals niftk::ItkSignalCollector::GetSignals ( const itk::Object *  object,
const itk::EventObject &  event = itk::AnyEvent() 
) const

Returns a set of the collected ITK signals that are sent from the given object, and are of the given type or its subtype.

niftk::ItkSignalCollector::mitkClassMacroItkParent ( ItkSignalCollector  ,
itk::Command   
)
void niftk::ItkSignalCollector::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotectedvirtual

Prints the collected signals to the given stream or to the standard output if no stream is given.

void niftk::ItkSignalCollector::ProcessEvent ( const itk::Object *  object,
const itk::EventObject &  event 
)
virtual

Adds the object-event pair to the list of collected signals.

Create a copy of the event as a newly allocated object.

void niftk::ItkSignalCollector::RemoveListener ( ItkSignalListener listener)

Removes a listener. The listener will not get notified about the ITK signals observed by the current object, any more.


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