iceoryx icon indicating copy to clipboard operation
iceoryx copied to clipboard

Move every platform macro ifdef into platforms.

Open elfenpiff opened this issue 3 years ago • 3 comments

Brief feature description

The iceoryx_hoofs/platforms should be the only place where platform specific code should be handled. The iceoryx code base should then use the platform abstraction to write platform independent code - it shouldn't be handled directly in the implementation.

Detailed information

Here is an incomplete list (must be extended later) of platform dependent code outside of iceoryx_hoofs/platforms

  • [ ] iceoryx_hoofs/source/posix_wrapper/unix_domain_socket.cpp

elfenpiff avatar May 31 '21 10:05 elfenpiff

@elfenpiff I have the feeling we also need a platform folder in iceoryx_posh. Some things are quite iceoryx_posh specific and do not fit well into iceoryx_hoofs. On thing is actually the IpcChannel which is forward declared in iceoryx_hoofs/platform but implemented in an higher layer. This feels a bit awkward.

elBoberido avatar Jun 09 '22 17:06 elBoberido

@elBoberido I would rephrase it a little, we do not need a platform in iceoryx_posh we need a platform_configuration in there where we define which building blocks will be used under which platform.

In the end it should not contain any logic or implementation, it only should configure posh for various platforms so that we have one single file where all the ifdef alikes are going. For sure we would handle this then via cmake and not ifdef.

elfenpiff avatar Jun 13 '22 09:06 elfenpiff

@elfenpiff exactly, this should be lean since all the abstraction is already done in hoofs and this is just the mapping.

elBoberido avatar Jun 13 '22 09:06 elBoberido