Sorry, missed this one and it was just asked about in a private message:
For this code, isn't there a better way to represent or refactor it out of the code completely?
If your goal is to expose the values, that is no problem.
What you've got there works just fine, especially in a header file. That is, in c++ those function calls can vanish completely thanks to the optimizer's magic, with the values accessed directly from memory without any indirection or function call overhead.
But if you are working with systems, it may not be as good. If you have a set of systems that handles position then the object itself probably doesn't have the x and y coordinates, it probably has a reference to its location in the spatial tree. Similarly the health component might be a reference to another health system. That might be handled with a single indirection: void SetAlive(bool status) { myHealth->SetAlive(status); } or it might be more involved if you have custom processing to do.
It really all depends on how your system is organized and designed.
The recommendation to play with existing major engines is still there. Once you've been exposed to better engines it can help you think more about how to reuse and how to work with systems rather than focusing on the smaller pieces.