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.
15 #include "support/docstring.h"
25 Author() : used_(false), buffer_id_(0) {};
27 Author(docstring const & name, docstring const & email);
28 /// For when the \author line is missing (#9854)
29 Author(int buffer_id);
31 docstring name() const { return name_; }
33 docstring email() const { return email_; }
35 int bufferId() const { return buffer_id_; }
37 void setBufferId(int buffer_id) const { buffer_id_ = buffer_id; }
39 void setUsed(bool u) const { used_ = u; }
41 bool used() const { return used_; }
42 /// Was the author line not missing?
45 friend std::istream & operator>>(std::istream & os, Author & a);
47 friend std::ostream & operator<<(std::ostream & os, Author const & a);
52 /// The author's email address
56 /// The id of the author in the lyx-file
57 mutable int buffer_id_;
66 int record(Author const & a);
68 void record(int id, Author const & a);
70 void recordCurrentAuthor(Author const & a);
72 Author const & get(int id) const;
76 typedef std::vector<Author> Authors;
78 Authors::const_iterator begin() const;
80 Authors::const_iterator end() const;
83 std::ostream & operator<<(std::ostream & os, AuthorList const & a);
89 bool operator==(Author const & l, Author const & r);
91 std::ostream & operator<<(std::ostream & os, Author const & a);
93 std::istream & operator>>(std::istream & os, Author & a);