63 size_t num_sources = 0,
66 const CSeqdesc* first_title =
nullptr;
68 bool same_taxnames =
false;
75 switch ( desc.
Which() ) {
88 "Undesired multiple title descriptors",
ctx, *first_title);
145 same_taxnames =
true;
147 lastname = currname.c_str();
160 if ( num_sources > 1 && same_taxnames ) {
162 "Undesired multiple source descriptors",
ctx, *last_source);
@ eErr_SEQ_DESCR_MultipleBioSources
@ eErr_SEQ_DESCR_MultipleTitles
const string & GetTaxname(void) const
bool IsSetTaxname(void) const
@Seq_descr.hpp User-defined methods of the data storage class.
void PostErr(EDiagSev sv, EErrType et, const string &msg, const CSerialObject &obj)
void ValidateSeqDesc(const CSeqdesc &desc, const CSeq_entry &ctx)
Validate descriptors as stand alone objects (no context)
bool ValidateStructuredCommentInternal(const CSeqdesc &desc, bool report=true)
void ValidateSeqDescr(const CSeq_descr &descr, const CSeq_entry &ctx)
~CValidError_descr() override
bool ValidateStructuredComment(const CSeqdesc &desc, bool report)
CValidError_desc m_DescValidator
Include a standard set of the NCBI C++ Toolkit most basic headers.
@ eDiag_Error
Error message.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
const char *const kEmptyCStr
Empty "C" string (points to a '\0').
const TSource & GetSource(void) const
Get the variant data.
E_Choice Which(void) const
Which variant is currently selected.
@ e_Embl
EMBL specific information.
@ e_Het
cofactor, etc associated but not bound
@ e_Org
if all from one organism
@ e_Num
a numbering system
@ e_User
user defined object
@ e_Update_date
date of last update
@ e_Pub
a reference to the publication
@ e_Pir
PIR specific info.
@ e_Genbank
GenBank specific info.
@ e_Prf
PRF specific information.
@ e_Mol_type
type of molecule
@ e_Sp
SWISSPROT specific info.
@ e_Dbxref
xref to other databases
@ e_Comment
a more extensive comment
@ e_Method
sequencing method
@ e_Region
overall region (globin locus)
@ e_Molinfo
info on the molecule and techniques
@ e_Maploc
map location of this sequence
@ e_Create_date
date entry first created/released
@ e_Title
a title for this sequence
@ e_Pdb
PDB specific information.
@ e_Name
a name for this sequence
@ e_Source
source of materials, includes Org-ref
#define FOR_EACH_DESCRIPTOR_ON_DESCR