NCBI C++ ToolKit
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
CFastaIOWrapper Class Referenceabstract

Search Toolkit Book for CFastaIOWrapper

#include <algo/structure/cd_utils/cuReadFastaWrapper.hpp>

+ Inheritance diagram for CFastaIOWrapper:
+ Collaboration diagram for CFastaIOWrapper:

Public Member Functions

 CFastaIOWrapper (bool cacheRawString=false)
 
virtual ~CFastaIOWrapper ()
 
virtual bool ReadFile (CNcbiIstream &iStream)=0
 
virtual bool Write (CNcbiOstream &ostream)
 
virtual unsigned int GetNumRead () const
 
virtual string GetActiveDefline (unsigned int index) const
 
virtual string GetActiveSequence (unsigned int index, bool removeWhitespace=true) const
 
virtual string GetRawDefline (unsigned int index) const
 
virtual string GetRawSequence (unsigned int index, bool removeWhitespace=true) const
 
bool HasSeqEntry () const
 
const CRef< CSeq_entry > & GetSeqEntry () const
 
virtual stringGetActiveFastaString ()
 
const stringGetRawFastaString ()
 
void ClearActiveFasta ()
 
void ResetActiveFasta ()
 
string GetError ()
 
bool IsUseBioseqSet () const
 
void SetUseBioseqSet (bool useBioseqSet)
 

Protected Member Functions

string GetSubstring (const string &s, unsigned int index, bool isDefline) const
 

Protected Attributes

bool m_cacheRawFasta
 
string m_rawFastaString
 
string m_activeFastaString
 
string m_error
 
bool m_useBioseqSet
 
CRef< CSeq_entrym_seqEntry
 

Static Protected Attributes

static const char gt = '>'
 
static const char nl = '\n'
 

Detailed Description

Definition at line 46 of file cuReadFastaWrapper.hpp.

Constructor & Destructor Documentation

◆ CFastaIOWrapper()

CFastaIOWrapper::CFastaIOWrapper ( bool  cacheRawString = false)
inline

Definition at line 56 of file cuReadFastaWrapper.hpp.

◆ ~CFastaIOWrapper()

virtual CFastaIOWrapper::~CFastaIOWrapper ( )
inlinevirtual

Definition at line 64 of file cuReadFastaWrapper.hpp.

Member Function Documentation

◆ ClearActiveFasta()

void CFastaIOWrapper::ClearActiveFasta ( )
inline

Definition at line 95 of file cuReadFastaWrapper.hpp.

◆ GetActiveDefline()

string CFastaIOWrapper::GetActiveDefline ( unsigned int  index) const
virtual

Definition at line 197 of file cuReadFastaWrapper.cpp.

References GetSubstring(), and m_activeFastaString.

Referenced by CCdFromFasta::GetDeflineReadFromFile().

◆ GetActiveFastaString()

virtual string& CFastaIOWrapper::GetActiveFastaString ( )
inlinevirtual

Definition at line 86 of file cuReadFastaWrapper.hpp.

◆ GetActiveSequence()

string CFastaIOWrapper::GetActiveSequence ( unsigned int  index,
bool  removeWhitespace = true 
) const
virtual

◆ GetError()

string CFastaIOWrapper::GetError ( void  )
inline

Definition at line 105 of file cuReadFastaWrapper.hpp.

Referenced by CCdFromFasta::ImportAlignmentData().

◆ GetNumRead()

unsigned int CFastaIOWrapper::GetNumRead ( ) const
virtual

◆ GetRawDefline()

string CFastaIOWrapper::GetRawDefline ( unsigned int  index) const
virtual

Definition at line 222 of file cuReadFastaWrapper.cpp.

References GetSubstring(), m_cacheRawFasta, and m_rawFastaString.

◆ GetRawFastaString()

const string& CFastaIOWrapper::GetRawFastaString ( )
inline

Definition at line 91 of file cuReadFastaWrapper.hpp.

◆ GetRawSequence()

string CFastaIOWrapper::GetRawSequence ( unsigned int  index,
bool  removeWhitespace = true 
) const
virtual

◆ GetSeqEntry()

const CRef<CSeq_entry>& CFastaIOWrapper::GetSeqEntry ( ) const
inline

◆ GetSubstring()

string CFastaIOWrapper::GetSubstring ( const string s,
unsigned int  index,
bool  isDefline 
) const
protected

Definition at line 162 of file cuReadFastaWrapper.cpp.

References gt, nl, NPOS, and result.

Referenced by GetActiveDefline(), GetActiveSequence(), GetRawDefline(), and GetRawSequence().

◆ HasSeqEntry()

bool CFastaIOWrapper::HasSeqEntry ( ) const
inline

Definition at line 82 of file cuReadFastaWrapper.hpp.

Referenced by CSeqAnnotFromFasta::MakeSeqAnnotFromFasta().

◆ IsUseBioseqSet()

bool CFastaIOWrapper::IsUseBioseqSet ( ) const
inline

Definition at line 107 of file cuReadFastaWrapper.hpp.

◆ ReadFile()

virtual bool CFastaIOWrapper::ReadFile ( CNcbiIstream iStream)
pure virtual

◆ ResetActiveFasta()

void CFastaIOWrapper::ResetActiveFasta ( )
inline

Definition at line 98 of file cuReadFastaWrapper.hpp.

◆ SetUseBioseqSet()

void CFastaIOWrapper::SetUseBioseqSet ( bool  useBioseqSet)
inline

Definition at line 108 of file cuReadFastaWrapper.hpp.

◆ Write()

virtual bool CFastaIOWrapper::Write ( CNcbiOstream ostream)
inlinevirtual

Definition at line 67 of file cuReadFastaWrapper.hpp.

Member Data Documentation

◆ gt

const char CFastaIOWrapper::gt = '>'
staticprotected

Definition at line 51 of file cuReadFastaWrapper.hpp.

Referenced by GetSubstring().

◆ m_activeFastaString

string CFastaIOWrapper::m_activeFastaString
protected

◆ m_cacheRawFasta

bool CFastaIOWrapper::m_cacheRawFasta
protected

◆ m_error

string CFastaIOWrapper::m_error
protected

Definition at line 116 of file cuReadFastaWrapper.hpp.

Referenced by CBasicFastaWrapper::ReadFile().

◆ m_rawFastaString

string CFastaIOWrapper::m_rawFastaString
protected

◆ m_seqEntry

CRef< CSeq_entry > CFastaIOWrapper::m_seqEntry
protected

◆ m_useBioseqSet

bool CFastaIOWrapper::m_useBioseqSet
protected

Definition at line 118 of file cuReadFastaWrapper.hpp.

Referenced by CBasicFastaWrapper::ReadFile().

◆ nl

const char CFastaIOWrapper::nl = '\n'
staticprotected

Definition at line 52 of file cuReadFastaWrapper.hpp.

Referenced by GetSubstring().


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