]> 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 b57a57e6ab6c522bcf90c295cbb86dbbf1585d4a..161322d866314fd322d9d0434560a786532f05d9 100644 (file)
@@ -22,8 +22,9 @@
 #include "LString.h"
 #include "DepTable.h"
 #include <vector>
+#include <set>
 
-#include "support/utility.hpp"
+#include <boost/utility.hpp>
 
 class MiniBuffer;
 
@@ -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;
+};
+
+
+///
+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 noncopyable {
+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
@@ -123,6 +159,10 @@ public:
 
        /// use this for running LaTeX once
        int operator() ();
+
+       ///
+       int scanLogFile(TeXErrors &);
+
 protected:
        /// The dependency file.
        string depfile;
@@ -131,16 +171,23 @@ protected:
        void deplog(DepTable & head);
 
        ///
-       int scanLogFile(TeXErrors &);
+       bool runMakeIndex(string const &);
 
        ///
-       bool runMakeIndex(string const &);
+       std::vector<Aux_Info> const scanAuxFiles(string const &);
+
+       ///
+       Aux_Info const scanAuxFile(string const &);
 
        ///
-       bool scanAux(DepTable &);
+       void scanAuxFile(string const &, Aux_Info &);
        
        ///
-       bool runBibTeX(string const &, DepTable &);
+       void updateBibtexDependencies(DepTable &,
+                                     std::vector<Aux_Info> const &);
+
+       ///
+       bool runBibTeX(std::vector<Aux_Info> const &);
 
        ///
        void deleteFilesOnError() const;