1 #ifndef OBJECTS_OBJMGR_IMPL___TSE_INFO__HPP
2 #define OBJECTS_OBJMGR_IMPL___TSE_INFO__HPP
106 typedef vector<CConstRef<CSeq_annot_SNP_Info> >
TSNPSet;
110 return m_AnnotSet.size();
114 _ASSERT(index < x_GetRangeMapCount());
116 return !slot || slot->
empty();
120 _ASSERT(!x_RangeMapIsEmpty(index));
121 return *m_AnnotSet[index];
124 TRangeMap& x_GetRangeMap(
size_t index);
125 bool x_CleanRangeMaps(
void);
190 fState_suppress_temp = 1 << 0,
191 fState_suppress_perm = 1 << 1,
192 fState_suppress = fState_suppress_temp | fState_suppress_perm,
193 fState_dead = 1 << 2,
194 fState_confidential = 1 << 3,
195 fState_withdrawn = 1 << 4,
196 fState_no_data = 1 << 5,
197 fState_conflict = 1 << 6,
198 fState_conn_failed = 1 << 7,
199 fState_other_error = 1 << 8
202 enum ETopLevelObjectType {
230 bool HasDataSource(
void)
const;
233 bool IsLocked(
void)
const;
238 const CTSE_Info& GetTSE_Info(
void)
const;
246 const TBlobId& GetBlobId(
void)
const;
253 bool IsDead(
void)
const;
254 bool IsUnavailable(
void)
const;
270 bool IsTopLevelSeq_submit()
const;
282 size_t GetUsedMemory(
void)
const;
283 void SetUsedMemory(
size_t size);
284 void AddUsedMemory(
size_t size);
288 bool HasUnnamedAnnot(
void)
const;
289 bool HasNamedAnnot(
const string& name)
const;
292 bool HasMatchingAnnotIds(
void)
const;
293 bool OnlyGiAnnotIds(
void)
const;
325 m_ChunkId = chunk_id;
369 virtual void GetBioseqsIds(
TSeqIds& ids)
const;
372 virtual void GetAnnotIds(
TSeqIds& ids)
const;
378 void UpdateAnnotIndex(
void)
const;
380 void UpdateAnnotIndex(
void);
387 void x_UpdateAnnotIndexContents(
CTSE_Info& tse);
392 virtual void x_SetDirtyAnnotIndexNoParent(
void);
393 virtual void x_ResetDirtyAnnotIndexNoParent(
void);
396 void x_LoadChunk(
TChunkId chunk_id)
const;
397 void x_LoadChunks(
const TChunkIds& chunk_ids)
const;
401 bool HasSplitInfo(
void)
const;
402 bool x_NeedsDelayedMainChunk(
void)
const;
403 void x_LoadDelayedMainChunk(
void)
const;
489 virtual string GetDescription(
void)
const;
494 friend class CTSE_Guard;
514 void x_Initialize(
void);
530 const TAnnotObjs* x_GetUnnamedAnnotObjs(
void)
const;
531 void x_RemoveAnnotObjs(
const CAnnotName& name);
542 pair<SIdAnnotObjs*, bool> x_SetIdObjects(
TAnnotObjs& objs,
545 pair<SIdAnnotObjs*, bool> x_SetIdObjects(
const CAnnotName& name,
558 void x_MapAnnotObject(
TRangeMap& rangeMap,
561 bool x_UnmapAnnotObject(
TRangeMap& rangeMap,
584 void x_UnmapAnnotObject(
const CAnnotName& name,
601 void x_MapFeatById(
const TFeatId&
id,
604 void x_UnmapFeatById(
const TFeatId&
id,
607 void x_MapFeatByLocus(
const string& locus,
bool tag,
609 void x_UnmapFeatByLocus(
const string& locus,
bool tag,
643 void x_MapChunkByFeatId(
const TFeatId&
id,
647 void x_MapChunkByFeatId(
const TFeatId&
id,
651 void x_MapChunkByFeatId(
const TFeatId&
id,
752 fAnnotIds_NonGi = 1 << 0,
753 fAnnotIds_Matching = 1 << 1
CAtomicCounter_WithAutoInit –.
virtual void Update(CBioseq_Info &seq)=0
vector< CSeq_id_Handle > TSeqIds
namespace ncbi::objects::
Base class for all serializable objects.
const CAnnotName & m_Name
void Unmap(const SAnnotObject_Key &key, const CAnnotObject_Info &info) const
bool Map(const SAnnotObject_Key &key, const SAnnotObject_Index &index) const
CTSE_Info::TAnnotObjs & m_AnnotObjs
CTSEAnnotObjectMapper(CTSE_Info &tse, const CAnnotName &name)
ETopLevelObjectType
Type of top level object added to scope.
CConditionVariable m_LoadWait
vector< TChunkId > TChunkIds
TBioseq_sets m_Bioseq_sets
TBlobVersion GetBlobVersion(void) const
TNamedAnnotObjs m_NamedAnnotObjs
TTSE_Cache::iterator m_CachePosition
bool IsUnavailable(void) const
CRef< CTSE_Split_Info > m_Split
TBlobOrder GetBlobOrder(void) const
CAtomicCounter_WithAutoInit m_LockCounter
CSeq_id_Handle m_RequestedId
size_t GetUsedMemory(void) const
CDataSource & GetDataSource(void) const
map< CSeq_id_Handle, SIdAnnotInfo > TIdAnnotInfoMap
SIdAnnotObjs::TRange TRange
pair< TBlobState, TBlobVersion > TBlobOrder
TBioseqs m_Removed_Bioseqs
TBlobVersion m_BlobVersion
CBioseq_Info * TBioseqInfo
TBlobState GetBlobState(void) const
bool OnlyGiAnnotIds(void) const
vector< CAnnotObject_Info * > TAnnotObjects
CRef< CSerialObject > m_TopLevelObjectPtr
CTSE_Info(const CTSE_Info &)
void x_RemoveAnnotObjs(const CAnnotName &name)
SIdAnnotObjs::TRangeMap TRangeMap
void SetBlobState(TBlobState state)
multimap< TLocusKey, CAnnotObject_Info * > TLocusIndex
TAnnotLock::TWriteLockGuard TAnnotLockWriteGuard
bool IsLocked(void) const
unique_ptr< SBaseTSE > m_BaseTSE
TBlobState GetBlobStateOrder(void) const
TAnnotLock::TReadLockGuard TAnnotLockReadGuard
pair< CConstRef< CSeq_annot_Info >, CTSE_Lock > TSeq_annot_Lock
CBioseq_Handle::TBioseqStateFlags TBlobState
CRef< CBioseqUpdater > m_BioseqUpdater
map< CBioObjectId, CTSE_Info_Object * > TBioObjects
CRef< CTSE_SetObjectInfo > m_SetObjectInfo
SIdAnnotObjs::TSNPSet TSNPSet
const TBlobId & GetBlobId(void) const
bool m_MasterSeqSegmentsLoaded
ETopLevelObjectType m_TopLevelObjectType
list< CRef< CTSE_Info > > TTSE_Cache
bool HasMatchingAnnotIds(void) const
map< CSeqFeatData::ESubtype, SFeatIdIndex > TFeatIdIndex
TAnnotLock & GetAnnotLock(void) const
map< CSeq_id_Handle, TBioseqInfo > TBioseqs
map< CAnnotName, TAnnotObjs > TNamedAnnotObjs
atomic< ELoadState > m_LoadState
bool HasDataSource(void) const
TBioseq_sets m_Removed_Bioseq_sets
TFeatIdIndex m_FeatIdIndex
int m_InternalBioObjNumber
vector< CSeq_id_Handle > TSeqIds
const CAnnotName & GetName(void) const
CRef< CLoadMutex > m_LoadMutex
TIdAnnotInfoMap m_IdAnnotInfoMap
void ResetBlobState(TBlobState state=CBioseq_Handle::fState_none)
CFastMutex m_BioseqsMutex
CRef< IEditSaver > m_EditSaver
CDataSource * m_DataSource
pair< string, bool > TLocusKey
TAnnotIdsFlags m_AnnotIdsFlags
CRef< IEditSaver > GetEditSaver() const
pair< TSeq_annot_Lock, int > TSeq_feat_Lock
const CTSE_Info & GetTSE_Info(void) const
map< TIntId, CBioseq_set_Info * > TBioseq_sets
CConstRef< CMasterSeqSegments > m_MasterSeqSegments
const CSeq_id_Handle & GetRequestedId(void) const
void x_MapAnnotObject(TRangeMap &rangeMap, const SAnnotObject_Key &key, const SAnnotObject_Index &index)
CTSE_Handle::ETopLevelObjectType ETopLevelObjectType
bool x_UnmapAnnotObject(TRangeMap &rangeMap, const CAnnotObject_Info &info, const SAnnotObject_Key &key)
SIdAnnotObjs::TAnnotSet TAnnotSet
void SetRequestedId(const CSeq_id_Handle &requested_id) const
map< CSeq_id_Handle, SIdAnnotObjs > TAnnotObjs
CTSE_SetObjectInfo(const CTSE_SetObjectInfo &)
TSeq_annot_InfoMap m_Seq_annot_InfoMap
TBioseq_set_InfoMap m_Bioseq_set_InfoMap
map< CConstRef< CBioseq_set >, SBioseq_set_Info > TBioseq_set_InfoMap
map< CConstRef< CSeq_annot >, SSeq_annot_Info > TSeq_annot_InfoMap
void operator=(const CTSE_SetObjectInfo &)
IEditSaver * GetEditSaver(const Handle &handle)
unsigned int TSeqPos
Type for sequence locations and lengths.
TValue Get(void) const THROWS_NONE
Get atomic counter value.
int8_t Int1
1-byte (8-bit) signed integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
#define NCBI_XOBJMGR_EXPORT
const string version
version string
const struct ncbi::grid::netcache::search::fields::SIZE size
const struct ncbi::grid::netcache::search::fields::KEY key
Multi-threading – mutexes; rw-locks; semaphore.
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
SBaseTSE(const CTSE_Lock &tse)
TObjectCopyMap m_ObjectCopyMap
multimap< TFeatIdStr, SFeatIdInfo > TIndexStr
AutoPtr< TIndexInt > m_IndexInt
multimap< TFeatIdInt, SFeatIdInfo > TIndexInt
AutoPtr< TIndexStr > m_IndexStr
SFeatIdInfo(EFeatIdType type, CAnnotObject_Info *info)
SFeatIdInfo(EFeatIdType type, TChunkId chunk_id)
CAnnotObject_Info * m_Info
CRef< CSeq_annot_SNP_Info > m_SNP_annot_Info
const TRangeMap & x_GetRangeMap(size_t index) const
vector< CConstRef< CSeq_annot_SNP_Info > > TSNPSet
vector< TRangeMap * > TAnnotSet
bool x_RangeMapIsEmpty(size_t index) const
const SIdAnnotObjs & operator=(const SIdAnnotObjs &objs)
CRangeMultimap< SAnnotObject_Index, TSeqPos > TRangeMap
size_t x_GetRangeMapCount(void) const
DECLARE_OPERATOR_BOOL_REF(m_Bioseq)
CConstRef< CBioseq_Info > m_Bioseq