NCBI C++ ToolKit
Public Types | Public Member Functions | Protected Types | Protected Attributes | List of all members
CSeqTestManager Class Reference

Search Toolkit Book for CSeqTestManager

#include <algo/seqqa/seqtest.hpp>

+ Collaboration diagram for CSeqTestManager:

Public Types

typedef list< CRef< objects::CSeqTestResults > > TResults
 

Public Member Functions

virtual ~CSeqTestManager ()
 
virtual void RegisterStandardTests ()
 Provide a standard battery of quality checks that should always be run. More...
 
void RegisterTest (const CTypeInfo *info, CSeqTest *test)
 Register a test to be run for a given object sub-type. More...
 
void UnRegisterTest (const CTypeInfo *info, CSeqTest *test)
 "Un-register" a test for a given object sub-type. More...
 
virtual CRef< objects::CSeq_test_result_set > RunTests (const CSerialObject &obj, const CSeqTestContext *ctx=NULL)
 Run tests for a given serial object. More...
 
virtual TResults RunTests (const CSerialObject &obj, const CTypeInfo &info, const CSeqTestContext *ctx=NULL)
 Run tests for a given set of serial objects. More...
 

Protected Types

typedef multimap< const CTypeInfo *, CRef< CSeqTest > > TTests
 

Protected Attributes

TTests m_Tests
 

Detailed Description

Definition at line 134 of file seqtest.hpp.

Member Typedef Documentation

◆ TResults

typedef list< CRef<objects::CSeqTestResults> > CSeqTestManager::TResults

Definition at line 137 of file seqtest.hpp.

◆ TTests

Definition at line 177 of file seqtest.hpp.

Constructor & Destructor Documentation

◆ ~CSeqTestManager()

virtual CSeqTestManager::~CSeqTestManager ( )
inlinevirtual

Definition at line 139 of file seqtest.hpp.

Member Function Documentation

◆ RegisterStandardTests()

void CSeqTestManager::RegisterStandardTests ( )
virtual

Provide a standard battery of quality checks that should always be run.

Definition at line 122 of file seqtest.cpp.

References RegisterTest().

Referenced by CDemoSeqQaApp::Run().

◆ RegisterTest()

void CSeqTestManager::RegisterTest ( const CTypeInfo info,
CSeqTest test 
)

Register a test to be run for a given object sub-type.

Definition at line 178 of file seqtest.cpp.

References info, multimap_checker< Container >::insert(), m_Tests, and test.

Referenced by RegisterStandardTests().

◆ RunTests() [1/2]

CRef< CSeq_test_result_set > CSeqTestManager::RunTests ( const CSerialObject obj,
const CSeqTestContext ctx = NULL 
)
virtual

Run tests for a given serial object.

Definition at line 199 of file seqtest.cpp.

References ctx, multimap_checker< Container >::equal_range(), CSeq_test_result_set_Base::Get(), CSerialObject::GetThisTypeInfo(), info, m_Tests, and results.

Referenced by CDemoSeqQaApp::Run(), and RunTests().

◆ RunTests() [2/2]

CSeqTestManager::TResults CSeqTestManager::RunTests ( const CSerialObject obj,
const CTypeInfo info,
const CSeqTestContext ctx = NULL 
)
virtual

Run tests for a given set of serial objects.

The seria objects are obtained by iterating looking for a given type

For example, to run all seq-feat tests on a given seq-entry, one could call:

CSeqTestManager::RunTests(entry, *CSeq_feat::GetTypeInfo());

where entry is a CSeq_entry object

Definition at line 224 of file seqtest.cpp.

References ctx, CTreeIteratorTmpl< LevelIterator >::Get(), CSeq_test_result_set_Base::Get(), info, r(), results, and RunTests().

◆ UnRegisterTest()

void CSeqTestManager::UnRegisterTest ( const CTypeInfo info,
CSeqTest test 
)

"Un-register" a test for a given object sub-type.

This is useful in conjunction with RegisterStandardTests for excluding particular standard tests. This undoes, for this object type, all registrations of CSeqTest objects of the same subclass as parameter "test" (usually there is at most one).

Definition at line 185 of file seqtest.cpp.

References multimap_checker< Container >::equal_range(), multimap_checker< Container >::erase(), info, m_Tests, next(), and test.

Member Data Documentation

◆ m_Tests

TTests CSeqTestManager::m_Tests
protected

Definition at line 178 of file seqtest.hpp.

Referenced by RegisterTest(), RunTests(), and UnRegisterTest().


The documentation for this class was generated from the following files:
Modified on Wed Sep 04 15:00:00 2024 by modify_doxy.py rev. 669887