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 cmListFileCache_h
13 #define cmListFileCache_h
15 #include "cmStandardIncludes.h"
17 /** \class cmListFileCache
18 * \brief A class to cache list file contents.
20 * cmListFileCache is a class used to cache the contents of parsed
26 struct cmListFileArgument
28 cmListFileArgument(): Value(), Quoted(false), FilePath(0), Line(0) {}
29 cmListFileArgument(const cmListFileArgument& r):
30 Value(r.Value), Quoted(r.Quoted), FilePath(r.FilePath), Line(r.Line) {}
31 cmListFileArgument(const std::string& v, bool q, const char* file,
32 long line): Value(v), Quoted(q),
33 FilePath(file), Line(line) {}
34 bool operator == (const cmListFileArgument& r) const
36 return (this->Value == r.Value) && (this->Quoted == r.Quoted);
38 bool operator != (const cmListFileArgument& r) const
48 struct cmListFileContext
53 cmListFileContext(): Name(), FilePath(), Line(0) {}
56 std::ostream& operator<<(std::ostream&, cmListFileContext const&);
58 struct cmListFileFunction: public cmListFileContext
60 std::vector<cmListFileArgument> Arguments;
63 class cmListFileBacktrace: public std::vector<cmListFileContext> {};
71 bool ParseFile(const char* path,
75 long int ModifiedTime;
76 std::vector<cmListFileFunction> Functions;