1 #ifndef OBJECTS_OBJMGR___SEQ_ID_HANDLE__HPP
2 #define OBJECTS_OBJMGR___SEQ_ID_HANDLE__HPP
289 if (
IsGi())
return false;
291 if (!seq_id)
return false;
292 auto text_id = seq_id->GetTextseq_Id();
294 text_id->IsSetAccession() &&
295 text_id->IsSetVersion();
393 void swap(NCBI_NS_NCBI::objects::CSeq_id_Handle& idh1,
394 NCBI_NS_NCBI::objects::CSeq_id_Handle& idh2)
std::ofstream out("events_result.xml")
main entry point for tests
CStrictId< SStrictId_Gi, SStrictId_Gi::TId > TGi
#define INT_ID_TO(T, id)
Convert gi-compatible int to/from other types.
string GetDirectLabel(const CSeq_id &id)
Return best label for a sequence from single Seq-id, or set of Seq-ids.
bool operator()(const CSeq_id_Handle &id1, const CSeq_id_Handle &id2) const
void RemoveLock(void) const
CSeq_id_Handle(const CSeq_id_Info *info, TPacked packed=0, TVariant variant=0)
virtual int CompareOrdered(const CSeq_id_Info &other, const CSeq_id_Handle &h_this, const CSeq_id_Handle &h_other) const
atomic< Uint8 > m_LockCounter
static EAccessionInfo IdentifyAccession(const CTempString &accession, TParseFlags flags=fParse_AnyRaw)
Deduces information from a bare accession a la WHICH_db_accession; may report false negatives on prop...
void Lock(const CSeq_id_Info *info) const
bool operator!=(const CSeq_id_Handle &handle) const
bool IsPacked(void) const
CSeq_id_Info::TVariant TVariant
CSeq_id_Which_Tree & GetTree(void) const
CConstRef< CSeq_id > GetSeqId(void) const
bool HaveReverseMatch(void) const
BEGIN_STD_SCOPE void swap(NCBI_NS_NCBI::objects::CSeq_id_Handle &idh1, NCBI_NS_NCBI::objects::CSeq_id_Handle &idh2)
CRef< CSeq_id_Mapper > m_Mapper
void Reset(void)
Reset the handle (remove seq-id reference)
void Unlock(const CSeq_id_Info *info) const
EAccessionInfo
For IdentifyAccession (below)
CSeq_id_Mapper & GetMapper(void) const
CConstRef< CSeq_id > GetSeqIdOrNull(void) const
static CSeq_id_Handle GetGiHandle(TGi gi)
Faster way to create a handle for a gi.
CConstRef< CSeq_id > m_Seq_id
virtual CConstRef< CSeq_id > GetPackedSeqId(TPacked packed, TVariant variant) const
CSeq_id_Info(const CSeq_id_Info &)
CSeq_id_Info::TPacked TPacked
bool IsAllowedSNPScaleLimit(CSeq_id::ESNPScaleLimit scale_limit) const
bool MatchesTo(const CSeq_id_Handle &h) const
True if *this matches to h.
CSeq_id::EAccessionInfo IdentifyAccession(void) const
bool operator<(const CSeq_id_Handle &handle) const
CConstRef< CSeq_id_Info, CSeq_id_InfoLocker > m_Info
CConstRef< CSeq_id > Get_ConstRef_Seq_id(const CSeq_id_Handle &idh)
Get CConstRef<CSeq_id> from a seq-id handle (for container searching template functions)
TVariant GetVariant(void) const
bool IsAccVer(void) const
const CSeq_id_Info & operator=(const CSeq_id_Info &)
void GetReverseMatchingHandles(TMatches &matches) const
bool operator==(const CSeq_id_Handle &handle) const
int CompareOrdered(const CSeq_id_Handle &id) const
Compare ids in a defined order (see CSeq_id::CompareOrdered())
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
string AsString(void) const
DECLARE_OPERATOR_BOOL_REF(m_Info)
Check if the handle is a valid or an empty one.
CNcbiOstream & operator<<(CNcbiOstream &out, const CSeq_id_Handle &idh)
CSeq_id_Info(CSeq_id::E_Choice type, CSeq_id_Mapper *mapper)
atomic< CSeq_id::E_Choice > m_Seq_id_Type
const CSeq_id_Info * x_GetInfo(void) const
unsigned GetHash(void) const
void GetMatchingHandles(TMatches &matches) const
void Swap(CSeq_id_Handle &idh)
void x_RemoveLastLock(void) const
CSeq_id::E_Choice GetType(void) const
bool IsSetVariant(void) const
bool IsBetter(const CSeq_id_Handle &h) const
True if "this" is a better bioseq than "h".
CSeq_id::E_Choice Which(void) const
void Relock(const CSeq_id_Info *info) const
set< CSeq_id_Handle > TMatches
string GetLabel(const CSeq_id &id)
CConstRef< CSeq_id > GetSeqId(void) const
CSeq_id_Mapper & GetMapper(void) const
bool IsLocked(void) const
TPacked GetPacked(void) const
ESNPScaleLimit
SNP annotation scale limits.
bool HaveMatchingHandles(void) const
void Reset(void)
Reset reference object.
void Swap(TThisType &ref)
Swaps the pointer with another reference.
void Unlock(const CObject *object) const
void Lock(const CObject *object) const
uint64_t Uint8
8-byte (64-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_STD_SCOPE
Place it for adding new funtionality to STD scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define END_STD_SCOPE
End previously defined STD scope.
#define BEGIN_SCOPE(ns)
Define a new scope.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
@ e_Gi
GenInfo Integrated Database.
Predicate for sorting CSeq_id_Handles in a defined order.