]> git.lyx.org Git - features.git/blobdiff - src/DepTable.h
the runlatex merge
[features.git] / src / DepTable.h
index f23e66adb22440a7efd925c2e25ab3ccec29956c..0f9b4827fe24eb5a5c40f9e92a1a87250d29542a 100644 (file)
 #define DEP_TABLE_H
 
 #include "LString.h"
-#include <cstdio>
+#include <map>
+
+#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 +40,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