OMNeT++ Simulation Library  6.0.3
cResultListener Class Referenceabstract

#include <cresultlistener.h>

Description

Common abstract base class for result filters and result recorders.

Inheritance diagram for cResultListener:
cObject cIListener cResultFilter cResultRecorder cNumericResultFilter cObjectResultFilter ConstantFilter DemuxFilter IdentityFilter TimeFilter TotalCountFilter WarmupPeriodFilter cNumericResultRecorder TotalCountRecorder

Public Member Functions

virtual void receiveSignal (cComponent *source, simsignal_t signalID, bool b, cObject *details) override
 
virtual void receiveSignal (cComponent *source, simsignal_t signalID, intval_t l, cObject *details) override
 
virtual void receiveSignal (cComponent *source, simsignal_t signalID, uintval_t l, cObject *details) override
 
virtual void receiveSignal (cComponent *source, simsignal_t signalID, double d, cObject *details) override
 
virtual void receiveSignal (cComponent *source, simsignal_t signalID, const SimTime &v, cObject *details) override
 
virtual void receiveSignal (cComponent *source, simsignal_t signalID, const char *s, cObject *details) override
 
virtual void receiveSignal (cComponent *source, simsignal_t signalID, cObject *obj, cObject *details) override
 
virtual void subscribedTo (cComponent *component, simsignal_t signalID) override
 
virtual void unsubscribedFrom (cComponent *component, simsignal_t signalID) override
 
virtual void finish (cComponent *component, simsignal_t signalID) override
 
virtual int getSubscribeCount () const override
 
- Public Member Functions inherited from cObject
 cObject ()
 
 cObject (const cObject &other)=default
 
virtual ~cObject ()
 
virtual const char * getClassName () const
 
virtual const char * getName () const
 
bool isName (const char *s) const
 
virtual const char * getFullName () const
 
virtual std::string getFullPath () const
 
virtual std::string getClassAndFullName () const
 
virtual std::string getClassAndFullPath () const
 
const cObjectgetThisPtr () const
 
virtual std::string str () const
 
virtual std::ostream & printOn (std::ostream &os) const
 
virtual cObjectdup () const
 
virtual void parsimPack (cCommBuffer *buffer) const
 
virtual void parsimUnpack (cCommBuffer *buffer)
 
virtual cObjectgetOwner () const
 
virtual bool isOwnedObject () const
 
virtual bool isSoftOwner () const
 
virtual void forEachChild (cVisitor *v)
 
cObjectfindObject (const char *name, bool deep=true)
 
virtual cClassDescriptorgetDescriptor () const
 
void copyNotSupported () const
 
- Public Member Functions inherited from cIListener
 cIListener ()
 
 cIListener (const cIListener &other)
 
virtual ~cIListener ()
 

Additional Inherited Members

- Protected Member Functions inherited from cObject
virtual void take (cOwnedObject *obj)
 
virtual void drop (cOwnedObject *obj)
 
void dropAndDelete (cOwnedObject *obj)
 
- Protected Member Functions inherited from cIListener
virtual void unsubscribeAll ()
 

Member Function Documentation

◆ receiveSignal() [1/7]

virtual void receiveSignal ( cComponent source,
simsignal_t  signalID,
bool  b,
cObject details 
)
overridevirtual

Receive an emitted signal. Note that cIListener declares several overloaded receiveSignal() methods, one for each data type (except that all integer types are merged to the long and unsigned long types). The "source" argument is the channel or module on which the emit() method was invoked, and NOT the one at which this listener is subscribed.

It is not allowed inside a receiveSignal() call to unsubscribe from the signal being received – it will cause an error to be thrown. (This is to prevent interesting cases when the listener list is being modified while the component iterates on it. The alternative would be to make a temporary copy of the listener list each time, but that is not desirable for performance reasons.)

Implements cIListener.

◆ receiveSignal() [2/7]

virtual void receiveSignal ( cComponent source,
simsignal_t  signalID,
intval_t  i,
cObject details 
)
overridevirtual

Receive an emitted signed integer value. See receiveSignal(cComponent*,simsignal_t,bool,cObject*) for more info.

Implements cIListener.

◆ receiveSignal() [3/7]

virtual void receiveSignal ( cComponent source,
simsignal_t  signalID,
uintval_t  i,
cObject details 
)
overridevirtual

Receive an emitted unsigned integer value. See receiveSignal(cComponent*,simsignal_t,bool,cObject*) for more info.

Implements cIListener.

◆ receiveSignal() [4/7]

virtual void receiveSignal ( cComponent source,
simsignal_t  signalID,
double  d,
cObject details 
)
overridevirtual

Receive an emitted double value. See receiveSignal(cComponent*,simsignal_t,bool,cObject*) for more info.

Implements cIListener.

◆ receiveSignal() [5/7]

virtual void receiveSignal ( cComponent source,
simsignal_t  signalID,
const SimTime t,
cObject details 
)
overridevirtual

Receive an emitted simtime_t value. See receiveSignal(cComponent*,simsignal_t,bool,cObject*) for more info.

Implements cIListener.

◆ receiveSignal() [6/7]

virtual void receiveSignal ( cComponent source,
simsignal_t  signalID,
const char *  s,
cObject details 
)
overridevirtual

Receive an emitted string value. See receiveSignal(cComponent*,simsignal_t,bool,cObject*) for more info.

Implements cIListener.

◆ receiveSignal() [7/7]

virtual void receiveSignal ( cComponent source,
simsignal_t  signalID,
cObject obj,
cObject details 
)
overridevirtual

Receive an emitted cObject value. See receiveSignal(cComponent*,simsignal_t,bool,cObject*) for more info.

Implements cIListener.

◆ subscribedTo()

virtual void subscribedTo ( cComponent component,
simsignal_t  signalID 
)
overridevirtual

Called when this object was added to the given component's given signal as a listener. (It won't be called from subscribe() if this listener was already subscribed.)

Reimplemented from cIListener.

◆ unsubscribedFrom()

virtual void unsubscribedFrom ( cComponent component,
simsignal_t  signalID 
)
overridevirtual

Called when this object was removed from the given component's listener list for the given signal. (It won't be called from unsubscribe() if this listener was already unsubscribed.)

It is OK for the listener to delete itself in this method (delete this). However, in that case, since this method is called more than once if the listener is subscribed multiple times, one must be careful to prevent double deletion.

Note that due to the way C++ destructors work with regard to inheritance, overrides of this method won't be called if the unsubscription takes place from within the destructor of the super class (usually cIListener). A workaround is to redefine the destructor in your listener class, and already call unsubscribeAll() from there.

Reimplemented from cIListener.

◆ finish()

virtual void finish ( cComponent component,
simsignal_t  signalID 
)
overridevirtual

Called by a component on its local listeners after the component's finish() method was called. If the listener is subscribed to multiple signals or at multiple components, the method will be called multiple times. Note that finish() methods in general are not invoked if the simulation terminates with an error.

Reimplemented from cIListener.

◆ getSubscribeCount()

virtual int getSubscribeCount ( ) const
inlineoverridevirtual

Returns the number of listener lists that contain this listener.

Reimplemented from cIListener.

References cIListener::getSubscribeCount().


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