ctkSingletonTest1.cpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*=========================================================================
  2. Library: CTK
  3. Copyright (c) Kitware Inc.
  4. All rights reserved.
  5. Distributed under a BSD License. See LICENSE.txt file.
  6. This software is distributed "AS IS" WITHOUT ANY WARRANTY; without even
  7. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the above copyright notice for more information.
  9. =========================================================================*/
  10. // QT includes
  11. #include <QApplication>
  12. // CTK includes
  13. #include "ctkSingleton.h"
  14. // STD includes
  15. #include <cstdlib>
  16. #include <iostream>
  17. //-----------------------------------------------------------------------------
  18. class ctkSingletonHelper
  19. {
  20. public:
  21. CTK_SINGLETON_DECLARE(ctkSingletonHelper);
  22. };
  23. //-----------------------------------------------------------------------------
  24. void ctkSingletonHelper::classInitialize()
  25. {
  26. }
  27. //-----------------------------------------------------------------------------
  28. int ctkSingletonTest1(int argc, char * argv [] )
  29. {
  30. QApplication app(argc, argv);
  31. ctkSingletonHelper ctkObject;
  32. ctkObject.classInitialize();
  33. return EXIT_SUCCESS;
  34. }