string CurrentLocationAsString () const { return GetSeqId() + " | " + NStr::IntToString(GetVersion()) + " | " + NStr::UInt8ToString(GetGi()) + " | " + NStr::IntToString(GetTimestamp()); }
int CSeq_id_Handle::CompareOrdered(const CSeq_id_Handle& id) const { // small optimization to avoid creation of temporary CSeq_id objects if ( int diff = Which() - id.Which() ) { return diff; } if ( IsGi() && id.IsGi() ) { return GetGi() - id.GetGi(); } return GetSeqId()->CompareOrdered(*id.GetSeqId()); }
/// Convert this object to a string string AsString() const { string retval; switch (m_EntryChoice) { case ePig: retval = "PIG " + NStr::IntToString(GetPig()); break; case eGi: retval = "GI " + NStr::IntToString(GetGi()); break; case eSeqId: retval = "'" + GetStringId() + "'"; break; case eNone: if (GetOID() != CBlastDBSeqId::kInvalid) { retval = "OID " + NStr::IntToString(GetOID()); } break; default: abort(); } return retval; }