10 * This file is part of LyX, the document processor.
11 * Licence details can be found in the file COPYING.
15 * Full author contact details are available in file CREDITS
29 Format(string const & n, string const & e, string const & p,
30 string const & s, string const & v);
34 bool isChildFormat() const;
36 string const parentFormat() const;
38 string const & name() const {
42 string const & extension() const {
46 string const & prettyname() const {
50 string const & shortcut() const {
54 string const & viewer() const {
58 void setViewer(string const & v) {
74 bool operator<(Format const & a, Format const & b);
80 typedef std::vector<Format> FormatList;
82 typedef FormatList::const_iterator const_iterator;
84 Format const & get(FormatList::size_type i) const {
88 Format const * getFormat(string const & name) const;
90 int getNumber(string const & name) const;
92 void add(string const & name);
94 void add(string const & name, string const & extension,
95 string const & prettyname, string const & shortcut);
97 void erase(string const & name);
101 void setViewer(string const & name, string const & command);
103 bool view(Buffer const * buffer, string const & filename,
104 string const & format_name) const;
106 string const prettyName(string const & name) const;
108 string const extension(string const & name) const;
110 const_iterator begin() const {
111 return formatlist.begin();
114 const_iterator end() const {
115 return formatlist.end();
118 FormatList::size_type size() const {
119 return formatlist.size();
123 FormatList formatlist;
126 extern Formats formats;
128 extern Formats system_formats;