]> git.lyx.org Git - lyx.git/blob - src/DepTable.h
f23e66adb22440a7efd925c2e25ab3ccec29956c
[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 <cstdio>
19
20 ///
21 class DepTable {
22 public:
23         ///
24         DepTable();
25         ///
26         /** This one is a little bit harder since we need the absolute
27           filename. Should we insert files with .sty .cls etc as
28           extension? */
29         void insert(string const &f,
30                     bool upd = false,
31                     unsigned long one = 0,
32                     unsigned long two = 0);
33         ///
34         void update();
35
36         ///
37         void write(string const &f);
38         ///
39         void read(string const &f);
40         /// returns true if any of the files has changed
41         bool sumchange();
42         ///
43         bool haschanged(string const &fil);
44 private:
45         ///
46         DepTable(string const &f,
47                  bool upd,
48                  unsigned long one,
49                  unsigned long two);
50         ///
51         string file;
52         /// The files new checksum
53         unsigned long new_sum;
54         /// The files old checksum
55         unsigned long old_sum;
56         ///
57         DepTable *next;
58                 
59         ///
60         void write(FILE *f);
61 };
62
63 #endif