19 #include "tlm_gp_shared.h"
28 virtual tlm_extension_base* clone()
const {
32 virtual void copy_from(tlm_extension_base
const& from) {
id =
static_cast<tlm_id_extension const&
>(from).
id; }
42 inline uintptr_t getId(tlm::tlm_generic_payload& gp) {
46 return (uintptr_t)&gp;
49 inline uintptr_t getId(tlm::tlm_generic_payload* gp) {
52 if(
auto ext = gp->get_extension<tlm_id_extension>())
58 inline void setId(tlm::tlm_generic_payload& gp, uintptr_t
id) {
59 if(
auto ext = gp.get_extension<tlm_id_extension>())
62 gp.set_auto_extension(
new tlm_id_extension(
id));
64 gp.set_extension(
new tlm_id_extension(
id));
tlm::tlm_generic_payload * get() const noexcept
Return the stored pointer.