cmFunctionBlocker.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #ifndef cmFunctionBlocker_h
  14. #define cmFunctionBlocker_h
  15. #include "cmStandardIncludes.h"
  16. #include "cmExecutionStatus.h"
  17. class cmMakefile;
  18. /** \class cmFunctionBlocker
  19. * \brief A class that defines an interface for blocking cmake functions
  20. *
  21. * This is the superclass for any classes that need to block a cmake function
  22. */
  23. class cmFunctionBlocker
  24. {
  25. public:
  26. /**
  27. * should a function be blocked
  28. */
  29. virtual bool IsFunctionBlocked(const cmListFileFunction& lff,
  30. cmMakefile&mf,
  31. cmExecutionStatus &status) = 0;
  32. /**
  33. * should this function blocker be removed, useful when one function adds a
  34. * blocker and another must remove it
  35. */
  36. virtual bool ShouldRemove(const cmListFileFunction&,
  37. cmMakefile&) {return false;}
  38. /**
  39. * When the end of a CMakeList file is reached this method is called. It
  40. * is not called on the end of an INCLUDE cmake file, just at the end of a
  41. * regular CMakeList file
  42. */
  43. virtual void ScopeEnded(cmMakefile&) {}
  44. virtual ~cmFunctionBlocker() {}
  45. };
  46. #endif