NCBI C++ ToolKit
Classes | Enumerations | Functions | Variables
objutil.hpp File Reference
#include <corelib/ncbistd.hpp>
+ Include dependency graph for objutil.hpp:
+ 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.

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 }
 

Functions

void ExpandTildes (string &s, ETildeStyle style)
 
void ConvertQuotes (string &str)
 
string ConvertQuotes (const string &str)
 
void JoinString (string &to, const string &prefix, const string &str, bool noRedundancy=true)
 
string JoinString (const list< string > &l, const string &delim, bool noRedundancy=true)
 
bool StripSpaces (string &str)
 
bool TrimSpacesAndJunkFromEnds (string &str, bool allow_ellipsis=false)
 
void TrimSpacesAndJunkFromEnds (string &result, const CTempString &str, bool allow_ellipsis=false)
 
void TrimSpaces (string &str, size_t indent=0)
 
void CleanAndCompress (string &dest, const CTempString &instr)
 
stringCompressSpaces (string &str, const bool trim_beginning=true, const bool trim_end=true)
 
bool RemovePeriodFromEnd (string &str, bool keep_ellipsis=true)
 
void AddPeriod (string &str)
 
bool IsValidAccession (const string &accn, EAccValFlag flag=eValidateAcc)
 
void DateToString (const CDate &date, string &str, EDateToString format_choice=eDateToString_regular)
 
void GetDeltaSeqSummary (const CBioseq_Handle &seq, SDeltaSeqSummary &summary)
 
const stringGetTechString (int tech)
 
bool GetModelEvidance (const CBioseq_Handle &bsh, SModelEvidance &me)
 
const char * GetAAName (unsigned char aa, bool is_ascii)
 
EResolveOrder GetResolveOrder (CScope &scope, const CSeq_id_Handle &mrna, const CSeq_id_Handle &prot, CBioseq_Handle &mrna_bsh, CBioseq_Handle &prot_bsh)
 
template<typename T >
void NcbiId (CNcbiOstream &os, const T &id, bool html=false)
 
bool ConvertQuotesNotInHTMLTags (string &str)
 
void TryToSanitizeHtml (std::string &str)
 
void TryToSanitizeHtml (std::string &result, const CTempString &str)
 
void TryToSanitizeHtmlList (std::list< std::string > &strs)
 
bool CommentHasSuspiciousHtml (const string &str)
 

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
 

Enumeration Type Documentation

◆ EAccValFlag

Enumerator
eValidateAcc 
eValidateAccDotVer 

Definition at line 94 of file objutil.hpp.

◆ EDateToString

Enumerator
eDateToString_regular 
eDateToString_cit_sub 
eDateToString_patent 

Definition at line 103 of file objutil.hpp.

◆ EResolveOrder

Enumerator
eResolve_NotFound 
eResolve_RnaFirst 
eResolve_ProtFirst 

Definition at line 159 of file objutil.hpp.

◆ ETildeStyle

Enumerator
eTilde_tilde 
eTilde_space 
eTilde_newline 
eTilde_comment 
eTilde_note 

Definition at line 47 of file objutil.hpp.

Function Documentation

◆ AddPeriod()

void AddPeriod ( string str)

◆ CleanAndCompress()

void CleanAndCompress ( string dest,
const CTempString instr 
)

◆ CommentHasSuspiciousHtml()

bool CommentHasSuspiciousHtml ( const string str)

Definition at line 1879 of file objutil.cpp.

References ArraySize(), and str().

Referenced by CReferenceItem::x_GatherRemark(), and CFeatureItem::x_ImportQuals().

◆ CompressSpaces()

string& CompressSpaces ( string str,
const bool  trim_beginning = true,
const bool  trim_end = true 
)

Definition at line 416 of file objutil.cpp.

References isgraph(), and str().

◆ ConvertQuotes() [1/2]

string ConvertQuotes ( const string str)

Definition at line 246 of file objutil.cpp.

References ConvertQuotes(), and str().

◆ ConvertQuotes() [2/2]

void ConvertQuotes ( string str)

◆ ConvertQuotesNotInHTMLTags()

bool ConvertQuotesNotInHTMLTags ( string str)

◆ DateToString()

void DateToString ( const CDate date,
string str,
EDateToString  format_choice = eDateToString_regular 
)

◆ ExpandTildes()

void ExpandTildes ( string s,
ETildeStyle  style 
)

◆ GetAAName()

const char* GetAAName ( unsigned char  aa,
bool  is_ascii 
)

◆ GetDeltaSeqSummary()

void GetDeltaSeqSummary ( const CBioseq_Handle seq,
SDeltaSeqSummary summary 
)

◆ GetModelEvidance()

bool GetModelEvidance ( const CBioseq_Handle bsh,
SModelEvidance me 
)

