ENH: keep cleaning up Tcl/Tk modules
[cmake.git] / Source / cmListFileCache.h
blob4d7e0505335baba756fbdc37fb0af2c8ca2f033b
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmListFileCache.h,v $
5 Language: C++
6 Date: $Date: 2007-05-11 12:36:05 $
7 Version: $Revision: 1.18 $
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 cmListFileCache_h
18 #define cmListFileCache_h
20 #include "cmStandardIncludes.h"
22 /** \class cmListFileCache
23 * \brief A class to cache list file contents.
25 * cmListFileCache is a class used to cache the contents of parsed
26 * cmake list files.
29 struct cmListFileArgument
31 cmListFileArgument(): Value(), Quoted(false), FilePath(0), Line(0) {}
32 cmListFileArgument(const cmListFileArgument& r):
33 Value(r.Value), Quoted(r.Quoted), FilePath(r.FilePath), Line(r.Line) {}
34 cmListFileArgument(const std::string& v, bool q, const char* file,
35 long line): Value(v), Quoted(q),
36 FilePath(file), Line(line) {}
37 bool operator == (const cmListFileArgument& r) const
39 return (this->Value == r.Value) && (this->Quoted == r.Quoted);
41 bool operator != (const cmListFileArgument& r) const
43 return !(*this == r);
45 std::string Value;
46 bool Quoted;
47 const char* FilePath;
48 long Line;
51 struct cmListFileFunction
53 std::string Name;
54 std::vector<cmListFileArgument> Arguments;
55 std::string FilePath;
56 long Line;
59 struct cmListFile
61 cmListFile()
62 :ModifiedTime(0)
65 bool ParseFile(const char* path, bool requireProjectCommand);
67 long int ModifiedTime;
68 std::vector<cmListFileFunction> Functions;
71 #endif