99 , m_Queue(parent_queue)
100 , m_Priority(priority)
177 for ( ; feat_iter; ++feat_iter) {
188 for ( ; feat_iter; ++feat_iter) {
212 for ( ; seqmap_iter; ++seqmap_iter) {
221 for ( ; seqmap_iter; ++seqmap_iter) {
249 int threads,
int max_queue_size)
252 , m_IsShuttingDown(
false)
310 TRetrievalFlags
flags,
325 TRetrievalFlags
flags)
339 TRetrievalFlags
flags)
366 TRetrievalFlags
flags)
373 ITERATE (vector<CSeq_id_Handle>, iter, ids) {
388 ITERATE (vector<TGi>, iter, ids) {
static CRef< CScope > m_Scope
Siple fatal request used for terminating processing.
void Process()
Do the actual job Called by whichever thread handles this request.
Wrapper class for a resolution request.
void Process()
Do the actual job Called by whichever thread handles this request.
CSeqFetchQueue::TRetrievalFlags m_Flags
CResolveRequest(CScope &scope, CSeq_id_Handle idh, const TSeqRange &range, CSeqFetchQueue::TRetrievalFlags flags, CSeqFetchQueue &parent_queue, int priority)
friend class CResolveRequest
void Finish()
Finish processing of all items in the queue.
void Clear()
Clear all items from the queue.
void Add(const objects::CSeq_id &id, TRetrievalFlags flags=fDefaults)
Enqueue a single ID for retrieval.
bool m_IsShuttingDown
flag: set to true when the class is shutting down this blocks all further acceptances
CSeqFetchQueue(objects::CScope &scope, int threads=4, int max_queue_size=100000)
CSeqFetchQueue implementation details.
CRef< objects::CScope > m_Scope
@ fRetrieveProducts
should we enqueue product retrievals as well? this implies retrieval of mRNA and CDS features
@ fRetrieveRecursive
should we enqueue all items recursively? levels below the requested level are retrieved with a lower ...
@ fRetrieveFeatures
retrieve all features not in external annotations
@ fRetrieveCoreFeatures
retrieve the "core" features this includes genes, mRNAs, and CDSs only
bool IsFull() const
Ask if the queue is full or empty.
static CSeqFetchQueue & GetInstance()
static interface to access singleton
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
string GetSeqIdString(bool with_version=false) const
Return seqid string with optional version for text seqid type.
CConstRef< CSeq_id > GetSeqId(void) const
static CSeq_id_Handle GetGiHandle(TGi gi)
Faster way to create a handle for a gi.
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
CSeq_id_Handle GetIdHandle(const CSeq_loc &loc, CScope *scope)
TIds GetIds(const CSeq_id &id, TGetFlags flags=0)
Get "native" bioseq ids without filtering and matching.
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
void AddDefaults(TPriority pri=kPriority_Default)
Add default data loaders from object manager.
CConstRef< CBioseq > GetCompleteBioseq(void) const
Get the complete bioseq.
bool IsSetProduct(void) const
TSeqPos GetEndPosition(void) const
return end position of current segment in sequence (exclusive)
SSeqMapSelector & SetResolveCount(size_t res_cnt)
Set max depth of resolving seq-map.
SAnnotSelector & IncludeFeatSubtype(TFeatSubtype subtype)
Include feature subtype in the search.
SAnnotSelector & SetResolveAll(void)
SetResolveAll() is equivalent to SetResolveMethod(eResolve_All).
SSeqMapSelector & SetFlags(TFlags flags)
Select segment type(s)
SAnnotSelector & SetAdaptiveDepth(bool value=true)
SetAdaptiveDepth() requests to restrict subsegment resolution depending on annotations found on lower...
SAnnotSelector & SetExcludeExternal(bool exclude=true)
External annotations for the Object Manger are annotations located in top level Seq-entry different f...
const CSeq_loc & GetProduct(void) const
CSeq_id_Handle GetRefSeqid(void) const
The following function makes sense only when the segment is a reference to another seq.
SAnnotSelector & SetResolveNone(void)
SetResolveNone() is equivalent to SetResolveMethod(eResolve_None).
void Reset(void)
Reset reference object.
static TThisType GetWhole(void)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
virtual void KillAllThreads(TKillFlags flags)
Causes all threads in the pool to exit cleanly after finishing all pending requests,...
TItemHandle AcceptRequest(const CRef< CStdRequest > &request, TUserPriority priority=0, unsigned int timeout_sec=0, unsigned int timeout_nsec=0)
Put a request in the queue with a given priority.
bool IsEmpty(void) const
Check if the queue is empty.
TQueue m_Queue
The request queue.
bool IsFull(void) const
Check if the queue is full.
TItemHandle GetHandle(unsigned int timeout_sec=kMax_UInt, unsigned int timeout_nsec=0)
Get the first available request from the queue, and return a handle to it.
static void Exit(void *exit_data)
Cancel current thread.
#define DEFINE_STATIC_MUTEX(id)
Define static mutex and initialize it.
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is whole
range(_Ty, _Ty) -> range< _Ty >
Multi-threading – mutexes; rw-locks; semaphore.
CRef< objects::CObjectManager > om
Selector used in CSeqMap methods returning iterators.