NCBI C++ ToolKit
|
#include <corelib/ncbistd.hpp>
Go to the source code of this file.
Go to the SVN repository for this file.
Classes | |
struct | SDeltaSeqSummary |
struct | SModelEvidance |
Enumerations | |
enum | ETildeStyle { eTilde_tilde , eTilde_space , eTilde_newline , eTilde_comment , eTilde_note } |
enum | EAccValFlag { eValidateAcc , eValidateAccDotVer } |
enum | EDateToString { eDateToString_regular = 1 , eDateToString_cit_sub , eDateToString_patent } |
enum | EResolveOrder { eResolve_NotFound , eResolve_RnaFirst , eResolve_ProtFirst } |
Variables | |
const char * | strLinkBaseNuc |
const char * | strLinkBaseProt |
const char * | strLinkBaseEntrezViewer |
const char * | strLinkBaseTaxonomy |
const char * | strLinkBaseTransTable |
const char * | strLinkBasePubmed |
const char * | strLinkBaseExpasy |
const char * | strLinkBaseNucSearch |
const char * | strLinkBaseGenomePrj |
const char * | strLinkBaseLatLon |
const char * | strLinkBaseGeneOntology |
const char * | strLinkBaseGeneOntologyRef |
const char * | strLinkBaseUSPTO |
const char * | strLinkBaseUniProt |
const char * | strDocLink |
enum EAccValFlag |
Enumerator | |
---|---|
eValidateAcc | |
eValidateAccDotVer |
Definition at line 94 of file objutil.hpp.
enum EDateToString |
Enumerator | |
---|---|
eDateToString_regular | |
eDateToString_cit_sub | |
eDateToString_patent |
Definition at line 103 of file objutil.hpp.
enum EResolveOrder |
Enumerator | |
---|---|
eResolve_NotFound | |
eResolve_RnaFirst | |
eResolve_ProtFirst |
Definition at line 159 of file objutil.hpp.
enum ETildeStyle |
Enumerator | |
---|---|
eTilde_tilde | |
eTilde_space | |
eTilde_newline | |
eTilde_comment | |
eTilde_note |
Definition at line 47 of file objutil.hpp.
void AddPeriod | ( | string & | str | ) |
Definition at line 377 of file objutil.cpp.
References str().
Referenced by CCommentItem::AddPeriod(), CFlatOrgModQVal::Format(), CFlatSubSourceQVal::Format(), CCommentItem::GetStringForHTGS(), CCommentItem::GetStringForUnordered(), s_NoteFinalize(), CCommentItem::x_GatherDescInfo(), CDeflineItem::x_GatherInfo(), CReferenceItem::x_GatherRemark(), CFlatGatherer::x_GBBSourceComment(), CFlatGatherer::x_HTGSComments(), CCommentItem::x_SetCommentWithURLlinks(), and CSourceItem::x_SetSource().
void CleanAndCompress | ( | string & | dest, |
const CTempString & | instr | ||
) |
Definition at line 823 of file objutil.cpp.
References bracket_space, comma_space, CTempString::data(), in(), next(), out(), semicolon_space, CTempString::size(), space_bracket, space_comma, space_semicolon, twocommas, twosemicolons, and twospaces.
Referenced by CFlatStringQVal::CFlatStringQVal(), CFormatQual::CFormatQual(), CFlatOrgModQVal::Format(), CFlatSubSourceQVal::Format(), CReferenceItem::FormatAffil(), s_FormatPatent(), s_GetGOText(), CGenbankFormatter::x_Authors(), CDeflineItem::x_GatherInfo(), and CFlatItemFormatter::x_GetKeywords().
Definition at line 1879 of file objutil.cpp.
References ArraySize(), and str().
Referenced by CReferenceItem::x_GatherRemark(), and CFeatureItem::x_ImportQuals().
string& CompressSpaces | ( | string & | str, |
const bool | trim_beginning = true , |
||
const bool | trim_end = true |
||
) |
Definition at line 416 of file objutil.cpp.
Definition at line 246 of file objutil.cpp.
References ConvertQuotes(), and str().
void ConvertQuotes | ( | string & | str | ) |
Definition at line 240 of file objutil.cpp.
References str().
Referenced by ConvertQuotes(), CFlatSubSourceQVal::Format(), CReferenceItem::FormatAffil(), CCommentItem::GetStringForHTGS(), CCommentItem::GetStringForUnordered(), s_FormatThesis(), s_ParseParentQual(), CFeatureItem::x_AddQualSeqfeatNote(), CReferenceItem::x_CleanData(), CCommentItem::x_GatherDescInfo(), CDeflineItem::x_GatherInfo(), and CCommentItem::x_SetCommentWithURLlinks().
Definition at line 1774 of file objutil.cpp.
References str().
Referenced by CFlatStringQVal::Format(), CFlatOrgModQVal::Format(), CReferenceItem::x_CleanData(), and CDBSourceItem::x_GatherInfo().
void DateToString | ( | const CDate & | date, |
string & | str, | ||
EDateToString | format_choice = eDateToString_regular |
||
) |
Definition at line 1238 of file objutil.cpp.
References eDateToString_cit_sub, eDateToString_patent, format, CDate::GetDate(), str(), and NStr::ToUpper().
Referenced by CEmblFormatter::FormatDate(), s_FormatCitSub(), s_FormatPatent(), s_GetDate(), CDBSourceItem::x_AddPDBBlock(), and CLocusItem::x_SetDate().
void ExpandTildes | ( | string & | s, |
ETildeStyle | style | ||
) |
Definition at line 152 of file objutil.cpp.
References eTilde_comment, eTilde_newline, eTilde_note, eTilde_space, eTilde_tilde, isdigit(), IsPartOfUrl(), next(), NPOS, result, and s_RunOfStars().
Referenced by CCommentItem::CCommentItem(), CFlatStringQVal::Format(), CFlatOrgModQVal::Format(), CFlatSubSourceQVal::Format(), s_GetStrForStructuredComment(), s_NoteFinalize(), s_ParseParentQual(), CReferenceItem::x_CleanData(), CFlatItemFormatter::x_GetKeywords(), CCommentItem::x_SetComment(), and CCommentItem::x_SetCommentWithURLlinks().
Definition at line 1559 of file objutil.cpp.
References CSeq_data_Base::e_Ncbieaa, CSeq_data_Base::e_Ncbistdaa, CSeqportUtil::GetMapToIndex(), and kAANames.
Referenced by CFlatCodeBreakQVal::Format(), CFeatureItem::x_AddFTableAnticodon(), CFeatureItem::x_AddFTableCdregionQuals(), and CRNAValidator::x_ValidateTrnaCodons().
void GetDeltaSeqSummary | ( | const CBioseq_Handle & | seq, |
SDeltaSeqSummary & | summary | ||
) |
Definition at line 1257 of file objutil.cpp.
References CSeq_literal_Base::CanGetFuzz(), CSeq_literal_Base::CanGetLength(), CSeq_literal_Base::CanGetSeq_data(), CSeq_data_Base::e_Gap, CDelta_seq_Base::e_Literal, CDelta_seq_Base::e_Loc, CInt_fuzz_Base::eLim_unk, CSeq_inst_Base::eRepr_delta, CDelta_ext_Base::Get(), CSeq_ext_Base::GetDelta(), CSeq_literal_Base::GetFuzz(), CBioseq_Handle::GetInst_Ext(), CBioseq_Handle::GetInst_Repr(), GetLength(), CSeq_literal_Base::GetLength(), CInt_fuzz_Base::GetLim(), CBioseq_Handle::GetScope(), CSeq_literal_Base::GetSeq_data(), CSeq_ext_Base::IsDelta(), CInt_fuzz_Base::IsLim(), CSeq_loc_Base::IsNull(), CBioseq_Handle::IsSetInst(), CBioseq_Handle::IsSetInst_Ext(), CBioseq_Handle::IsSetInst_Repr(), len, next(), SDeltaSeqSummary::num_faked_gaps, SDeltaSeqSummary::num_gaps, SDeltaSeqSummary::num_segs, SDeltaSeqSummary::residues, SDeltaSeqSummary::text, text(), unk, and CSeq_data_Base::Which().
Referenced by CCommentItem::GetStringForHTGS(), and CCommentItem::GetStringForUnordered().
bool GetModelEvidance | ( | const CBioseq_Handle & | bsh, |
SModelEvidance & | me | ||
) |
Definition at line 1534 of file objutil.cpp.
References CBioseq_Handle::GetInst_Mol(), GetNucleotideParent(), CSeq_inst::IsAa(), nuc, and s_GetModelEvidance().
Referenced by CFlatGatherer::x_IdComments().
EResolveOrder GetResolveOrder | ( | CScope & | scope, |
const CSeq_id_Handle & | mrna, | ||
const CSeq_id_Handle & | prot, | ||
CBioseq_Handle & | mrna_bsh, | ||
CBioseq_Handle & | prot_bsh | ||
) |
Definition at line 1571 of file objutil.cpp.
References CScope::AddDefaults(), eResolve_NotFound, eResolve_ProtFirst, eResolve_RnaFirst, CScope::GetBioseqHandle(), CSeq_entry_Handle::GetBioseqHandle(), CObjectManager::GetInstance(), CBioseq_Handle::GetTopLevelEntry(), and prot.
Referenced by CFlatGatherer::x_GatherFeaturesOnRange(), CFlatGatherer::x_GatherFeaturesOnRangeIdx(), and CFlatGatherer::x_GatherFeaturesOnWholeLocation().
Definition at line 1364 of file objutil.cpp.
References CMolInfo_Base::eTech_both, CMolInfo_Base::eTech_concept_trans, CMolInfo_Base::eTech_concept_trans_a, CMolInfo_Base::eTech_seq_pept, CMolInfo_Base::eTech_seq_pept_homol, CMolInfo_Base::eTech_seq_pept_overlap, and kEmptyStr.
Referenced by CCommentItem::GetStringForHTGS(), CFeatureItem::x_AddQualProtMethod(), and CFlatGatherer::x_HTGSComments().
bool IsValidAccession | ( | const string & | accn, |
EAccValFlag | flag = eValidateAcc |
||
) |
Definition at line 1227 of file objutil.cpp.
References CSeq_id::eAcc_unknown, eValidateAccDotVer, CSeq_id::IdentifyAccession(), and s_IsValidDotVersion().
Referenced by s_CheckQuals_cdregion(), s_GetAssemblyInfo(), CFeatureItem::x_AddQualProteinId(), CFeatureItem::x_AddQualsRna(), CAccessionItem::x_GatherInfo(), and CFeatureItem::x_ImportQuals().
Definition at line 1083 of file objutil.cpp.
References JoinString(), kEmptyStr, and result.
void JoinString | ( | string & | to, |
const string & | prefix, | ||
const string & | str, | ||
bool | noRedundancy = true |
||
) |
Definition at line 1050 of file objutil.cpp.
References NStr::EndsWith(), NStr::Find(), NPOS, prefix, s_IsWholeWord(), NStr::StartsWith(), and str().
Referenced by CFlatStringListQVal::Format(), JoinString(), and s_QualVectorToNote().
void NcbiId | ( | CNcbiOstream & | os, |
const T & | id, | ||
bool | html = false |
||
) |
Definition at line 200 of file objutil.hpp.
References strLinkBaseNuc.
Referenced by s_CreateHistCommentString().
Definition at line 299 of file objutil.cpp.
Referenced by CFlatOrgModQVal::Format(), CFlatSubSourceQVal::Format(), CFeatureItem::x_AddQualProtComment(), CFeatureItem::x_AddQualProtDesc(), CFeatureItem::x_AddQualProtNote(), CFeatureItem::x_AddQualSeqfeatNote(), CFeatureItem::x_AddQualsGene(), CFeatureItem::x_AddQualsProt(), and CFeatureItem::x_AddQualsRegion().
Definition at line 256 of file objutil.cpp.
References NStr::ReplaceInPlace(), and str().
Referenced by CCitGenCleaner::Clean(), CReferenceItem::x_CleanData(), CFlatItemFormatter::x_FormatRefJournal(), and CNewCleanup_imp::x_StripSpacesMarkChanged().
void TrimSpaces | ( | string & | str, |
size_t | indent = 0 |
||
) |
Definition at line 385 of file objutil.cpp.
References indent(), isspace(), and str().
Referenced by CFlatItemFormatter::Wrap().
void TrimSpacesAndJunkFromEnds | ( | string & | result, |
const CTempString & | str, | ||
bool | allow_ellipsis = false |
||
) |
Definition at line 475 of file objutil.cpp.
References _ASSERT, int, isalnum(), str(), and suffix.
Referenced by CCommentItem::CCommentItem(), CFlatXrefQVal::Format(), s_FormatJournal(), s_NoteFinalize(), CFeatureItem::x_AddQualProtComment(), CFeatureItem::x_AddQualProtDesc(), CFeatureItem::x_AddQualProtNote(), CFeatureItem::x_AddQualSeqfeatNote(), CFeatureItem::x_AddQualsProt(), CCommentItem::x_GatherDescInfo(), and CGenbankFormatter::x_SmartWrapQuals().
void TryToSanitizeHtml | ( | std::string & | result, |
const CTempString & | str | ||
) |
Definition at line 1815 of file objutil.cpp.
void TryToSanitizeHtml | ( | std::string & | str | ) |
Referenced by CGenbankFormatter::FormatAccession(), CGenbankFormatter::FormatComment(), CGenbankFormatter::FormatDBSource(), CGenbankFormatter::FormatDefline(), CGenbankFormatter::FormatGenomeProject(), CGenbankFormatter::FormatLocus(), CGenbankFormatter::FormatOrigin(), CGenbankFormatter::FormatPrimary(), CHTMLFormatterEx::FormatTaxid(), CGenbankFormatter::FormatTSA(), CGenbankFormatter::FormatVersion(), CGenbankFormatter::FormatWGS(), CGenbankFormatter::x_Authors(), CGenbankFormatter::x_Consortium(), CGenbankFormatter::x_FormatOrganismLine(), CGenbankFormatter::x_FormatSourceLine(), CGenomeProjectItem::x_GatherInfo(), CGenbankFormatter::x_Journal(), CGenbankFormatter::x_Reference(), CGenbankFormatter::x_Remark(), CGenbankFormatter::x_SmartWrapQuals(), and CGenbankFormatter::x_Title().
void TryToSanitizeHtmlList | ( | std::list< std::string > & | strs | ) |
Definition at line 1871 of file objutil.cpp.
References NON_CONST_ITERATE, and TryToSanitizeHtml().
Referenced by CGenbankFormatter::FormatDBSource(), CGenbankFormatter::FormatKeywords(), and CGenbankFormatter::FormatReference().
|
extern |
Definition at line 1667 of file objutil.cpp.
Referenced by CCommentItem::GetStringForRefTrack(), and CGenomeAnnotComment::x_GatherInfo().
|
extern |
Definition at line 1641 of file objutil.cpp.
Referenced by CFlatSeqLoc::x_AddID().
|
extern |
Definition at line 1650 of file objutil.cpp.
Referenced by CFlatStringQVal::Format().
|
extern |
Definition at line 1658 of file objutil.cpp.
Referenced by s_GetGOText().
|
extern |
Definition at line 1660 of file objutil.cpp.
Referenced by s_GetGOText().
|
extern |
Definition at line 1654 of file objutil.cpp.
Referenced by CGenbankFormatter::FormatGenomeProject().
|
extern |
Definition at line 1656 of file objutil.cpp.
|
extern |
Definition at line 1636 of file objutil.cpp.
Referenced by CGenbankFormatter::FormatAccession(), and NcbiId().
|
extern |
Definition at line 1652 of file objutil.cpp.
|
extern |
Definition at line 1638 of file objutil.cpp.
Referenced by CGenbankFormatter::FormatAccession().
|
extern |
Definition at line 1648 of file objutil.cpp.
Referenced by CFlatPubSetQVal::Format(), s_GetGOText(), s_HTMLizeExperimentQual(), and CGenbankFormatter::x_Medline().
|
extern |
Definition at line 1644 of file objutil.cpp.
|
extern |
Definition at line 1646 of file objutil.cpp.
Referenced by CFlatIntQVal::Format().
|
extern |
Definition at line 1664 of file objutil.cpp.
Referenced by CHTMLFormatterEx::FormatUniProtId().
|
extern |
Definition at line 1662 of file objutil.cpp.
Referenced by s_FormatPatent().