ComponentEnabler is to preload components. More...
#include <unit_test.h>
Public Member Functions | |
ComponentEnabler (const std::set< string > &enabled_components) | |
ComponentEnabler (const string &enabled_component) | |
ComponentEnabler (const string &enabled_component1, const string &enabled_component2) | |
Though the framework automatically loads all the registered components, it is sometimes necessary to enable only subset of components. (e.g., unit test) This class satisfies such a case. It traverses the component dependency tree and also loads required ancestor components. Its constructor topologically sorts components and invoke Install() method on each component. And destructor calls Uninstall() method in the reverse order.
|
explicit |
enabled_components | target component names to be enabled. |
|
explicit |
enabled_component | target component name to be enabled. |