]> git.lyx.org Git - features.git/blob - src/DepTable.h
the runlatex merge
[features.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
20 #ifdef __GNUG__
21 #pragma interface
22 #endif
23
24 ///
25 class DepTable {
26 public:
27         /** This one is a little bit harder since we need the absolute
28           filename. Should we insert files with .sty .cls etc as
29           extension? */
30         void insert(string const & f,
31                     bool upd = false,
32                     unsigned long one = 0,
33                     unsigned long two = 0);
34         ///
35         void update();
36
37         ///
38         void write(string const &f);
39         ///
40         void read(string const &f);
41         /// returns true if any of the files has changed
42         bool sumchange();
43         /// return true if fil has changed.
44         bool haschanged(string const & fil);
45         /// return true if a file with extension ext has changed.
46         bool extchanged(string const & ext);
47 private:
48         ///
49         typedef map<string, pair<unsigned long, unsigned long> > DepList;
50         ///
51         DepList deplist;
52 };
53
54 #endif