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"
27 Author(docstring
const & name
, docstring
const & email
)
28 : name_(name
), email_(email
), used_(true), buffer_id_(0) {}
30 docstring
name() const { return name_
; }
32 docstring
email() const { return email_
; }
34 unsigned int buffer_id() const { return buffer_id_
; }
36 void setBufferId(unsigned int buffer_id
) const { buffer_id_
= buffer_id
; }
38 void setUsed(bool u
) const { used_
= u
; }
40 bool used() const { return used_
; }
42 friend std::istream
& operator>>(std::istream
& os
, Author
& a
);
47 /// The author's email address
51 /// The id of the author in the lyx-file
52 mutable unsigned int buffer_id_
;
61 int record(Author
const & a
);
63 void record(int id
, Author
const & a
);
65 Author
const & get(int id
) const;
67 typedef std::vector
<Author
> Authors
;
71 Authors::const_iterator
begin() const;
73 Authors::const_iterator
end() const;
76 std::ostream
& operator<<(std::ostream
& os
, AuthorList
const & a
);
84 bool operator==(Author
const & l
, Author
const & r
);
86 std::ostream
& operator<<(std::ostream
& os
, Author
const & a
);
88 std::istream
& operator>>(std::istream
& os
, Author
& a
);