NCBI C++ ToolKit
Public Member Functions | Private Attributes | List of all members
CAlnAsnReader Class Reference

Search Toolkit Book for CAlnAsnReader

Helper class for reading seq-align objects from a CObjectIStream. More...

#include <objtools/alnmgr/aln_asn_reader.hpp>

+ Collaboration diagram for CAlnAsnReader:

Public Member Functions

 CAlnAsnReader (CScope *scope=NULL)
 Create alignment reader. More...
 
void SetVerbose (bool verbose=true)
 Switch verbose report about loaded objects on/off. More...
 
template<class TCallback >
void Read (CObjectIStream *obj_in_stream, TCallback callback, const string &top_level_asn_object=kEmptyStr)
 Read all seq-align objects from the stream. More...
 

Private Attributes

CScopem_Scope
 
bool m_Verbose
 

Detailed Description

Helper class for reading seq-align objects from a CObjectIStream.

Definition at line 59 of file aln_asn_reader.hpp.

Constructor & Destructor Documentation

◆ CAlnAsnReader()

CAlnAsnReader::CAlnAsnReader ( CScope scope = NULL)
inline

Create alignment reader.

If the scope is not null, the loaded seq-entry objects are added to the scope.

Definition at line 64 of file aln_asn_reader.hpp.

Member Function Documentation

◆ Read()

template<class TCallback >
void CAlnAsnReader::Read ( CObjectIStream obj_in_stream,
TCallback  callback,
const string top_level_asn_object = kEmptyStr 
)
inline

Read all seq-align objects from the stream.

Parameters
obj_in_streamThe object stream to read from.
callbackCallback receiving the loaded seq-aligns. The callback must accept const CSeq_align*.
top_level_asn_objectName of the top level object type. Required for binary ASN.1 files to force the type.

Definition at line 86 of file aln_asn_reader.hpp.

References CType< C >::AddTo(), CScope::AddTopLevelSeqEntry(), Begin(), CObjectIStream::EndOfData(), CObjectIStream::eNoFileHeader, CSeq_align_Base::eType_not_set, eUnknown, CDense_seg_Base::GetDim(), i, m_Scope, m_Verbose, NCBI_THROW, CObjectIStream::Read(), CObjectIStream::ReadFileHeader(), CSeq_align_Base::SetDim(), CSeq_align_Base::SetSegs(), and CSeq_align_Base::SetType().

Referenced by CAlnVwrApp::LoadDenseg(), CAlnTestApp::LoadInputAlns(), CAlnBuildApp::LoadInputAlns(), CAlnMrgApp::LoadInputAlns(), and CPairwiseAlnApp::LoadInputAlns().

◆ SetVerbose()

void CAlnAsnReader::SetVerbose ( bool  verbose = true)
inline

Switch verbose report about loaded objects on/off.

Definition at line 71 of file aln_asn_reader.hpp.

References m_Verbose.

Member Data Documentation

◆ m_Scope

CScope* CAlnAsnReader::m_Scope
private

Definition at line 203 of file aln_asn_reader.hpp.

Referenced by Read().

◆ m_Verbose

bool CAlnAsnReader::m_Verbose
private

Definition at line 204 of file aln_asn_reader.hpp.

Referenced by Read(), and SetVerbose().


The documentation for this class was generated from the following file:
Modified on Tue Jun 25 13:34:34 2024 by modify_doxy.py rev. 669887