NCBI C++ ToolKit
Namespaces | Macros | Functions
utilfun.h File Reference
#include <objects/general/Date_std.hpp>
#include <objects/seqblock/GB_block.hpp>
#include <objmgr/scope.hpp>
#include <objmgr/object_manager.hpp>
#include "ftablock.h"
#include "entry.h"
+ Include dependency graph for utilfun.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.




#define Unknown   0
#define ParFlat_UNKW   999


CRef< objects::CDate_std > get_full_date (const Char *s, bool is_ref, Parser::ESource source)
TokenStatBlkTokenString (const char *str, Char delimiter)
void FreeTokenstatblk (TokenStatBlk *tsbp)
void FreeTokenblk (TokenBlk *tbp)
bool ParseAccessionRange (TokenStatBlk *tsbp, unsigned skip)
bool ParseAccessionRange (list< string > &tokens, unsigned skip)
void UnwrapAccessionRange (const objects::CGB_block::TExtra_accessions &extra_accs, objects::CGB_block::TExtra_accessions &hist)
Int2 fta_StringMatch (const Char **array, const Char *text)
Int2 StringMatchIcase (const Char **array, const Char *text)
char * StringIStr (const Char *where, const Char *what)
Int2 MatchArrayString (const Char **array, const Char *text)
Int2 MatchArrayIString (const Char **array, const Char *text)
Int2 MatchArraySubString (const Char **array, const Char *text)
Int2 MatchArrayISubString (const Char **array, const Char *text)
string GetBlkDataReplaceNewLine (string_view, Int2 indent)
void CleanTailNoneAlphaChar (char *str)
void CleanTailNoneAlphaCharInString (std::string &str)
char * PointToNextToken (char *ptr)
char * GetTheCurrentToken (char **ptr)
char * SrchTheChar (char *bptr, char *eptr, Char letter)
char * SrchTheStr (char *bptr, char *eptr, const char *str)
void CpSeqId (InfoBioseq *ibp, const objects::CSeq_id &id)
int SrchKeyword (const CTempString &ptr, const vector< string > &keywordList)
bool CheckLineType (char *ptr, Int4 line, const vector< string > &keywordList, bool after_origin)
char * SrchNodeType (DataBlk *entry, Int4 type, size_t *len)
char * xSrchNodeType (const DataBlk &entry, Int4 type, size_t *len)
string xGetNodeData (const DataBlk &entry, int nodeType)
DataBlkTrackNodeType (const DataBlk &entry, Int2 type)
const SectionxTrackNodeType (const Entry &, int type)
ValNodeConstructValNode (objects::CSeq_id::E_Choice choice, const char *data)
bool fta_is_tpa_keyword (const char *str)
bool fta_tpa_keywords_check (const TKeywordList &kwds)
bool fta_is_tsa_keyword (const char *str)
bool fta_is_tls_keyword (const char *str)
bool fta_tsa_keywords_check (const TKeywordList &kwds, Parser::ESource source)
bool fta_tls_keywords_check (const TKeywordList &kwds, Parser::ESource source)
bool fta_check_mga_keywords (objects::CMolInfo &mol_info, const TKeywordList &kwds)
void fta_StringCpy (char *dst, const char *src)
void fta_keywords_check (const char *str, bool *estk, bool *stsk, bool *gssk, bool *htck, bool *flik, bool *wgsk, bool *tpak, bool *envk, bool *mgak, bool *tsak, bool *tlsk)
void fta_remove_keywords (int tech, TKeywordList &kwds)
void fta_remove_tpa_keywords (TKeywordList &kwds)
void fta_remove_tsa_keywords (TKeywordList &kwds, Parser::ESource source)
void fta_remove_tls_keywords (TKeywordList &kwds, Parser::ESource source)
void fta_remove_env_keywords (TKeywordList &kwds)
void fta_remove_mag_keywords (TKeywordList &kwds)
bool IsCancelled (const TKeywordList &keywords)
bool HasHtg (const TKeywordList &keywords)
void RemoveHtgPhase (TKeywordList &keywords)
bool HasHtc (const TKeywordList &keywords)
bool SetTextId (Uint1 seqtype, objects::CSeq_id &seqId, objects::CTextseq_id &textId)
void check_est_sts_gss_tpa_kwds (ValNodePtr kwds, size_t len, IndexblkPtr entry, bool tpa_check, bool &specialist_db, bool &inferential, bool &experimental, bool &assembly)
void xCheckEstStsGssTpaKeywords (const std::list< std::string > keywordList, bool tpa_check, IndexblkPtr entry)
objects::CScope & GetScope ()

Macro Definition Documentation

◆ ParFlat_UNKW

#define ParFlat_UNKW   999

Definition at line 44 of file utilfun.h.

◆ Unknown

#define Unknown   0

Function Documentation

◆ check_est_sts_gss_tpa_kwds()

