NCBI C++ ToolKit
|
Search Toolkit Book for CValidator
#include <objtools/validator/validator.hpp>
Classes | |
class | CCache |
class | CCacheImpl |
Cache various information for one validation run. More... | |
class | CProgressInfo |
Private Member Functions | |
void | x_SetEntryInfo (const TEntryInfo &info) |
Private Attributes | |
CRef< CObjectManager > | m_ObjMgr |
shared_ptr< ITaxon3 > | m_pOwnTaxon |
TProgressCallback | m_PrgCallback =nullptr |
void * | m_UserData =nullptr |
shared_ptr< SValidatorContext > | m_pContext |
unique_ptr< CValidatorEntryInfo > | m_pEntryInfo |
Additional Inherited Members | |
Static Public Attributes inherited from CObject | |
static const TCount | eCounterBitsCanBeDeleted = 1 << 0 |
Define possible object states. More... | |
static const TCount | eCounterBitsInPlainHeap = 1 << 1 |
Heap signature was found. More... | |
static const TCount | eCounterBitsPlaceMask |
Mask for 'in heap' state flags. More... | |
static const int | eCounterStep = 1 << 2 |
Skip over the "in heap" bits. More... | |
static const TCount | eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2) |
Minimal value for valid objects (reference counter is zero) Must be a single bit value. More... | |
static const TCount | eCounterStateMask |
Valid object, and object in heap. More... | |
Protected Member Functions inherited from CObject | |
virtual void | DeleteThis (void) |
Virtual method "deleting" this object. More... | |
Definition at line 73 of file validator.hpp.
typedef int CValidator::TDbxrefValidFlags |
Definition at line 304 of file validator.hpp.
Definition at line 309 of file validator.hpp.
typedef bool(* CValidator::TProgressCallback) (CProgressInfo *) |
Definition at line 287 of file validator.hpp.
Definition at line 77 of file validator.hpp.
Enumerator | |
---|---|
eValid | |
eDbHasSgml | |
eTagHasSgml | |
eContainsSpace | |
eNotForSource | |
eOnlyForSource | |
eOnlyForRefSeq | |
eRefSeqNotForSource | |
eBadCapitalization | |
eUnrecognized |
Definition at line 292 of file validator.hpp.
Definition at line 79 of file validator.hpp.
CValidator::CValidator | ( | CObjectManager & | objmgr | ) |
Definition at line 61 of file validator.cpp.
CValidator::CValidator | ( | CObjectManager & | objmgr, |
shared_ptr< SValidatorContext > | pContext | ||
) |
Definition at line 67 of file validator.cpp.
|
delete |
CValidator::~CValidator | ( | ) |
Definition at line 82 of file validator.cpp.
Definition at line 537 of file validator.cpp.
References BadCharsInAuthor(), CAuthor_Base::GetName(), CPerson_id_Base::GetName(), CPerson_id_Base::IsName(), CAuthor_Base::IsSetName(), and kEmptyStr.
Definition at line 517 of file validator.cpp.
References BadCharsInAuthorFirstName(), BadCharsInAuthorInitials(), BadCharsInAuthorLastName(), BadCharsInAuthorSuffix(), CName_std_Base::GetFirst(), CName_std_Base::GetInitials(), CName_std_Base::GetLast(), CName_std_Base::GetSuffix(), CName_std_Base::IsSetFirst(), CName_std_Base::IsSetInitials(), CName_std_Base::IsSetLast(), and CName_std_Base::IsSetSuffix().
Referenced by BadCharsInAuthor(), and CValidError_imp::ValidateAuthorList().
Definition at line 499 of file validator.cpp.
References BadCharsInAuthorName(), and str().
Referenced by BadCharsInAuthor().
Definition at line 505 of file validator.cpp.
References BadCharsInAuthorName(), and str().
Referenced by BadCharsInAuthor().
Definition at line 489 of file validator.cpp.
References BadCharsInAuthorName(), NStr::EqualNocase(), and str().
Referenced by BadCharsInAuthor().
|
static |
Definition at line 443 of file validator.cpp.
References NStr::Equal(), isalpha(), NStr::IsBlank(), last(), NStr::StartsWith(), and str().
Referenced by BadCharsInAuthorFirstName(), BadCharsInAuthorInitials(), BadCharsInAuthorLastName(), BadCharsInAuthorSuffix(), and CValidError_imp::ValidateAuthorList().
Definition at line 511 of file validator.cpp.
References BadCharsInAuthorName(), and str().
Referenced by BadCharsInAuthor().
|
static |
Definition at line 714 of file validator.cpp.
References eErr_SEQ_DESCR_LatLonCountry, eErr_SEQ_DESCR_LatLonGeoLocName, eErr_SEQ_DESCR_LatLonState, eErr_SEQ_DESCR_LatLonValue, eErr_SEQ_DESCR_LatLonWater, eErr_UNKNOWN, CSubSource::eLatLonCountryErr_Country, CSubSource::eLatLonCountryErr_State, CSubSource::eLatLonCountryErr_Value, CSubSource::eLatLonCountryErr_Water, and CSubSource::NCBI_UseGeoLocNameForCountry().
Referenced by CValidError_imp::ValidateLatLonCountry().
Definition at line 680 of file validator.cpp.
References CheckConsecutiveIntervals(), and x_IsNotAdjacent().
Referenced by CValidError_imp::ValidateSeqLoc().
|
static |
Definition at line 708 of file validator.cpp.
References CheckConsecutiveIntervals(), and IsNotDuplicateInterval().
Referenced by CValidError_imp::ValidateSeqLoc().
const CValidator::TEntryInfo & CValidator::GetEntryInfo | ( | ) | const |
Definition at line 813 of file validator.cpp.
References m_pEntryInfo.
CConstRef< CValidError > CValidator::GetTSACDSOnMinusStrandErrors | ( | const CSeq_entry_Handle & | se | ) |
Definition at line 199 of file validator.cpp.
References CSeq_entry_Handle::GetCompleteSeq_entry(), CValidError_imp::GetTSACDSOnMinusStrandErrors(), m_ObjMgr, m_pContext, m_PrgCallback, m_UserData, CRef< C, Locker >::Reset(), CValidError_imp::SetProgressCallback(), and CValidErrorFormat::SetSuppressionRules().
CConstRef< CValidError > CValidator::GetTSACDSOnMinusStrandErrors | ( | const CSeq_feat & | f, |
const CBioseq & | seq | ||
) |
Definition at line 239 of file validator.cpp.
References f, CValidError_imp::GetTSACDSOnMinusStrandErrors(), m_ObjMgr, m_pContext, m_PrgCallback, m_UserData, CRef< C, Locker >::Reset(), CValidError_imp::SetProgressCallback(), and CValidErrorFormat::SetSuppressionRules().
CConstRef< CValidError > CValidator::GetTSAConflictingBiomolTechErrors | ( | const CBioseq & | seq | ) |
Definition at line 252 of file validator.cpp.
References CValidError_imp::GetTSAConflictingBiomolTechErrors(), m_ObjMgr, m_pContext, m_PrgCallback, m_UserData, CRef< C, Locker >::Reset(), CValidError_imp::SetProgressCallback(), and CValidErrorFormat::SetSuppressionRules().
CConstRef< CValidError > CValidator::GetTSAConflictingBiomolTechErrors | ( | const CSeq_entry_Handle & | se | ) |
Definition at line 212 of file validator.cpp.
References CSeq_entry_Handle::GetCompleteSeq_entry(), CValidError_imp::GetTSAConflictingBiomolTechErrors(), m_ObjMgr, m_pContext, m_PrgCallback, m_UserData, CRef< C, Locker >::Reset(), CValidError_imp::SetProgressCallback(), and CValidErrorFormat::SetSuppressionRules().
CConstRef< CValidError > CValidator::GetTSANStretchErrors | ( | const CBioseq & | seq | ) |
Definition at line 225 of file validator.cpp.
References CValidError_imp::GetTSANStretchErrors(), m_ObjMgr, m_pContext, m_PrgCallback, m_UserData, CRef< C, Locker >::Reset(), CValidError_imp::SetProgressCallback(), and CValidErrorFormat::SetSuppressionRules().
CConstRef< CValidError > CValidator::GetTSANStretchErrors | ( | const CSeq_entry_Handle & | se | ) |
Definition at line 186 of file validator.cpp.
References CSeq_entry_Handle::GetCompleteSeq_entry(), CValidError_imp::GetTSANStretchErrors(), m_ObjMgr, m_pContext, m_PrgCallback, m_UserData, CRef< C, Locker >::Reset(), CValidError_imp::SetProgressCallback(), and CValidErrorFormat::SetSuppressionRules().
Definition at line 634 of file validator.cpp.
References CheckConsecutiveIntervals(), CSeq_inst_Base::eTopology_circular, CScope::GetBioseqHandle(), CBioseq_Handle::GetInst_Topology(), and x_IsCorrectlyOrdered().
Referenced by CValidError_imp::ValidateSeqLoc().
bool CValidator::IsSetEntryInfo | ( | ) | const |
Definition at line 807 of file validator.cpp.
References m_pEntryInfo.
|
static |
Definition at line 744 of file validator.cpp.
References ContainsSgml(), eBadCapitalization, eContainsSpace, eDbHasSgml, eNotForSource, eOnlyForRefSeq, eOnlyForSource, NStr::EqualCase(), NStr::EqualNocase(), eRefSeqNotForSource, eTagHasSgml, eUnrecognized, eValid, flags, CDbtag_Base::GetDb(), CDbtag::GetDBFlags(), CObject_id_Base::GetId(), CObject_id_Base::GetStr(), CDbtag_Base::GetTag(), CObject_id_Base::IsId(), CDbtag_Base::IsSetDb(), CDbtag_Base::IsSetTag(), CObject_id_Base::IsStr(), and NStr::NumericToString().
Referenced by CValidError_imp::ValidateDbxref().
Definition at line 424 of file validator.cpp.
References CSeqdesc_Base::IsUser(), CValidError_desc::IsValidStructuredComment(), m_ObjMgr, and m_pContext.
Definition at line 832 of file validator.cpp.
References Ref().
|
static |
|
delete |
|
inline |
Definition at line 307 of file validator.hpp.
References m_pContext.
void CValidator::SetProgressCallback | ( | TProgressCallback | callback, |
void * | user_data = nullptr |
||
) |
Definition at line 436 of file validator.cpp.
References m_PrgCallback, and m_UserData.
void CValidator::SetTaxon3 | ( | shared_ptr< ITaxon3 > | taxon | ) |
Definition at line 75 of file validator.cpp.
References m_pContext, m_pOwnTaxon, and MakeTaxUpdateFunction().
void CValidator::Validate | ( | const CBioSource & | src, |
CScope * | scope, | ||
Uint4 | options, | ||
IValidError & | errors | ||
) |
Definition at line 369 of file validator.cpp.
References m_ObjMgr, m_pContext, and CValidError_imp::Validate().
CConstRef< CValidError > CValidator::Validate | ( | const CBioSource & | src, |
CScope * | scope = nullptr , |
||
Uint4 | options = 0 |
||
) |
Definition at line 357 of file validator.cpp.
References m_ObjMgr, m_pContext, and CValidError_imp::Validate().
void CValidator::Validate | ( | const CPubdesc & | desc, |
CScope * | scope, | ||
Uint4 | options, | ||
IValidError & | errors | ||
) |
Definition at line 393 of file validator.cpp.
References m_ObjMgr, m_pContext, and CValidError_imp::Validate().
CConstRef< CValidError > CValidator::Validate | ( | const CPubdesc & | pubdesc, |
CScope * | scope = nullptr , |
||
Uint4 | options = 0 |
||
) |
Definition at line 382 of file validator.cpp.
References m_ObjMgr, m_pContext, and CValidError_imp::Validate().
void CValidator::Validate | ( | const CSeq_annot_Handle & | sa, |
Uint4 | options, | ||
CValidError & | errors | ||
) |
Definition at line 313 of file validator.cpp.
References m_ObjMgr, m_pContext, and CValidError_imp::Validate().
void CValidator::Validate | ( | const CSeq_annot_Handle & | sa, |
Uint4 | options, | ||
IValidError & | errors | ||
) |
Definition at line 323 of file validator.cpp.
References m_ObjMgr, m_pContext, and CValidError_imp::Validate().
CConstRef< CValidError > CValidator::Validate | ( | const CSeq_annot_Handle & | sa, |
Uint4 | options = 0 |
||
) |
Definition at line 303 of file validator.cpp.
References CSeq_annot_Handle::GetCompleteSeq_annot(), Ref(), and Validate().
void CValidator::Validate | ( | const CSeq_entry & | se, |
CScope * | scope, | ||
Uint4 | options, | ||
IValidError & | errors, | ||
const TSuppressed * | pSuppressed = nullptr |
||
) |
Definition at line 123 of file validator.cpp.
References CValidError_imp::GetCumulativeInferenceCount(), CValidError_imp::GetEntryInfo(), CValidError_imp::GetGeneCount(), CValidError_imp::GetGeneXrefCount(), m_ObjMgr, m_pContext, m_PrgCallback, m_UserData, CValidError_imp::SetProgressCallback(), CValidError_imp::SetSuppressed(), CValidError_imp::Validate(), and x_SetEntryInfo().
CRef< CValidError > CValidator::Validate | ( | const CSeq_entry & | se, |
CScope * | scope = nullptr , |
||
Uint4 | options = 0 |
||
) |
Definition at line 101 of file validator.cpp.
References ctx, CValidError_imp::GetCumulativeInferenceCount(), CValidError_imp::GetEntryInfo(), CValidError_imp::GetGeneCount(), CValidError_imp::GetGeneXrefCount(), m_ObjMgr, m_pContext, m_PrgCallback, m_UserData, CRef< C, Locker >::Reset(), CValidError_imp::SetContext(), CValidError_imp::SetProgressCallback(), CValidErrorFormat::SetSuppressionRules(), CValidError_imp::Validate(), and x_SetEntryInfo().
Referenced by BOOST_AUTO_TEST_CASE(), CAsnvalThreadState::ProcessBioSource(), CAsnvalThreadState::ProcessPubdesc(), CAsnvalThreadState::ProcessSeqAnnot(), CAsnvalThreadState::ProcessSeqDesc(), CAsnvalThreadState::ProcessSeqEntry(), CAsnvalThreadState::ProcessSeqFeat(), CAsnvalThreadState::ProcessSeqSubmit(), CAsnvalThreadState::ReadClassMember(), s_TestOneWrongQual(), CValidateProcess::SeqEntryProcess(), Validate(), and CAsnvalThreadState::ValidateAsync().
CRef< CValidError > CValidator::Validate | ( | const CSeq_entry_Handle & | se, |
Uint4 | options = 0 |
||
) |
Definition at line 143 of file validator.cpp.
References ctx, CSeq_entry_Handle::GetCompleteSeq_entry(), CValidError_imp::GetCumulativeInferenceCount(), CValidError_imp::GetEntryInfo(), CValidError_imp::GetGeneCount(), CValidError_imp::GetGeneXrefCount(), m_ObjMgr, m_pContext, m_PrgCallback, m_UserData, CRef< C, Locker >::Reset(), CValidError_imp::SetContext(), CValidError_imp::SetProgressCallback(), CValidErrorFormat::SetSuppressionRules(), CValidError_imp::Validate(), and x_SetEntryInfo().
void CValidator::Validate | ( | const CSeq_entry_Handle & | seh, |
Uint4 | options, | ||
IValidError & | errors, | ||
const TSuppressed * | pSuppressed = nullptr |
||
) |
Definition at line 163 of file validator.cpp.
References ctx, CValidError_imp::GetCumulativeInferenceCount(), CValidError_imp::GetEntryInfo(), CValidError_imp::GetGeneCount(), CValidError_imp::GetGeneXrefCount(), m_ObjMgr, m_pContext, m_PrgCallback, m_UserData, CValidError_imp::SetContext(), CValidError_imp::SetProgressCallback(), CValidError_imp::SetSuppressed(), CValidError_imp::Validate(), and x_SetEntryInfo().
void CValidator::Validate | ( | const CSeq_feat & | feat, |
CScope * | scope, | ||
Uint4 | options, | ||
IValidError & | errors | ||
) |
Definition at line 345 of file validator.cpp.
References m_ObjMgr, m_pContext, and CValidError_imp::Validate().
CConstRef< CValidError > CValidator::Validate | ( | const CSeq_feat & | feat, |
CScope * | scope = nullptr , |
||
Uint4 | options = 0 |
||
) |
Definition at line 333 of file validator.cpp.
References m_ObjMgr, m_pContext, and CValidError_imp::Validate().
void CValidator::Validate | ( | const CSeq_submit & | ss, |
CScope * | scope, | ||
Uint4 | options, | ||
IValidError & | errors, | ||
const TSuppressed * | pSuppressed = nullptr |
||
) |
Definition at line 283 of file validator.cpp.
References eVal_seqsubmit_parent, CValidError_imp::GetCumulativeInferenceCount(), CValidError_imp::GetEntryInfo(), CValidError_imp::GetGeneCount(), CValidError_imp::GetGeneXrefCount(), m_ObjMgr, m_pContext, CValidError_imp::SetSuppressed(), CValidError_imp::Validate(), and x_SetEntryInfo().
CRef< CValidError > CValidator::Validate | ( | const CSeq_submit & | ss, |
CScope * | scope = nullptr , |
||
Uint4 | options = 0 |
||
) |
Definition at line 266 of file validator.cpp.
References eVal_seqsubmit_parent, CValidError_imp::GetEntryInfo(), m_ObjMgr, m_pContext, CValidErrorFormat::SetSuppressionRules(), CValidError_imp::Validate(), and x_SetEntryInfo().
void CValidator::Validate | ( | const CSeqdesc & | desc, |
const CSeq_entry & | ctx, | ||
Uint4 | options, | ||
IValidError & | errors | ||
) |
Definition at line 414 of file validator.cpp.
References ctx, m_ObjMgr, m_pContext, and CValidError_imp::Validate().
CConstRef< CValidError > CValidator::Validate | ( | const CSeqdesc & | desc, |
const CSeq_entry & | ctx, | ||
Uint4 | options = 0 |
||
) |
Definition at line 403 of file validator.cpp.
References ctx, m_ObjMgr, m_pContext, and CValidError_imp::Validate().
|
private |
Definition at line 801 of file validator.cpp.
References info, and m_pEntryInfo.
Referenced by Validate().
|
private |
Definition at line 316 of file validator.hpp.
Referenced by GetTSACDSOnMinusStrandErrors(), GetTSAConflictingBiomolTechErrors(), GetTSANStretchErrors(), IsValidStructuredComment(), and Validate().
|
private |
Definition at line 321 of file validator.hpp.
Referenced by GetTSACDSOnMinusStrandErrors(), GetTSAConflictingBiomolTechErrors(), GetTSANStretchErrors(), IsValidStructuredComment(), SetContext(), SetTaxon3(), and Validate().
|
private |
Definition at line 322 of file validator.hpp.
Referenced by GetEntryInfo(), IsSetEntryInfo(), and x_SetEntryInfo().
|
private |
Definition at line 317 of file validator.hpp.
Referenced by SetTaxon3().
|
private |
Definition at line 319 of file validator.hpp.
Referenced by GetTSACDSOnMinusStrandErrors(), GetTSAConflictingBiomolTechErrors(), GetTSANStretchErrors(), SetProgressCallback(), and Validate().
|
private |
Definition at line 320 of file validator.hpp.
Referenced by GetTSACDSOnMinusStrandErrors(), GetTSAConflictingBiomolTechErrors(), GetTSANStretchErrors(), SetProgressCallback(), and Validate().