A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/classCSeqDB__Substring.html below:

NCBI C++ ToolKit: CSeqDB_Substring Class Reference

Search Toolkit Book for CSeqDB_Substring

String slicing. More...

#include <objtools/blast/seqdb_reader/impl/seqdbgeneral.hpp>

String slicing.

This class describes part of an existing (C++ or C) string as a memory range, and provides a limited set of read-only string operations over it. In the common case where parts of several string are found and spliced together, this class represents the temporary sub-strings. It does not deal with ownership or lifetime issues, so it should not be stored in a structure that will outlast the original string. It never allocates and never frees. In writing this, I only implemented the features that are used somewhere in SeqDB; adding new features is fairly trivial.

Definition at line 253 of file seqdbgeneral.hpp.

◆ CSeqDB_Substring() [1/4] CSeqDB_Substring::CSeqDB_Substring ( ) inline ◆ CSeqDB_Substring() [2/4] CSeqDB_Substring::CSeqDB_Substring ( const char *  s ) inlineexplicit

Construct a substring for a string literal.

Parameters
s A null terminated string literal.

Definition at line 263 of file seqdbgeneral.hpp.

References m_End.

◆ CSeqDB_Substring() [3/4] CSeqDB_Substring::CSeqDB_Substring ( const strings ) inlineexplicit

Construct a substring for a C++ std::string.

Parameters
s An existing std::string object.

Definition at line 271 of file seqdbgeneral.hpp.

◆ CSeqDB_Substring() [4/4] CSeqDB_Substring::CSeqDB_Substring ( const char *  b, const char *  e  ) inline

Construct a substring for a range of memory.

Parameters
b Start of the range of memory. e End of the memory range.

Definition at line 279 of file seqdbgeneral.hpp.

◆ Clear() void CSeqDB_Substring::Clear ( void  ) inline ◆ Empty() bool CSeqDB_Substring::Empty ( void  ) const inline ◆ EraseBack() void CSeqDB_Substring::EraseBack ( int  n ) inline

Disinclude data from the end of the string.

Unlike std::string versions of this type of functionality, this version works in constant time without reallocating or copying data. Removing more bytes than the string contains empties the substring, and is not an error.

Parameters
n The number of characters to remove.

Definition at line 345 of file seqdbgeneral.hpp.

References m_Begin, m_End, and n.

◆ EraseFront() void CSeqDB_Substring::EraseFront ( int  n ) inline

Disinclude data from the beginning of the string.

Unlike std::string versions of this type of functionality, this version works in constant time without reallocating or copying data. Removing more bytes than the string contains empties the substring, and is not an error.

Parameters
n The number of characters to remove.

Definition at line 328 of file seqdbgeneral.hpp.

References m_Begin, m_End, and n.

Referenced by SeqDB_RemoveDirName(), and CSeqDBAliasNode::x_ResolveNames().

◆ FindLastOf() int CSeqDB_Substring::FindLastOf ( char  ch ) const inline ◆ GetBegin() const char* CSeqDB_Substring::GetBegin ( void  ) const inline ◆ GetEnd() const char* CSeqDB_Substring::GetEnd ( void  ) const inline ◆ GetString() void CSeqDB_Substring::GetString ( strings ) const inline

Return the data by assigning it to a string.

Parameters
s The substring data is returned here.

Definition at line 286 of file seqdbgeneral.hpp.

References m_Begin, and m_End.

Referenced by CBlastDBAliasApp::CreateAliasFile(), CSeqDB_BasePath::CSeqDB_BasePath(), CSeqDBLMDBSet::CSeqDBLMDBSet(), CWriteDB_CreateOidMaskDB(), CSeqDBLMDB::GetDBTaxIds(), CSeqDBLMDB::GetOid(), CSeqDBLMDB::GetOids(), CSeqDBLMDB::GetOidsForTaxIds(), CSeqDBTaxInfo::GetTaxNames(), SeqDB_CombinePath(), SeqDB_CompareVolume(), WriteBlastSeqidlistFile(), CBlastDBAliasApp::x_ConvertSeqIDFile(), CMakeProfileDBApp::x_CreateAliasFile(), CSeqDBAliasNode::x_ExpandAliases(), and CSeqDBAliasNode::x_ResolveNames().

◆ GetStringQuick() void CSeqDB_Substring::GetStringQuick ( strings ) const inline ◆ operator==() ◆ operator[]() const char& CSeqDB_Substring::operator[] ( int  n ) const inline ◆ Resize() void CSeqDB_Substring::Resize ( int  n ) inline

Change the length of the string.

The substring will be increased or reduced. Normally this is used to reduce the string length; increasing it is legal, but requires the calling code to understand more about the "real" underlying data in order to be useful. Note that newly added bytes are not zeroed out by this method.

Parameters
n The number of characters to remove.

Definition at line 363 of file seqdbgeneral.hpp.

References m_Begin, m_End, and n.

Referenced by SeqDB_RemoveExtn(), and SeqDB_RemoveFileName().

◆ Size() int CSeqDB_Substring::Size ( void  ) const inline ◆ m_Begin const char* CSeqDB_Substring::m_Begin private

Points to the beginning of the string's data or null.

Definition at line 419 of file seqdbgeneral.hpp.

Referenced by Clear(), Empty(), EraseBack(), EraseFront(), FindLastOf(), GetBegin(), GetString(), GetStringQuick(), operator==(), operator[](), Resize(), and Size().

◆ m_End const char* CSeqDB_Substring::m_End private

Points to the end of the string (post notation) or null.

Definition at line 422 of file seqdbgeneral.hpp.

Referenced by Clear(), CSeqDB_Substring(), Empty(), EraseBack(), EraseFront(), FindLastOf(), GetEnd(), GetString(), GetStringQuick(), Resize(), and Size().

The documentation for this class was generated from the following file:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4