The main reason for this is that putting it in the header file means that it is duplicated into every compilation unit that includes it. This is slow, and in theory can cause issues if a pointer to the map is passed between compilation units.
Instead, hide the map inside of the events.cpp file, and add a free function that converts between an RMW event type and a Zenoh event type.
The main reason for this is that putting it in the header file means that it is duplicated into every compilation unit that includes it. This is slow, and in theory can cause issues if a pointer to the map is passed between compilation units.
Instead, hide the map inside of the events.cpp file, and add a free function that converts between an RMW event type and a Zenoh event type.