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

Search Toolkit Book for CBlastDbFormatter

Customizable BLAST DB information formatter interface. More...

#include <objtools/blast/blastdb_format/blastdb_formatter.hpp>

Public Member Functions

 CBlastDbFormatter (const string &fmt_spec)
 Constructor. More...
 
string Write (const SSeqDBInitInfo &db_init_info)
 Extracts the BLAST database information for the requested BLAST DB according to the output format specification requested in the constructor. More...
 

Private Member Functions

string x_Replacer (const vector< string > &data2write) const
 Replace format specifiers for the data contained in data2write. More...
 
 CBlastDbFormatter (const CBlastDbFormatter &rhs)
 Prohibit copy constructor. More...
 
CBlastDbFormatteroperator= (const CBlastDbFormatter &rhs)
 Prohibit assignment operator. More...
 

Private Attributes

string m_FmtSpec
 The output format specification. More...
 
vector< SIZE_TYPEm_ReplOffsets
 Vector of offsets where the replacements will take place. More...
 
vector< char > m_ReplacementTypes
 

Detailed Description

Customizable BLAST DB information formatter interface.

Definition at line 43 of file blastdb_formatter.hpp.

Constructor & Destructor Documentation

◆ CBlastDbFormatter() [1/2]

CBlastDbFormatter::CBlastDbFormatter ( const string fmt_spec)

Constructor.

Parameters
fmt_specOutput format specification, supports the flags specified in the blastdbcmd -list_outfmt command line option [in]

Definition at line 42 of file blastdb_formatter.cpp.

References i, m_FmtSpec, m_ReplacementTypes, m_ReplOffsets, and NCBI_THROW.

◆ CBlastDbFormatter() [2/2]

CBlastDbFormatter::CBlastDbFormatter ( const CBlastDbFormatter rhs)
private

Prohibit copy constructor.

Member Function Documentation

◆ operator=()

CBlastDbFormatter& CBlastDbFormatter::operator= ( const CBlastDbFormatter rhs)
private

Prohibit assignment operator.

◆ Write()

string CBlastDbFormatter::Write ( const SSeqDBInitInfo db_init_info)

Extracts the BLAST database information for the requested BLAST DB according to the output format specification requested in the constructor.

Parameters
db_init_infoobject defining the BLAST DB initialization information [in]

Definition at line 124 of file blastdb_formatter.cpp.

References CBlastDbMetadata::GetDate(), CBlastDbMetadata::GetDbLength(), CBlastDbMetadata::GetDiskUsage(), CBlastDbMetadata::GetFileName(), CBlastDbMetadata::GetMoleculeType(), CBlastDbMetadata::GetNumberOfSequences(), CBlastDbMetadata::GetTitle(), CBlastDbMetadata::GetVersion(), ITERATE, m_ReplacementTypes, NCBI_THROW, and x_Replacer().

◆ x_Replacer()

string CBlastDbFormatter::x_Replacer ( const vector< string > &  data2write) const
private

Replace format specifiers for the data contained in data2write.

Parameters
data2writedata to replace in the output string [in]

Definition at line 176 of file blastdb_formatter.cpp.

References i, m_FmtSpec, and m_ReplOffsets.

Referenced by Write().

Member Data Documentation

◆ m_FmtSpec

string CBlastDbFormatter::m_FmtSpec
private

The output format specification.

Definition at line 60 of file blastdb_formatter.hpp.

Referenced by CBlastDbFormatter(), and x_Replacer().

◆ m_ReplacementTypes

vector<char> CBlastDbFormatter::m_ReplacementTypes
private

Definition at line 65 of file blastdb_formatter.hpp.

Referenced by CBlastDbFormatter(), and Write().

◆ m_ReplOffsets

vector<SIZE_TYPE> CBlastDbFormatter::m_ReplOffsets
private

Vector of offsets where the replacements will take place.

Definition at line 62 of file blastdb_formatter.hpp.

Referenced by CBlastDbFormatter(), and x_Replacer().


The documentation for this class was generated from the following files:
Modified on Thu Feb 22 17:12:48 2024 by modify_doxy.py rev. 669887