77 switch (
names.Which()) {
81 if (!
names.GetStd().empty()) {
86 if (!
names.GetMl().empty()) {
92 if (!
names.GetStr().empty()) {
107 unsigned int count = 0;
109 switch (
names.Which()) {
117 switch (it->GetName().Which()) {
122 individuals.push_back(it);
141 if (&*it == &individuals.back()
193 list<CRef<CAuthor>> standard_names;
194 for (
const string& author_ml_str :
GetNames().GetMl()) {
197 standard_names.push_back(new_auth);
211 if (auth->IsSetName() && auth->GetName().IsMl()) {
255 }
else if (
names.IsStr()) {
256 for (
const string& it :
names.GetStr()) {
285 vector<string>::const_iterator it1 = match_str1.begin();
286 vector<string>::const_iterator it2 = match_str2.begin();
287 while (it1 != match_str1.end() && it2 != match_str2.end()) {
294 if (it1 != match_str1.end() || it2 != match_str2.end()) {
vector< string > GetAuthorMatchStrings(const CAuth_list::TNames &names)
string s_GetAuthorMatchString(const CAuthor &auth)
bool s_AuthorMatch(const CAuthor &auth1, const CAuthor &auth2)
@Auth_list.hpp User-defined methods of the data storage class.
void ConvertMlToStd(bool normalize_suffix)
void ConvertMlToStandard(bool normalize_suffix=false)
bool GetLabelV2(string *label, TLabelFlags flags) const override
bool GetLabelV1(string *label, TLabelFlags flags) const override
bool SameCitation(const CAuth_list &other) const
size_t GetNameCount() const
static bool x_GetLabelV2(string *label, TLabelFlags flags, CTempString name, CTempString initials=kEmptyStr, CTempString suffix=kEmptyStr)
static CRef< CAuthor > ConvertMlToStandard(const CAuthor &author, bool normalize_suffix=false)
@ eLabel_V1
Traditional GetLabel semantics, modeled on the C Toolkit's PubLabelUnique.
@ eLabel_V2
New implementation, in line with GenBank/GenPept REFERENCE JOURNAL fields and the like.
int TLabelFlags
binary OR of ELabelFlags
@ fLabel_Consortia
Consortia, not authors [internal].
@ fLabel_FlatNCBI
For GenBank or GenPept [V2].
static const struct name_t names[]
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)
Check if a string ends with a specified suffix value.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
static const char label[]
TStd & SetStd(void)
Select the variant.
TNames & SetNames(void)
Assign a value to Names data member.
const TName & GetName(void) const
Get the Name member data.
list< CRef< CAuthor > > TStd
bool IsSetNames(void) const
Check if a value has been assigned to Names data member.
void Reset(void)
Reset the whole object.
bool IsSetName(void) const
Author, Primary or Secondary Check if a value has been assigned to Name data member.
const TStr & GetStr(void) const
Get the variant data.
const TNames & GetNames(void) const
Get the Names member data.
const TStd & GetStd(void) const
Get the variant data.
const TMl & GetMl(void) const
Get the variant data.
E_Choice Which(void) const
Which variant is currently selected.
@ e_Ml
MEDLINE, semi-structured.
@ e_not_set
No variant selected.
const TStr & GetStr(void) const
Get the variant data.
bool IsConsortium(void) const
Check if variant Consortium is selected.
bool IsName(void) const
Check if variant Name is selected.
bool IsSetLast(void) const
Check if a value has been assigned to Last data member.
const TConsortium & GetConsortium(void) const
Get the variant data.
bool IsStr(void) const
Check if variant Str is selected.
const TLast & GetLast(void) const
Get the Last member data.
const TName & GetName(void) const
Get the variant data.
@ e_Ml
MEDLINE name (semi-structured) eg. "Jones RM".
@ e_Consortium
consortium name
static int match(register const pcre_uchar *eptr, register const pcre_uchar *ecode, const pcre_uchar *mstart, int offset_top, match_data *md, eptrblock *eptrb, unsigned int rdepth)
static const char * prefix[]