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.
25 Format(string const & n, string const & e, string const & p,
26 string const & s, string const & v);
30 bool isChildFormat() const;
32 string const parentFormat() const;
34 string const & name() const {
38 string const & extension() const {
42 string const & prettyname() const {
46 string const & shortcut() const {
50 string const & viewer() const {
54 void setViewer(string const & v) {
70 bool operator<(Format const & a, Format const & b);
76 typedef std::vector<Format> FormatList;
78 typedef FormatList::const_iterator const_iterator;
80 Format const & get(FormatList::size_type i) const {
84 Format const * getFormat(string const & name) const;
86 int getNumber(string const & name) const;
88 void add(string const & name);
90 void add(string const & name, string const & extension,
91 string const & prettyname, string const & shortcut);
93 void erase(string const & name);
97 void setViewer(string const & name, string const & command);
99 bool view(Buffer const & buffer, string const & filename,
100 string const & format_name) const;
102 string const prettyName(string const & name) const;
104 string const extension(string const & name) const;
106 const_iterator begin() const {
107 return formatlist.begin();
110 const_iterator end() const {
111 return formatlist.end();
114 FormatList::size_type size() const {
115 return formatlist.size();
119 FormatList formatlist;
122 extern Formats formats;
124 extern Formats system_formats;