Open stevenrbrandt opened 5 years ago
It will probably take a little time before this code is ready for master. Until then, I invite you to look here: https://github.com/stevenrbrandt/HPXCompMaker
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
(Just adding a comment to prevent this from being closed by the stale bot). The python solution looks promising and it should be encouraged... but can't we create some template magic that does all the action registration automatically without having to manually add macros everywhere - or somehow simply the process of client server component creation in the c++?
We know that parts of the macros can be avoided at the expense of increasing compile time (possibly significantly). It might also be possible to use some of the new C++17 language features to reduce the need for the macros. All of this needs investigation.
This is a feature enhancement request. Currently, when writing a component, there is a lot of boilerplate. There needs to be client and server code. The server needs to call HPX_DEFINE_COMPONENT_ACTION for every exposed method, outside the server one needs to call HPX_REGISTER_ACTION_DECLARATION, and then the client (usually) has to have two methods, one static and one not. In addition, HPX_REGISTER_ACTION needs to be called. This is about 6 different places that need to be changed when a method is added. If one wants to change the arguments or return type of a function, one also has to change 5 lines of code in various places (client declaration, two server declarations, two server calls). For me, at least, trying to keep track of all this while developing is hard.
I have a prototype Python code to generate Components that looks something like the code below. The decorator generates Adder.hpp and Adder_macros.hpp. Is there any interest in making this official?