]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeX.h
Applied Angus patch to compile on DEC C++ and to avoid name clashes
[lyx.git] / src / LaTeX.h
index 377b962d99940afae17d796cd6a12ee40ee70949..161322d866314fd322d9d0434560a786532f05d9 100644 (file)
@@ -22,6 +22,7 @@
 #include "LString.h"
 #include "DepTable.h"
 #include <vector>
+#include <set>
 
 #include <boost/utility.hpp>
 
@@ -61,9 +62,42 @@ private:
        Errors errors;
 };
 
+class Aux_Info {
+public:
+       ///
+       Aux_Info() {}
+       ///
+       string aux_file;
+       ///
+       std::set<string> citations;
+       ///
+       std::set<string> databases;
+       ///
+       std::set<string> styles;
+};
+
 
 ///
-class LaTeX : public noncopyable {
+inline
+bool operator==(Aux_Info const & a, Aux_Info const & o)
+{
+       return a.aux_file == o.aux_file &&
+               a.citations == o.citations &&
+               a.databases == o.databases &&
+               a.styles == o.styles;
+}
+
+
+///
+inline
+bool operator!=(Aux_Info const & a, Aux_Info const & o)
+{
+       return !(a == o);
+}
+
+
+///
+class LaTeX : public boost::noncopyable {
 public:
        /** Return values from scanLogFile() and run() (to come)
            
@@ -100,6 +134,8 @@ public:
                ///
                TOO_MANY_ERRORS = 4096,
                ///
+               ERROR_RERUN = 8192,
+               ///
                ERRORS = TEX_ERROR + LATEX_ERROR,
                ///
                WARNINGS = TEX_WARNING + LATEX_WARNING + PACKAGE_WARNING
@@ -138,15 +174,20 @@ protected:
        bool runMakeIndex(string const &);
 
        ///
-       bool scanAux(DepTable &);
+       std::vector<Aux_Info> const scanAuxFiles(string const &);
+
        ///
-       vector<string> const
-       scanAuxFiles(string const &, DepTable &, bool);
+       Aux_Info const scanAuxFile(string const &);
+
        ///
-       bool scanAuxFile(string const &, DepTable &, bool);
+       void scanAuxFile(string const &, Aux_Info &);
        
        ///
-       bool runBibTeX(DepTable &);
+       void updateBibtexDependencies(DepTable &,
+                                     std::vector<Aux_Info> const &);
+
+       ///
+       bool runBibTeX(std::vector<Aux_Info> const &);
 
        ///
        void deleteFilesOnError() const;