]> git.lyx.org Git - lyx.git/blob - src/DepTable.h
7fe25010583edbef8a101141a03f02a95d9b5eed
[lyx.git] / src / DepTable.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  * 
5  *           LyX, The Document Processor
6  *           Copyright (C) 1995 Matthias Ettrich
7  *        
8  *           This file is Copyright (C) 1996-1998
9  *           Lars Gullik Bjønnes
10  *
11  * ======================================================
12  */
13
14 #ifndef DEP_TABLE_H
15 #define DEP_TABLE_H
16
17 #include "LString.h"
18 #include <map>
19 using std::map;
20 using std::pair;
21
22 #ifdef __GNUG__
23 #pragma interface
24 #endif
25
26 ///
27 class DepTable {
28 public:
29         /** This one is a little bit harder since we need the absolute
30           filename. Should we insert files with .sty .cls etc as
31           extension? */
32         void insert(string const & f,
33                     bool upd = false,
34                     unsigned long one = 0,
35                     unsigned long two = 0);
36         ///
37         void update();
38
39         ///
40         void write(string const &f);
41         ///
42         void read(string const &f);
43         /// returns true if any of the files has changed
44         bool sumchange();
45         /// return true if fil has changed.
46         bool haschanged(string const & fil);
47         /// return true if a file with extension ext has changed.
48         bool extchanged(string const & ext);
49 private:
50         ///
51         typedef map<string, pair<unsigned long, unsigned long> > DepList;
52         ///
53         DepList deplist;
54 };
55
56 #endif