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