Feature/support multiple activation and deactivation #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This supports linking multiple
REGISTER_ROSCONSOLE_BRIDGE;
together and therefore enables ROS libraries to take care of this for non-ROS libraries they might depend on without risk.This is one possible first step to improve on issue #12 .
The extra complexity to support deactivation is not necessary.
Currently it is just used to allow the "cleanup" test to remain partial functional. Admittedly this way it does not serve as much of a purpose as before. The problem is the introduced singleton that takes care of disabling the output handler at program termination. I don't know an easy way to test this from within the program without extra complexity in the library itself. However, the standard guarantees the destruction of static locals within the program termination phase - as far as I know. And the deactivate functionality is still successfully tested:
(its output on my system)