1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmFunctionBlocker.h,v $
6 <<<<<<< cmFunctionBlocker.h
7 Date: $Date: 2008/01/23 15:27:59 $
8 Version: $Revision: 1.12 $
10 Date: $Date: 2009-01-21 14:48:16 $
11 Version: $Revision: 1.13 $
14 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
15 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
17 This software is distributed WITHOUT ANY WARRANTY; without even
18 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
19 PURPOSE. See the above copyright notices for more information.
21 =========================================================================*/
22 #ifndef cmFunctionBlocker_h
23 #define cmFunctionBlocker_h
25 #include "cmStandardIncludes.h"
26 #include "cmExecutionStatus.h"
27 #include "cmListFileCache.h"
30 /** \class cmFunctionBlocker
31 * \brief A class that defines an interface for blocking cmake functions
33 * This is the superclass for any classes that need to block a cmake function
35 class cmFunctionBlocker
39 * should a function be blocked
41 virtual bool IsFunctionBlocked(const cmListFileFunction
& lff
,
43 cmExecutionStatus
&status
) = 0;
46 * should this function blocker be removed, useful when one function adds a
47 * blocker and another must remove it
49 virtual bool ShouldRemove(const cmListFileFunction
&,
50 cmMakefile
&) {return false;}
52 virtual ~cmFunctionBlocker() {}
54 /** Set/Get the context in which this blocker is created. */
55 void SetStartingContext(cmListFileContext
const& lfc
)
56 { this->StartingContext
= lfc
; }
57 cmListFileContext
const& GetStartingContext()
58 { return this->StartingContext
; }
60 cmListFileContext StartingContext
;