1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
12 #ifndef cmFunctionBlocker_h
13 #define cmFunctionBlocker_h
15 #include "cmStandardIncludes.h"
16 #include "cmExecutionStatus.h"
17 #include "cmListFileCache.h"
20 class cmFunctionBlocker
24 * should a function be blocked
26 virtual bool IsFunctionBlocked(const cmListFileFunction& lff,
28 cmExecutionStatus &status) = 0;
31 * should this function blocker be removed, useful when one function adds a
32 * blocker and another must remove it
34 virtual bool ShouldRemove(const cmListFileFunction&,
35 cmMakefile&) {return false;}
37 virtual ~cmFunctionBlocker() {}
39 /** Set/Get the context in which this blocker is created. */
40 void SetStartingContext(cmListFileContext const& lfc)
41 { this->StartingContext = lfc; }
42 cmListFileContext const& GetStartingContext()
43 { return this->StartingContext; }
45 cmListFileContext StartingContext;