-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin registry implementation #115
Conversation
Hi @amete - so I think this in good shape to me merged now, if you approve of the changes |
Proof-of-concept with one component using the https://github.com/psalvaggio/cppregpattern implementation
Get rid of some of the generic macros that we do not need Add a description map that allows components to describe themselves
In our case the class name can always be used
Each monitor registers itself in its header Main program loops over registered monitors to initialise
Much less hacky for getting the wallmon pointer that is needed in the main loop Cleanup some unused headers
466faad
to
7afe10e
Compare
Hi @graeme-a-stewart, Do we really want to return a raw pointer w/ |
That's a good point! Yes, let me try to make that change then. |
In prmon we don't have need for returning anything else, so safer to embed this deeper into the code
All looks good to me, merging now. |
This is not quite finished in it's full implementation, but it is a good time for review as further development comes on top.
Inspired by https://github.com/psalvaggio/cppregpattern this is a registry implementaion for prmon.
It makes the code in the main monitor look a lot nicer, as initialisation is now a loop over the registry. I am not completely happy with the pointer grabbed to
wallmon
, but as it's used inside the monitoring loop (to pass wallclock time to the average stats generation) it is needed and I could not think of a better way.Closes #113
Helps with making #106 and #107 much easier to implement