void check_est_sts_gss_tpa_kwds ( ValNodePtr  kwds,
size_t  len,
IndexblkPtr  entry,
bool  tpa_check,
bool specialist_db,
bool inferential,
bool experimental,
bool assembly 

◆ CheckLineType()

bool CheckLineType ( char *  ptr,
Int4  line,
const vector< string > &  keywordList,
bool  after_origin 

Definition at line 999 of file utilfun.cpp.

References ERR_ENTRY_InvalidLineType, ErrPostEx, i, SEV_ERROR, StringChr, StringEquN(), and StringNCpy().

Referenced by EmblIndex(), and GenBankIndex().

◆ CleanTailNoneAlphaChar()

void CleanTailNoneAlphaChar ( char *  str)

◆ CleanTailNoneAlphaCharInString()

void CleanTailNoneAlphaCharInString ( std::string str)

◆ ConstructValNode()

ValNode* ConstructValNode ( objects::CSeq_id::E_Choice  choice,
const char *  data 

◆ CpSeqId()

void CpSeqId ( InfoBioseq ibp,
const objects::CSeq_id &  id 

◆ FreeTokenblk()

void FreeTokenblk ( TokenBlk tbp)

◆ FreeTokenstatblk()

void FreeTokenstatblk ( TokenStatBlk tsbp)

◆ fta_check_mga_keywords()

bool fta_check_mga_keywords ( objects::CMolInfo &  mol_info,
const TKeywordList kwds 

◆ fta_is_tls_keyword()

bool fta_is_tls_keyword ( const char *  str)

Definition at line 1276 of file utilfun.cpp.

References MatchArrayIString(), ParFlat_TLS_kw_array, and str().

◆ fta_is_tpa_keyword()

bool fta_is_tpa_keyword ( const char *  str)

Definition at line 1259 of file utilfun.cpp.

References MatchArrayIString(), ParFlat_TPA_kw_array, and str().

Referenced by fta_fix_tpa_keywords().

◆ fta_is_tsa_keyword()

bool fta_is_tsa_keyword ( const char *  str)

Definition at line 1268 of file utilfun.cpp.

References MatchArrayIString(), ParFlat_TSA_kw_array, and str().

◆ fta_keywords_check()

void fta_keywords_check ( const char *  str,
bool estk,
bool stsk,
bool gssk,
bool htck,
bool flik,
bool wgsk,
bool tpak,
bool envk,
bool mgak,
bool tsak,
bool tlsk 

◆ fta_remove_env_keywords()

void fta_remove_env_keywords ( TKeywordList kwds)

◆ fta_remove_keywords()

void fta_remove_keywords ( int  tech,
TKeywordList kwds 

◆ fta_remove_mag_keywords()

void fta_remove_mag_keywords ( TKeywordList kwds)

◆ fta_remove_tls_keywords()

void fta_remove_tls_keywords ( TKeywordList kwds,
Parser::ESource  source 

◆ fta_remove_tpa_keywords()

void fta_remove_tpa_keywords ( TKeywordList kwds)

◆ fta_remove_tsa_keywords()

void fta_remove_tsa_keywords ( TKeywordList kwds,
Parser::ESource  source 

◆ fta_StringCpy()

void fta_StringCpy ( char *  dst,
const char *  src 

◆ fta_StringMatch()

Int2 fta_StringMatch ( const Char **  array,
const Char text 

◆ fta_tls_keywords_check()

bool fta_tls_keywords_check ( const TKeywordList kwds,
Parser::ESource  source 

◆ fta_tpa_keywords_check()

bool fta_tpa_keywords_check ( const TKeywordList kwds)

◆ fta_tsa_keywords_check()

bool fta_tsa_keywords_check ( const TKeywordList kwds,
Parser::ESource  source 

◆ get_full_date()

CRef<objects::CDate_std> get_full_date ( const Char s,
bool  is_ref,
Parser::ESource  source 

◆ GetBlkDataReplaceNewLine()

string GetBlkDataReplaceNewLine ( string_view  instr,
Int2  indent 

◆ GetScope()

objects::CScope& GetScope ( )

Definition at line 70 of file unit_test_seq_loc_cmp.cpp.

References CScope::AddDefaults(), CScope::AddTopLevelSeqEntry(), CObjectManager::GetInstance(), MSerial_AsnText, CGBDataLoader::RegisterInObjectManager(), CRef< C, Locker >::Reset(), and sc_TestEntry.

Referenced by CGBDocument::AddItems(), CGBDocument::AttachDataLoader(), CGBDocument::AttachProjectItems(), BOOST_AUTO_TEST_CASE(), CFlatFileParser::CFlatFileParser(), check_end_internal(), CkEndStop(), CGBDocument::CreateProjectScope(), DealWithGenes(), CGBDocument::DetachDataLoader(), CEditingBtnsPanel::EditSequence(), CSequenceEditingEventHandler::EditSequence(), EmblAscii(), EndAdded(), FinalCleanup(), FindCitInFeats(), fta_add_hist(), fta_get_gi_for_seq_id(), fta_parse_buf(), GenBankAscii(), GenBankAsciiOrig(), GetProtRefDescr(), CMiscSeqTableColumn::GetRelatedApplyObjects(), GetTrnaAnticodon(), InitAlnStats(), CAlnTestApp::LoadInputAlns(), CAlnBuildApp::LoadInputAlns(), CDiscrepancyPanel::OnSegregate(), CDiscrepancyPanel::OnSequester(), OutputEmblAsn(), PackSeqPntCheckCpp(), CAlnBuildApp::PrintAnchoredAln(), ProcNucProt(), CGBDocument::ReplaceGiSeqIds(), CAlnTestApp::Run(), s_CloneBlastQueryVector(), SeqIntCheckCpp(), SeqPntCheckCpp(), sParseFlatfile(), SpPrepareEntry(), Translate(), CGBDocument::x_AttachProjectItems(), CGBDocument::x_DetachProjectItems(), CDBSourceItem::x_FormatDBSourceID(), CAlnSpanVertModel::x_Init(), CBuffer_DataLoader::x_LoadData(), CSeqGraphicWidget::x_SaveVectorImage(), CSeqGraphicWidget::x_UpdateMarkerInfo(), and XMLAscii().

◆ GetTheCurrentToken()

char* GetTheCurrentToken ( char **  ptr)

Definition at line 815 of file utilfun.cpp.

References CleanTailNoneAlphaChar(), str(), and StringSave.

Referenced by ParseRLDataSP().

◆ HasHtc()

bool HasHtc ( const TKeywordList keywords)

◆ HasHtg()

bool HasHtg ( const TKeywordList keywords)

◆ IsCancelled()

bool IsCancelled ( const TKeywordList keywords)

◆ MatchArrayIString()

Int2 MatchArrayIString ( const Char **  array,
const Char text 

◆ MatchArrayISubString()

Int2 MatchArrayISubString ( const Char **  array,
const Char text 

Definition at line 706 of file utilfun.cpp.

References NStr::FindNoCase(), i, NPOS, and text().

◆ MatchArrayString()

Int2 MatchArrayString ( const Char **  array,
const Char text 

◆ MatchArraySubString()

Int2 MatchArraySubString ( const Char **  array,
const Char text 

Definition at line 656 of file utilfun.cpp.

References NStr::Find(), i, NPOS, and text().

Referenced by CkDateFormat().

◆ ParseAccessionRange() [1/2]

bool ParseAccessionRange ( list< string > &  tokens,
unsigned  skip 

◆ ParseAccessionRange() [2/2]

bool ParseAccessionRange ( TokenStatBlk tsbp,
unsigned  skip 

◆ PointToNextToken()

char* PointToNextToken ( char *  ptr)

◆ RemoveHtgPhase()

void RemoveHtgPhase ( TKeywordList keywords)

◆ SetTextId()

bool SetTextId ( Uint1  seqtype,
objects::CSeq_id &  seqId,
objects::CTextseq_id &  textId 

◆ SrchKeyword()

int SrchKeyword ( const CTempString ptr,
const vector< string > &  keywordList 

Definition at line 986 of file utilfun.cpp.

References i, ParFlat_UNKW, and NStr::StartsWith().

Referenced by GenBankIndex(), GetEmblBlock(), GetGenBankBlock(), and xGetGenBankBlocks().

◆ SrchNodeType()

char* SrchNodeType ( DataBlk entry,
Int4  type,
size_t *  len 

◆ SrchTheChar()

char* SrchTheChar ( char *  bptr,
char *  eptr,
Char  letter 

◆ SrchTheStr()

char* SrchTheStr ( char *  bptr,
char *  eptr,
const char *  str 

Definition at line 867 of file utilfun.cpp.

References StringStr.

Referenced by GetEmblRefType(), and GetReleaseInfo().

◆ StringIStr()

char* StringIStr ( const Char where,
const Char what 

◆ StringMatchIcase()

Int2 StringMatchIcase ( const Char **  array,
const Char text 

◆ TokenString()

TokenStatBlk* TokenString ( const char *  str,
Char  delimiter 

◆ TrackNodeType()

DataBlk* TrackNodeType ( const DataBlk entry,
Int2  type 

◆ UnwrapAccessionRange()

void UnwrapAccessionRange ( const objects::CGB_block::TExtra_accessions &  extra_accs,
objects::CGB_block::TExtra_accessions &  hist 

◆ xCheckEstStsGssTpaKeywords()

void xCheckEstStsGssTpaKeywords ( const std::list< std::string keywordList,
bool  tpa_check,
IndexblkPtr  entry 

◆ xGetNodeData()

string xGetNodeData ( const DataBlk entry,
int  nodeType 

Definition at line 1066 of file utilfun.cpp.

References string, tmp, and TrackNodeType().

Referenced by GetSequenceOfKeywords().

◆ xSrchNodeType()

char* xSrchNodeType ( const DataBlk entry,
Int4  type,
size_t *  len 

◆ xTrackNodeType()

const Section* xTrackNodeType ( const Entry entry,
int  type 

Definition at line 1097 of file utilfun.cpp.

References Entry::mSections, and Section::mType.

Modified on Sat Apr 13 11:50:24 2024 by rev. 669887