mMethod(other.mMethod),
70mSeqStart(other.mSeqStart),
71mSeqStop(other.mSeqStop),
73mStrand(other.mStrand),
90 const string&
value)
107 const string&
value)
117vector<string>&
value)
const 121 if(it == mAttributes.end() || it->second.empty()) {
131 constvector<string>& values)
134 if(values.empty()) {
139 mAttributes[
key] = vector<string>(values.begin(), values.end());
142 for(vector<string>::const_iterator cit = values.begin();
143cit != values.end(); ++cit) {
144 stringcurrent = *cit;
145vector<string>::iterator iit = std::find(
170 constvector<string>& values)
173 mAttributes[
key] = vector<string>(values.begin(), values.end());
200 const string& seqId)
208 const string& method)
216 const string&
type)
224 unsigned intseqStart,
225 unsigned intseqStop,
278 if(
key==
"score") {
294 const string& score)
353 return(lhs->first < rhs->first);
361 return(lhs->first < rhs->first);
379 typedefvector<TAttrCit> SORTATTRS;
381SORTATTRS sortedAttrs;
384 if(ait->first !=
"Gap") {
385sortedAttrs.push_back(ait);
392 for(SORTATTRS::const_iterator cit = sortedAttrs.begin();
393cit != sortedAttrs.end(); ++cit) {
394 const string&
key= (*cit)->first;
401 boolgot_values =
false;
402 for(
autovit : (*cit)->second)
405 if(!singleValue.empty()) {
414 typedefvector<TScoreCit> SORTSCORES;
415SORTSCORES sortedScores;
418sortedScores.push_back(ait);
422 for(
autocit : sortedScores)
424 const string&
key= cit->first;
434 const string&
key= gapAttr->first;
452 const string&
value)
const 457 staticconstexpr
autoescaped_no_range = charset{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
458 '%',
';',
'=',
'%',
'=',
'&', 0x7F,
','};
459 staticconstexpr
autoescaped_range_value = charset{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
460 '%',
';',
'=',
'%',
'=',
'&', 0x7F };
462 const auto& escaped = (
key==
"start_range"||
key==
"end_range") ? escaped_range_value : escaped_no_range;
465 staticconstexpr
charhexa_numbers[] =
"0123456789ABCDEF";
468replacement[0] =
'%';
472 staticthread_local
string result;
477 for(
size_t i= 0;
i<
value.size(); ++
i)
482replacement[1] = hexa_numbers[c / 16];
483replacement[2] = hexa_numbers[c % 16];
484 result.append(
value.data() + last_pos,
i- last_pos);
485 result.append(replacement, 3);
TScores::const_iterator TScoreCit
void SetPhase(unsigned int)
TScores::iterator TScoreIt
virtual string StrType() const
virtual string StrSeqStop() const
virtual string StrAttributes() const
const string & xEscapedValue(const string &key, const string &value) const
bool DropAttributes(const string &)
virtual string StrScore() const
void SetSeqId(const string &)
void SetLocation(unsigned int, unsigned int, ENa_strand=objects::eNa_strand_unknown)
virtual ~CGffBaseRecord()
bool GetAttributes(const string &, vector< string > &) const
void SetType(const string &)
virtual string StrPhase() const
void SetMethod(const string &)
objects::ENa_strand SeqStrand() const
void SetStrand(ENa_strand)
bool SetAttribute(const string &, const string &)
TAttributes::iterator TAttrIt
TAttributes::const_iterator TAttrCit
const string & xEscapedString(const string &value) const
virtual string StrSeqStart() const
void SetScore(const CScore &)
bool AddAttributes(const string &, const vector< string > &)
bool SetAttributes(const string &, const vector< string > &)
virtual string StrSeqId() const
bool AddAttribute(const string &, const string &)
static const char * ATTR_SEPARATOR
virtual string StrStrand() const
CGffBaseRecord(const string &id="")
virtual string StrMethod() const
const_iterator begin() const
const_iterator end() const
iterator_bool insert(const value_type &val)
const_iterator find(const key_type &key) const
Include a standard set of the NCBI C++ Toolkit most basic headers.
static const struct attribute attributes[]
bool lessScoreCit(const CGffBaseRecord::TScoreCit &lhs, const CGffBaseRecord::TScoreCit &rhs)
bool lessAttrCit(const CGffBaseRecord::TAttrCit &lhs, const CGffBaseRecord::TAttrCit &rhs)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static string DoubleToString(double value, int precision=-1, TNumToStringFlags flags=0)
Convert double to string.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static string UIntToString(unsigned int value, TNumToStringFlags flags=0, int base=10)
Convert UInt to string.
bool IsStr(void) const
Check if variant Str is selected.
const TStr & GetStr(void) const
Get the variant data.
bool IsSetId(void) const
Check if a value has been assigned to Id data member.
bool IsReal(void) const
Check if variant Real is selected.
TInt GetInt(void) const
Get the variant data.
bool IsInt(void) const
Check if variant Int is selected.
const TValue & GetValue(void) const
Get the Value member data.
bool IsSetValue(void) const
Check if a value has been assigned to Value data member.
TReal GetReal(void) const
Get the variant data.
const TId & GetId(void) const
Get the Id member data.
ENa_strand
strand of nucleic acid
@ eNa_strand_both_rev
in reverse orientation
@ eNa_strand_both
in forward orientation
constexpr auto sort(_Init &&init)
const struct ncbi::grid::netcache::search::fields::KEY key
const GenericPointer< typename T::ValueType > T2 value
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