23 #include "bibdefs.hpp"
30 BibAuthor(
const std::string& lastname,
const std::string& firstname);
32 std::string lastname_, firstname_, sortname_;
33 class BibGroup* authgroup_;
34 class AuthStats* stats_;
38 class BibAuthors :
public std::list<BibAuthor*> {};
46 struct Field {std::string raw, parsed;};
47 using Fields = std::map<BibFields::ID, Field>;
49 BibEntry(
const std::string& key,
const std::string& typeName,
58 const std::string&
bibkey()
const;
69 void setParsedField(
BibFields::ID,
const std::string& parsed);
72 const Fields&
fields()
const {
return fields_;}
74 const BibAuthors& authors()
const {
return authors_;}
76 void setMediaAndRank(
class Bib&);
80 friend class BibEntryNode;
83 bool isAuxiliary_{
false};
91 BibGroup(
const std::string& name,
const std::string& typeName,
94 const std::string& name()
const {
return name_;}
97 class AuthStats* stats_;
104 : entry_(entry), index_(0), author_(nullptr) {}
106 BibEntryNode(
BibEntry& entry,
int index,
const BibAuthor* author =
nullptr)
107 : entry_(entry), index_(index), author_(author) {}
113 const std::string& bibkey()
const {
return entry_.bibkey();}
116 bool isAuxiliary()
const {
return entry_.isAuxiliary_;}
122 void setField(
BibFields::ID id,
const std::string& raw,
const std::string& parsed) {
123 entry_.setField(
id, raw, parsed);
126 void setParsedField(
BibFields::ID id,
const std::string& parsed) {
127 entry_.setParsedField(
id, parsed);
130 const BibAuthors& authors()
const {
return entry_.authors_;}
132 void setMediaAndRank(
class Bib& btw) {entry_.setMediaAndRank(btw);}
136 const BibAuthor* author_;
159 BibEntries*
find(
const std::string& query,
bool ignoreCase,
bool abridgedFields)
const;
165 BibEntries*
sort(
const std::string& pattern,
bool abridged)
const;
167 void setMediaAndRank(
Bib&);