plugin.h 685 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include <util/generic/ptr.h>
  3. namespace NUnitTest {
  4. // Plugins are deprecated, please use Y_TEST_HOOK_* from library/cpp/hook/hook.h
  5. namespace NPlugin {
  6. class IPlugin {
  7. public:
  8. virtual ~IPlugin() {
  9. }
  10. virtual void OnStartMain(int /*argc*/, char* /*argv*/ []) {
  11. }
  12. virtual void OnStopMain(int /*argc*/, char* /*argv*/ []) {
  13. }
  14. };
  15. void OnStartMain(int argc, char* argv[]);
  16. void OnStopMain(int argc, char* argv[]);
  17. class TPluginRegistrator {
  18. public:
  19. TPluginRegistrator(TSimpleSharedPtr<IPlugin> plugin);
  20. };
  21. }
  22. }