rmw icon indicating copy to clipboard operation
rmw copied to clipboard

move the functions from rmw.h into multiple separate files

Open reed-lau opened this issue 5 years ago • 2 comments

https://github.com/ros2/rmw/blob/28f91855510c3c832b500fae40fdcc4169d26a0d/rmw/include/rmw/event.h#L16

here the event-related function is declared in a isolated event.h header file, but it is not included in the rmw.h. when we implement a rmw-xxx, we have to include another rmw/event.h, why the event is so special.

reed-lau avatar Feb 27 '20 07:02 reed-lau

I would rather ask the opposite question: why should everything be declared in a single header? The fact that this single header contains numerous unrelated function declarations and is 1000+ lines long would instead encourage me to split it up into separate files - each containing only functions of a specific category (e.g. pub/sub in one, services in another, etc.).

dirk-thomas avatar Feb 28 '20 16:02 dirk-thomas

each containing only functions of a specific category

that sounds great! I just mean, event is not special enough.

reed-lau avatar Feb 28 '20 17:02 reed-lau