NCBI C++ ToolKit
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
TestUtil::CBlastOM Class Reference

Search Toolkit Book for TestUtil::CBlastOM

Class which registers the BLAST database and Genbank data loaders as a non-default data loaders with the object manager upon construction. More...

#include "blast_test_util.hpp"
(Private to src/objtools/align_format/unit_test.)

+ Collaboration diagram for TestUtil::CBlastOM:

Public Types

enum  ELocation { eRemote , eLocal }
 
typedef ncbi::CBlastDbDataLoader::EDbType EDbType
 

Public Member Functions

 CBlastOM (const std::string &dbname, EDbType db_type, ELocation location=eLocal)
 
ncbi::CRef< ncbi::objects::CScope > NewScope ()
 Create a new scope with the default set to the BLAST database data loader for the BLAST database specified in the constructor (if found), then set to the Genbank data loader. More...
 
void RevokeBlastDbDataLoader ()
 Removes the BLAST database data loader from the object manager. More...
 

Private Member Functions

void x_InitBlastDatabaseDataLoader (const std::string &dbname, EDbType dbtype, ELocation location)
 
void x_InitGenbankDataLoader ()
 

Private Attributes

ncbi::CRef< ncbi::objects::CObjectManager > m_ObjMgr
 
std::string m_BlastDbLoaderName
 
std::string m_GbLoaderName
 

Detailed Description

Class which registers the BLAST database and Genbank data loaders as a non-default data loaders with the object manager upon construction.

Designed so that the scopes created by this object are configured properly to obtain the sequences in the expected priorities in the BLAST code.

Definition at line 170 of file blast_test_util.hpp.

Member Typedef Documentation

◆ EDbType

typedef ncbi::CBlastDbDataLoader::EDbType TestUtil::CBlastOM::EDbType

Definition at line 178 of file blast_test_util.hpp.

Member Enumeration Documentation

◆ ELocation

Enumerator
eRemote 
eLocal 

Definition at line 173 of file blast_test_util.hpp.

Constructor & Destructor Documentation

◆ CBlastOM()

TestUtil::CBlastOM::CBlastOM ( const std::string dbname,
EDbType  db_type,
ELocation  location = eLocal 
)

Member Function Documentation

◆ NewScope()

CRef< CScope > TestUtil::CBlastOM::NewScope ( )

Create a new scope with the default set to the BLAST database data loader for the BLAST database specified in the constructor (if found), then set to the Genbank data loader.

Definition at line 224 of file blast_test_util.cpp.

References CScope::AddDataLoader(), m_BlastDbLoaderName, m_GbLoaderName, and m_ObjMgr.

Referenced by BOOST_AUTO_TEST_CASE(), CShowBlastDeflineTest::GetDeflineInfo(), and TestSimpleAlignment().

◆ RevokeBlastDbDataLoader()

void TestUtil::CBlastOM::RevokeBlastDbDataLoader ( )

Removes the BLAST database data loader from the object manager.

Definition at line 237 of file blast_test_util.cpp.

References CObjectManager::GetInstance(), m_BlastDbLoaderName, and CObjectManager::RevokeDataLoader().

Referenced by TestSimpleAlignment().

◆ x_InitBlastDatabaseDataLoader()

void TestUtil::CBlastOM::x_InitBlastDatabaseDataLoader ( const std::string dbname,
EDbType  dbtype,
ELocation  location 
)
private

◆ x_InitGenbankDataLoader()

void TestUtil::CBlastOM::x_InitGenbankDataLoader ( )
private

Member Data Documentation

◆ m_BlastDbLoaderName

std::string TestUtil::CBlastOM::m_BlastDbLoaderName
private

◆ m_GbLoaderName

std::string TestUtil::CBlastOM::m_GbLoaderName
private

Definition at line 193 of file blast_test_util.hpp.

Referenced by NewScope(), and x_InitGenbankDataLoader().

◆ m_ObjMgr

ncbi::CRef<ncbi::objects::CObjectManager> TestUtil::CBlastOM::m_ObjMgr
private

The documentation for this class was generated from the following files:
Modified on Sun Jul 14 04:55:40 2024 by modify_doxy.py rev. 669887