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 docstring nameAndEmail() const;
37 int bufferId() const { return buffer_id_; }
39 void setBufferId(int buffer_id) const { buffer_id_ = buffer_id; }
41 void setUsed(bool u) const { used_ = u; }
43 bool used() const { return used_; }
44 /// Was the author line not missing?
47 friend std::istream & operator>>(std::istream & os, Author & a);
49 friend std::ostream & operator<<(std::ostream & os, Author const & a);
54 /// The author's email address
58 /// The id of the author in the lyx-file
59 mutable int buffer_id_;
68 int record(Author const & a);
70 void record(int id, Author const & a);
72 void recordCurrentAuthor(Author const & a);
74 Author const & get(int id) const;
78 typedef std::vector<Author> Authors;
80 Authors::const_iterator begin() const;
82 Authors::const_iterator end() const;
85 std::ostream & operator<<(std::ostream & os, AuthorList const & a);
91 bool operator==(Author const & l, Author const & r);
93 std::ostream & operator<<(std::ostream & os, Author const & a);
95 std::istream & operator>>(std::istream & os, Author & a);