ENH: check in almost building VMS stuff with VMSBuild directory since the bootstrap...
[cmake.git] / Source / cmFunctionBlocker.h
blob6e45da52f59a627c7d9315e36184d88d008da529
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmFunctionBlocker.h,v $
5 Language: C++
6 Date: $Date: 2009-01-21 14:48:16 $
7 Version: $Revision: 1.13 $
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"
22 #include "cmListFileCache.h"
23 class cmMakefile;
25 /** \class cmFunctionBlocker
26 * \brief A class that defines an interface for blocking cmake functions
28 * This is the superclass for any classes that need to block a cmake function
30 class cmFunctionBlocker
32 public:
33 /**
34 * should a function be blocked
36 virtual bool IsFunctionBlocked(const cmListFileFunction& lff,
37 cmMakefile&mf,
38 cmExecutionStatus &status) = 0;
40 /**
41 * should this function blocker be removed, useful when one function adds a
42 * blocker and another must remove it
44 virtual bool ShouldRemove(const cmListFileFunction&,
45 cmMakefile&) {return false;}
47 virtual ~cmFunctionBlocker() {}
49 /** Set/Get the context in which this blocker is created. */
50 void SetStartingContext(cmListFileContext const& lfc)
51 { this->StartingContext = lfc; }
52 cmListFileContext const& GetStartingContext()
53 { return this->StartingContext; }
54 private:
55 cmListFileContext StartingContext;
58 #endif