◆ GetResolveOrder()

EResolveOrder GetResolveOrder ( CScope scope,
const CSeq_id_Handle mrna,
const CSeq_id_Handle prot,
CBioseq_Handle mrna_bsh,
CBioseq_Handle prot_bsh 
)

◆ GetTechString()

const string& GetTechString ( int  tech)

◆ IsValidAccession()

bool IsValidAccession ( const string accn,
EAccValFlag  flag = eValidateAcc 
)

◆ JoinString() [1/2]

string JoinString ( const list< string > &  l,
const string delim,
bool  noRedundancy = true 
)

Definition at line 1083 of file objutil.cpp.

References JoinString(), kEmptyStr, and result.

◆ JoinString() [2/2]

void JoinString ( string to,
const string prefix,
const string str,
bool  noRedundancy = true 
)

◆ NcbiId()

template<typename T >
void NcbiId ( CNcbiOstream os,
const T id,
bool  html = false 
)

Definition at line 200 of file objutil.hpp.

References strLinkBaseNuc.

Referenced by s_CreateHistCommentString().

◆ RemovePeriodFromEnd()

bool RemovePeriodFromEnd ( string str,
bool  keep_ellipsis = true 
)

◆ StripSpaces()

bool StripSpaces ( string str)

◆ TrimSpaces()

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().

◆ TrimSpacesAndJunkFromEnds() [1/2]

void TrimSpacesAndJunkFromEnds ( string result,
const CTempString str,
bool  allow_ellipsis = false 
)

Definition at line 647 of file objutil.cpp.

References _ASSERT, int, isalnum(), len, result, str(), and suffix.

◆ TrimSpacesAndJunkFromEnds() [2/2]

bool TrimSpacesAndJunkFromEnds ( string str,
bool  allow_ellipsis = false 
)

◆ TryToSanitizeHtml() [1/2]

void TryToSanitizeHtml ( std::string result,
const CTempString str 
)

Definition at line 1815 of file objutil.cpp.

References ITERATE, result, and str().

◆ TryToSanitizeHtml() [2/2]

void TryToSanitizeHtml ( std::string str)

◆ TryToSanitizeHtmlList()

void TryToSanitizeHtmlList ( std::list< std::string > &  strs)

Variable Documentation

◆ strDocLink

const char* strDocLink
extern

◆ strLinkBaseEntrezViewer

const char* strLinkBaseEntrezViewer
extern

Definition at line 1641 of file objutil.cpp.

Referenced by CFlatSeqLoc::x_AddID().

◆ strLinkBaseExpasy

const char* strLinkBaseExpasy
extern

Definition at line 1650 of file objutil.cpp.

Referenced by CFlatStringQVal::Format().

◆ strLinkBaseGeneOntology

const char* strLinkBaseGeneOntology
extern

Definition at line 1658 of file objutil.cpp.

Referenced by s_GetGOText().

◆ strLinkBaseGeneOntologyRef

const char* strLinkBaseGeneOntologyRef
extern

Definition at line 1660 of file objutil.cpp.

Referenced by s_GetGOText().

◆ strLinkBaseGenomePrj

const char* strLinkBaseGenomePrj
extern

Definition at line 1654 of file objutil.cpp.

Referenced by CGenbankFormatter::FormatGenomeProject().

◆ strLinkBaseLatLon

const char* strLinkBaseLatLon
extern

Definition at line 1656 of file objutil.cpp.

◆ strLinkBaseNuc

const char* strLinkBaseNuc
extern

Definition at line 1636 of file objutil.cpp.

Referenced by CGenbankFormatter::FormatAccession(), and NcbiId().

◆ strLinkBaseNucSearch

const char* strLinkBaseNucSearch
extern

Definition at line 1652 of file objutil.cpp.

◆ strLinkBaseProt

const char* strLinkBaseProt
extern

Definition at line 1638 of file objutil.cpp.

Referenced by CGenbankFormatter::FormatAccession().

◆ strLinkBasePubmed

const char* strLinkBasePubmed
extern

◆ strLinkBaseTaxonomy

const char* strLinkBaseTaxonomy
extern

Definition at line 1644 of file objutil.cpp.

◆ strLinkBaseTransTable

const char* strLinkBaseTransTable
extern

Definition at line 1646 of file objutil.cpp.

Referenced by CFlatIntQVal::Format().

◆ strLinkBaseUniProt

const char* strLinkBaseUniProt
extern

Definition at line 1664 of file objutil.cpp.

Referenced by CHTMLFormatterEx::FormatUniProtId().

◆ strLinkBaseUSPTO

const char* strLinkBaseUSPTO
extern

Definition at line 1662 of file objutil.cpp.

Referenced by s_FormatPatent().

Modified on Tue Nov 28 02:23:32 2023 by modify_doxy.py rev. 669887