]> git.lyx.org Git - features.git/blobdiff - src/converter.h
Patches from Angus, Baruch, Dekel (2), and some glue from me.
[features.git] / src / converter.h
index 8e282352f3ae736b05de1949344e6ba1c4e60f37..b23a0ffd62ca884140f8d13781a08b587a4103c4 100644 (file)
@@ -57,7 +57,7 @@ struct Command {
 class Format {
 public:
        ///
-       Format() : in_degree(0) {}
+       Format() {}
        ///
        Format(string const & n);
        ///
@@ -66,8 +66,19 @@ public:
        string prettyname;
        ///
        string viewer;
+};
+
+class FormatPair {
+public:
+       ///
+       Format * format;
+       ///
+       Format * from;
+       ///
+       string command;
        ///
-       int in_degree;
+       FormatPair(Format * f1, Format * f2, string c)
+               : format(f1), from(f2), command(c) {}
 };
 
 ///
@@ -102,12 +113,17 @@ public:
        void Add(string const & from, string const & to,
                 string const & command, string const & flags);
        ///
+       
+       ///
        static
-       std::vector<std::pair<string, string> > const
+       std::vector<FormatPair> const
        GetReachable(string const & from,
                     bool only_viewable = false);
        ///
        static
+       bool IsReachable(string const & from, string const & target_format);
+       ///
+       static
        bool Convert(Buffer const * buffer, string const & from_file,
                     string const & to_file, string const & using_format,
                     string * view_file = 0);
@@ -120,6 +136,9 @@ public:
        ///
        static
        string const dvips_options(Buffer const * buffer);
+       ///
+       static
+       void init();
 private:
        ///
        static