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 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... | |
![]() | |
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 265 of file validator.hpp.
Definition at line 270 of file validator.hpp.
typedef bool(* CValidator::TProgressCallback) (CProgressInfo *) |
Definition at line 248 of file validator.hpp.
Enumerator | |
---|---|
eValid | |
eDbHasSgml | |
eTagHasSgml | |
eContainsSpace | |
eNotForSource | |
eOnlyForSource | |
eOnlyForRefSeq | |
eRefSeqNotForSource | |
eBadCapitalization | |
eUnrecognized |
Definition at line 253 of file validator.hpp.
Definition at line 77 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 81 of file validator.cpp.
Definition at line 417 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 397 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 379 of file validator.cpp.
References BadCharsInAuthorName(), and str().
Referenced by BadCharsInAuthor().
Definition at line 385 of file validator.cpp.
References BadCharsInAuthorName(), and str().
Referenced by BadCharsInAuthor().
Definition at line 369 of file validator.cpp.
References BadCharsInAuthorName(), NStr::EqualNocase(), and str().
Referenced by BadCharsInAuthor().
|
static |
Definition at line 323 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 391 of file validator.cpp.
References BadCharsInAuthorName(), and str().
Referenced by BadCharsInAuthor().
|
static |
Definition at line 594 of file validator.cpp.
References eErr_SEQ_DESCR_LatLonCountry, eErr_SEQ_DESCR_LatLonState, eErr_SEQ_DESCR_LatLonValue, eErr_SEQ_DESCR_LatLonWater, eErr_UNKNOWN, CSubSource::eLatLonCountryErr_Country, CSubSource::eLatLonCountryErr_State, CSubSource::eLatLonCountryErr_Value, and CSubSource::eLatLonCountryErr_Water.
Referenced by CValidError_imp::ValidateLatLonCountry().
Definition at line 560 of file validator.cpp.
References CheckConsecutiveIntervals(), and x_IsNotAdjacent().
Referenced by CValidError_imp::ValidateSeqLoc().
|
static |
Definition at line 588 of file validator.cpp.
References CheckConsecutiveIntervals(), and IsNotDuplicateInterval().
Referenced by CValidError_imp::ValidateSeqLoc().
const CValidator::TEntryInfo & CValidator::GetEntryInfo | ( | ) | const |
Definition at line 686 of file validator.cpp.
References m_pEntryInfo.
CConstRef< CValidError > CValidator::GetTSACDSOnMinusStrandErrors | ( | const CSeq_entry_Handle & | se | ) |
Definition at line 154 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 194 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 207 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 167 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 180 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 141 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 514 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 680 of file validator.cpp.
References m_pEntryInfo.
|
static |
Definition at line 617 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 304 of file validator.cpp.
References CSeqdesc_Base::IsUser(), CValidError_desc::IsValidStructuredComment(), m_ObjMgr, and m_pContext.
Definition at line 705 of file validator.cpp.
References Ref().
|
static |
|
delete |
|
inline |
Definition at line 268 of file validator.hpp.
References m_pContext.
void CValidator::SetProgressCallback | ( | TProgressCallback | callback, |
void * | user_data = nullptr |
||
) |
Definition at line 316 of file validator.cpp.
References m_PrgCallback, and m_UserData.
void CValidator::SetTaxon3 | ( | shared_ptr< ITaxon3 > | taxon | ) |
Definition at line 74 of file validator.cpp.
References m_pContext, m_pOwnTaxon, and MakeTaxUpdateFunction().
CConstRef< CValidError > CValidator::Validate | ( | const CBioSource & | src, |
CScope * | scope = nullptr , |
||
Uint4 | options = 0 |
||
) |
Definition at line 270 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 281 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 248 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 238 of file validator.cpp.
References CSeq_annot_Handle::GetCompleteSeq_annot(), Ref(), and Validate().
CRef< CValidError > CValidator::Validate | ( | const CSeq_entry & | se, |
CScope * | scope = nullptr , |
||
Uint4 | options = 0 |
||
) |
Definition at line 100 of file validator.cpp.
References ctx, 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 122 of file validator.cpp.
References ctx, CSeq_entry_Handle::GetCompleteSeq_entry(), 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().
CConstRef< CValidError > CValidator::Validate | ( | const CSeq_feat & | feat, |
CScope * | scope = nullptr , |
||
Uint4 | options = 0 |
||
) |
Definition at line 258 of file validator.cpp.
References m_ObjMgr, m_pContext, and CValidError_imp::Validate().
CRef< CValidError > CValidator::Validate | ( | const CSeq_submit & | ss, |
CScope * | scope = nullptr , |
||
Uint4 | options = 0 |
||
) |
Definition at line 221 of file validator.cpp.
References eVal_seqsubmit_parent, CValidError_imp::GetEntryInfo(), m_ObjMgr, m_pContext, CValidErrorFormat::SetSuppressionRules(), CValidError_imp::Validate(), and x_SetEntryInfo().
CConstRef< CValidError > CValidator::Validate | ( | const CSeqdesc & | desc, |
const CSeq_entry & | ctx, | ||
Uint4 | options = 0 |
||
) |
Definition at line 292 of file validator.cpp.
References ctx, m_ObjMgr, m_pContext, and CValidError_imp::Validate().
|
private |
Definition at line 674 of file validator.cpp.
References info, and m_pEntryInfo.
Referenced by Validate().
|
private |
Definition at line 277 of file validator.hpp.
Referenced by GetTSACDSOnMinusStrandErrors(), GetTSAConflictingBiomolTechErrors(), GetTSANStretchErrors(), IsValidStructuredComment(), and Validate().
|
private |
Definition at line 282 of file validator.hpp.
Referenced by GetTSACDSOnMinusStrandErrors(), GetTSAConflictingBiomolTechErrors(), GetTSANStretchErrors(), IsValidStructuredComment(), SetContext(), SetTaxon3(), and Validate().
|
private |
Definition at line 283 of file validator.hpp.
Referenced by GetEntryInfo(), IsSetEntryInfo(), and x_SetEntryInfo().
|
private |
Definition at line 278 of file validator.hpp.
Referenced by SetTaxon3().
|
private |
Definition at line 280 of file validator.hpp.
Referenced by GetTSACDSOnMinusStrandErrors(), GetTSAConflictingBiomolTechErrors(), GetTSANStretchErrors(), SetProgressCallback(), and Validate().
|
private |
Definition at line 281 of file validator.hpp.
Referenced by GetTSACDSOnMinusStrandErrors(), GetTSAConflictingBiomolTechErrors(), GetTSANStretchErrors(), SetProgressCallback(), and Validate().