Skip to main content

clone

virtual Event* clone();

clone() can be implemented by event classes for copying the event.

Parameters

  • returns A copy of the event

Example

Excerpt from sst-elements/src/sst/merlin/router.h
// Implement a clone function that can 
// be used to copy a RtrEvent for broadcasts
virtual RtrEvent* clone() override {
RtrEvent * ret = new RtrEvent(*this);
ret->request = this->request->clone(); // Clone the request that this event wraps
return ret;
}
#include <sst/core/event.h>