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 docstring const & initials);
29 /// For when the \author line is missing (#9854)
30 Author(int buffer_id);
32 docstring name() const { return name_; }
34 docstring email() const { return email_; }
36 docstring initials() const { return initials_; }
38 docstring nameAndEmail() const;
40 int bufferId() const { return buffer_id_; }
42 void setBufferId(int buffer_id) const { buffer_id_ = buffer_id; }
44 void setUsed(bool u) const { used_ = u; }
46 bool used() const { return used_; }
47 /// Was the author line not missing?
50 friend std::istream & operator>>(std::istream & os, Author & a);
52 friend std::ostream & operator<<(std::ostream & os, Author const & a);
57 /// The author's email address
59 /// The author's initials
63 /// The id of the author in the lyx-file
64 mutable int buffer_id_;
73 int record(Author const & a);
75 void record(int id, Author const & a);
77 void recordCurrentAuthor(Author const & a);
79 Author const & get(int id) const;
83 typedef std::vector<Author> Authors;
85 Authors::const_iterator begin() const;
87 Authors::const_iterator end() const;
90 std::ostream & operator<<(std::ostream & os, AuthorList const & a);
96 bool operator==(Author const & l, Author const & r);
98 std::ostream & operator<<(std::ostream & os, Author const & a);
100 std::istream & operator>>(std::istream & os, Author & a);