4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
16 #include "outputparams.h"
32 Converter(std::string const & f, std::string const & t, std::string const & c,
33 std::string const & l);
49 /// The converter is latex or its derivatives
51 /// Do we need to run the converter in the original directory?
53 /// This converter needs the .aux files
55 /// If the converter put the result in a directory, then result_dir
56 /// is the name of the directory
57 std::string result_dir;
58 /// If the converter put the result in a directory, then result_file
59 /// is the name of the main file in that directory
60 std::string result_file;
61 /// Command to convert the program output to a LaTeX log file format
70 typedef std::vector<int> EdgePath; // to be removed SOON
72 typedef std::vector<Converter> ConverterList;
74 typedef ConverterList::const_iterator const_iterator;
76 Converter const & get(int i) const {
77 return converterlist_[i];
80 Converter const * getConverter(std::string const & from, std::string const & to);
82 int getNumber(std::string const & from, std::string const & to);
84 void add(std::string const & from, std::string const & to,
85 std::string const & command, std::string const & flags);
87 void erase(std::string const & from, std::string const & to);
91 std::vector<Format const *> const
92 getReachableTo(std::string const & target, bool clear_visited);
94 std::vector<Format const *> const
95 getReachable(std::string const & from, bool only_viewable,
98 bool isReachable(std::string const & from, std::string const & to);
100 Graph::EdgePath const getPath(std::string const & from, std::string const & to);
102 OutputParams::FLAVOR getFlavor(Graph::EdgePath const & path);
104 bool convert(Buffer const * buffer,
105 std::string const & from_file, std::string const & to_file_base,
106 std::string const & from_format, std::string const & to_format,
107 std::string & to_file);
109 bool convert(Buffer const * buffer,
110 std::string const & from_file, std::string const & to_file_base,
111 std::string const & from_format, std::string const & to_format);
113 void update(Formats const & formats);
115 void updateLast(Formats const & formats);
117 bool formatIsUsed(std::string const & format);
119 const_iterator begin() const {
120 return converterlist_.begin();
122 const_iterator end() const {
123 return converterlist_.end();
129 std::vector<Format const *> const
130 intToFormat(std::vector<int> const & input);
132 bool scanLog(Buffer const & buffer, std::string const & command,
133 std::string const & filename);
135 bool runLaTeX(Buffer const & buffer, std::string const & command,
136 OutputParams const &);
138 ConverterList converterlist_;
140 std::string latex_command_;
142 bool move(std::string const & from, std::string const & to, bool copy);
147 extern Converters converters;
149 extern Converters system_converters;