STYLE: Fix line-too-long
[cmake.git] / Source / cmListFileCache.h
blob0472eb08192c19bcf7571052b1c7884f8bcb7768
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmListFileCache.h,v $
5 Language: C++
6 Date: $Date: 2008-03-13 17:48:57 $
7 Version: $Revision: 1.21 $
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 class cmMakefile;
31 struct cmListFileArgument
33 cmListFileArgument(): Value(), Quoted(false), FilePath(0), Line(0) {}
34 cmListFileArgument(const cmListFileArgument& r):
35 Value(r.Value), Quoted(r.Quoted), FilePath(r.FilePath), Line(r.Line) {}
36 cmListFileArgument(const std::string& v, bool q, const char* file,
37 long line): Value(v), Quoted(q),
38 FilePath(file), Line(line) {}
39 bool operator == (const cmListFileArgument& r) const
41 return (this->Value == r.Value) && (this->Quoted == r.Quoted);
43 bool operator != (const cmListFileArgument& r) const
45 return !(*this == r);
47 std::string Value;
48 bool Quoted;
49 const char* FilePath;
50 long Line;
53 struct cmListFileContext
55 std::string Name;
56 std::string FilePath;
57 long Line;
60 std::ostream& operator<<(std::ostream&, cmListFileContext const&);
62 struct cmListFileFunction: public cmListFileContext
64 std::vector<cmListFileArgument> Arguments;
67 class cmListFileBacktrace: public std::vector<cmListFileContext> {};
69 struct cmListFile
71 cmListFile()
72 :ModifiedTime(0)
75 bool ParseFile(const char* path,
76 bool topLevel,
77 cmMakefile *mf);
79 long int ModifiedTime;
80 std::vector<cmListFileFunction> Functions;
83 #endif