[Moveit! 2] Function definitions in header files. #2073
ibrahiminfinite
started this conversation in
General
Replies: 2 comments
-
A comment about this by @henningkayser (from #2018 (comment))
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Agree this thing is a mess. I'm happy to accept PRs that clean some of this up. I also agree that source files should contain the implementations. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This spawned off from #2018
While going through robot_state.h .
I noticed that it contains a good number of definitions.
At first I though this was mostly for const return functions, but then realized that was not the case.
This pattern is also present in other header files.
AndyZe suggests the following rule of thumb.
However, after some more thought , using the number of lines as a metric does not seem appropriate since it does not serve as a good basis for reasoning other than for executable size, and so I am starting a discussion to understand more about this pattern.
There are function definitions in many
header
files throughout MoveIt 2, however I am not able to come to a conclusion on why those definitions have been put into theheader
files rather than the respectivesource
files.header
?headers
at all ? Would it be better to keep theheaders
as declaration only ?My personal opinion is to keep
headers
as declaration only as my reason for looking at theheaders
would be for finding out the available interfaces.What are your thoughts on this matter @AndyZe , @sea-bass , @tylerjw , @henningkayser.
Beta Was this translation helpful? Give feedback.
All reactions