]> git.lyx.org Git - lyx.git/blobdiff - src/DepTable.h
white-space changes, removed definitions.h several enum changes because of this,...
[lyx.git] / src / DepTable.h
index f23e66adb22440a7efd925c2e25ab3ccec29956c..6b8dc5b597fa20c7030d43ff0a26f4cbbfddc64a 100644 (file)
@@ -1,6 +1,6 @@
 // -*- C++ -*-
 /* This file is part of
- * ======================================================
+ * ====================================================== 
  * 
  *           LyX, The Document Processor
  *          Copyright (C) 1995 Matthias Ettrich
@@ -8,25 +8,28 @@
  *           This file is Copyright (C) 1996-1998
  *           Lars Gullik Bjønnes
  *
- * ======================================================
+ * ====================================================== 
  */
 
 #ifndef DEP_TABLE_H
 #define DEP_TABLE_H
 
 #include "LString.h"
-#include <cstdio>
+#include <map>
+using std::map;
+using std::pair;
+
+#ifdef __GNUG__
+#pragma interface
+#endif
 
 ///
 class DepTable {
 public:
-       ///
-       DepTable();
-       ///
        /** This one is a little bit harder since we need the absolute
          filename. Should we insert files with .sty .cls etc as
          extension? */
-       void insert(string const &f,
+       void insert(string const & f,
                    bool upd = false,
                    unsigned long one = 0,
                    unsigned long two = 0);
@@ -39,25 +42,15 @@ public:
        void read(string const &f);
        /// returns true if any of the files has changed
        bool sumchange();
-       ///
-       bool haschanged(string const &fil);
+       /// return true if fil has changed.
+       bool haschanged(string const & fil);
+       /// return true if a file with extension ext has changed.
+       bool extchanged(string const & ext);
 private:
        ///
-       DepTable(string const &f,
-                bool upd,
-                unsigned long one,
-                unsigned long two);
-       ///
-       string file;
-       /// The files new checksum
-       unsigned long new_sum;
-       /// The files old checksum
-       unsigned long old_sum;
-       ///
-       DepTable *next;
-               
+       typedef map<string, pair<unsigned long, unsigned long> > DepList;
        ///
-       void write(FILE *f);
+       DepList deplist;
 };
 
 #endif