ML Reference
MeVis/Foundation/Sources/MLUtilities/mlEventSource.h File Reference

Define EventSource class that adds event listener handling to Base and a BaseEvent class needed for that. More...

#include "mlBase.h"

Go to the source code of this file.

Classes

class  ml::EventSource
 EventSourceBase class adds event listener handling to Base. More...
struct  ml::EventSource::ListenerEntry
 we use this structure instead of a std::pair to get nicer code
class  ml::BaseEvent
 BaseEvent is the base class for all events emitted from EventSourceBase. More...
class  ml::EventSourceDeletedEvent
 EventSourceRemovedEvent is used to indicate when the EventSourceBase object is removed. More...

Namespaces

namespace  ml
 

Define the namespace name like in the ML. Default is ml.


Typedefs

typedef void ml::BaseEventCallback (void *, BaseEvent *)

Functions

template<typename ToTypePtr >
ToTypePtr mlbaseevent_cast (ml::BaseEvent *from)
 cast operation for safely casting BaseEvents to derived types
template<typename ToTypePtr >
ToTypePtr mlbaseevent_cast (const ml::BaseEvent *from)
 Overload of the above template function, which makes conversion of const-pointers possible.

Detailed Description

Define EventSource class that adds event listener handling to Base and a BaseEvent class needed for that.

Author:
Uwe Siems
Date:
06/2011

Definition in file mlEventSource.h.


Function Documentation

template<typename ToTypePtr >
ToTypePtr mlbaseevent_cast ( ml::BaseEvent from) [inline]

cast operation for safely casting BaseEvents to derived types

Definition at line 113 of file mlEventSource.h.

template<typename ToTypePtr >
ToTypePtr mlbaseevent_cast ( const ml::BaseEvent from) [inline]

Overload of the above template function, which makes conversion of const-pointers possible.

Definition at line 127 of file mlEventSource.h.