SST  15.1.0
StructuralSimulationToolkit
SST::SSTHandlerBase< void, argT >::InterceptPoint Class Referenceabstract

Attach Point to intercept the data being delivered by a Handler. More...

#include <ssthandler.h>

Public Member Functions

virtual uintptr_t registerHandlerIntercept (const AttachPointMetaData &mdata)=0
 Function that will be called when a handler is registered with the tool implementing the intercept attach point. More...
 
virtual void interceptHandler (uintptr_t key, argT &data, bool &cancel)=0
 Function that will be called before the event handler to let the attach point intercept the data. More...
 
virtual void serializeHandlerInterceptPointKey (SST::Core::Serialization::serializer &UNUSED(ser), uintptr_t &UNUSED(key))
 Function that will be called to handle the key returned from registerHandlerIntercept, if the AttachPoint tool is serializable. More...
 

Detailed Description

template<typename argT>
class SST::SSTHandlerBase< void, argT >::InterceptPoint

Attach Point to intercept the data being delivered by a Handler.

Class is not usable for Handlers that don't take a parameter and/or return a value

Member Function Documentation

◆ interceptHandler()

template<typename argT >
virtual void SST::SSTHandlerBase< void, argT >::InterceptPoint::interceptHandler ( uintptr_t  key,
argT &  data,
bool &  cancel 
)
pure virtual

Function that will be called before the event handler to let the attach point intercept the data.

The data can be modified, and if cancel is set to true, the handler will not be executed. If cancel is set to true and the ownership of a pointer is passed by the call to the handler, then the function should also delete the data.

Parameters
keyKey that was returned from registerHandlerIntercept() function
dataData that is to be passed to the handler
[out]cancelSet to true if the handler delivery should be cancelled.

◆ registerHandlerIntercept()

template<typename argT >
virtual uintptr_t SST::SSTHandlerBase< void, argT >::InterceptPoint::registerHandlerIntercept ( const AttachPointMetaData mdata)
pure virtual

Function that will be called when a handler is registered with the tool implementing the intercept attach point.

The metadata passed in will be dependent on what type of tool this is attached to. The uintptr_t returned from this function will be passed into the intercept() function.

Parameters
mdataMetadata to be passed into the tool
Returns
Opaque key that will be passed back into interceptHandler() calls

◆ serializeHandlerInterceptPointKey()

template<typename argT >
virtual void SST::SSTHandlerBase< void, argT >::InterceptPoint::serializeHandlerInterceptPointKey ( SST::Core::Serialization::serializer UNUSEDser,
uintptr_t &  UNUSEDkey 
)
inlinevirtual

Function that will be called to handle the key returned from registerHandlerIntercept, if the AttachPoint tool is serializable.

This is needed because the key is opaque to the Link, so it doesn't know how to handle it during serialization. During SIZE and PACK phases of serialization, the tool needs to store out any information that will be needed to recreate data that is reliant on the key. On UNPACK, the function needs to recreate any state and reinitialize the passed in key reference to the proper state to continue to make valid calls to interceptHandler().

Since not all tools will be serializable, there is a default, empty implementation.

Parameters
serSerializer to use for serialization
keyKey that would be passed into the interceptHandler() function.

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