17 #ifndef _TLM_SCC_LWTR_LWTR4TLM2_EXTENSION__REGISTRY_H
18 #define _TLM_SCC_LWTR_LWTR4TLM2_EXTENSION__REGISTRY_H
20 #include "lwtr4tlm2.h"
40 virtual void recordBeginTx(::lwtr::tx_handle& handle,
typename TYPES::tlm_payload_type& trans) = 0;
46 virtual void recordEndTx(::lwtr::tx_handle& handle,
typename TYPES::tlm_payload_type& trans) = 0;
67 if(
id >= ext_rec.size())
68 ext_rec.resize(
id + 1);
74 const std::vector<lwtr4tlm2_extension_registry_if<TYPES>*>& get() {
return ext_rec; }
76 inline void recordBeginTx(
size_t id, ::lwtr::tx_handle& handle,
typename TYPES::tlm_payload_type& trans) {
77 if(ext_rec.size() >
id && ext_rec[
id])
78 ext_rec[id]->recordBeginTx(handle, trans);
85 inline void recordEndTx(
size_t id, ::lwtr::tx_handle& handle,
typename TYPES::tlm_payload_type& trans) {
86 if(ext_rec.size() >
id && ext_rec[
id])
87 ext_rec[id]->recordEndTx(handle, trans);
93 for(
auto& ext : ext_rec)
96 std::vector<lwtr4tlm2_extension_registry_if<TYPES>*> ext_rec{};
The TLM transaction extensions recorder interface.
virtual void recordEndTx(::lwtr::tx_handle &handle, typename TYPES::tlm_payload_type &trans)=0
recording attributes in extensions at the end, it is intended to be overload as it does nothing
virtual void recordBeginTx(::lwtr::tx_handle &handle, typename TYPES::tlm_payload_type &trans)=0
recording attributes in extensions at the beginning, it is intended to be overload as it does nothing
The TLM transaction extensions recorder registry.
void recordEndTx(size_t id, ::lwtr::tx_handle &handle, typename TYPES::tlm_payload_type &trans)
recording attributes in extensions at the end, it is intended to be overload as it does nothing