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 /// The converter is xml
53 /// Do we need to run the converter in the original directory?
55 /// This converter needs the .aux files
57 /// If the converter put the result in a directory, then result_dir
58 /// is the name of the directory
59 std::string result_dir
;
60 /// If the converter put the result in a directory, then result_file
61 /// is the name of the main file in that directory
62 std::string result_file
;
63 /// Command to convert the program output to a LaTeX log file format
72 typedef std::vector
<int> EdgePath
; // to be removed SOON
74 typedef std::vector
<Converter
> ConverterList
;
76 typedef ConverterList::const_iterator const_iterator
;
78 Converter
const & get(int i
) const {
79 return converterlist_
[i
];
82 Converter
const * getConverter(std::string
const & from
,
83 std::string
const & to
) const;
85 int getNumber(std::string
const & from
, std::string
const & to
) const;
87 void add(std::string
const & from
, std::string
const & to
,
88 std::string
const & command
, std::string
const & flags
);
90 void erase(std::string
const & from
, std::string
const & to
);
94 std::vector
<Format
const *> const
95 getReachableTo(std::string
const & target
, bool clear_visited
);
97 std::vector
<Format
const *> const
98 getReachable(std::string
const & from
, bool only_viewable
,
101 bool isReachable(std::string
const & from
, std::string
const & to
);
103 Graph::EdgePath
const getPath(std::string
const & from
, std::string
const & to
);
105 OutputParams::FLAVOR
getFlavor(Graph::EdgePath
const & path
);
107 bool convert(Buffer
const * buffer
,
108 std::string
const & from_file
, std::string
const & to_file_base
,
109 std::string
const & from_format
, std::string
const & to_format
,
110 std::string
& to_file
);
112 bool convert(Buffer
const * buffer
,
113 std::string
const & from_file
, std::string
const & to_file_base
,
114 std::string
const & from_format
, std::string
const & to_format
);
116 void update(Formats
const & formats
);
118 void updateLast(Formats
const & formats
);
120 bool formatIsUsed(std::string
const & format
);
122 const_iterator
begin() const {
123 return converterlist_
.begin();
125 const_iterator
end() const {
126 return converterlist_
.end();
132 std::vector
<Format
const *> const
133 intToFormat(std::vector
<int> const & input
);
135 bool scanLog(Buffer
const & buffer
, std::string
const & command
,
136 std::string
const & filename
);
138 bool runLaTeX(Buffer
const & buffer
, std::string
const & command
,
139 OutputParams
const &);
141 ConverterList converterlist_
;
143 std::string latex_command_
;
145 bool move(std::string
const & fmt
,
146 std::string
const & from
, std::string
const & to
,
152 extern Converters converters
;
154 extern Converters system_converters
;