NCBI C++ ToolKit
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
CDataSource_ScopeInfo Class Reference

Search Toolkit Book for CDataSource_ScopeInfo

#include <objmgr/impl/scope_info.hpp>

+ Inheritance diagram for CDataSource_ScopeInfo:
+ Collaboration diagram for CDataSource_ScopeInfo:

Public Types

typedef CRef< CDataSourceTDataSourceLock
typedef CRef< CTSE_ScopeInfoTTSE_ScopeInfo
typedef CBlobIdKey TBlobId
typedef map< TBlobId, TTSE_ScopeInfoTTSE_InfoMap
typedef CTSE_LockSet TTSE_LockSet
typedef multimap< CSeq_id_Handle, TTSE_ScopeInfoTTSE_BySeqId
typedef CDeleteQueue< const CTSE_ScopeInfo *, CTSE_ScopeInternalLockTTSE_UnlockQueue
typedef CMutex TTSE_InfoMapMutex
typedef CMutex TTSE_LockSetMutex
typedef CTSE_ScopeUserLock TTSE_Lock
typedef pair< CConstRef< CSeq_entry_Info >, TTSE_LockTSeq_entry_Lock
typedef pair< CConstRef< CSeq_annot_Info >, TTSE_LockTSeq_annot_Lock
typedef pair< CConstRef< CBioseq_set_Info >, TTSE_LockTBioseq_set_Lock
typedef CScopeInfo_Ref< CBioseq_ScopeInfoTBioseq_Lock
typedef pair< TSeq_annot_Lock, intTSeq_feat_Lock
typedef map< CSeq_id_Handle, SSeqMatch_ScopeTSeqMatchMap
- Public Types inherited from CObject
enum  EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern }
 Control filling of newly allocated memory. More...
typedef CObjectCounterLocker TLockerType
 Default locker type for CRef. More...
typedef atomic< Uint8TCounter
 Counter type is CAtomiCounter. More...
typedef Uint8 TCount
 Alias for value type of counter. More...

Public Member Functions

 CDataSource_ScopeInfo (CScope_Impl &scope, CDataSource &ds)
 ~CDataSource_ScopeInfo (void)
CScope_ImplGetScopeImpl (void) const
void DetachScope (void)
void ResetDS (void)
void ResetHistory (int action_if_locked)
const TTSE_InfoMapGetTSE_InfoMap (void) const
TTSE_InfoMapMutexGetTSE_InfoMapMutex (void) const
const TTSE_LockSetGetTSE_LockSet (void) const
TTSE_LockSetMutexGetTSE_LockSetMutex (void) const
void ReleaseTSEUserLock (CTSE_ScopeInfo &tse)
void AcquireTSEUserLock (CTSE_ScopeInfo &tse)
void ForgetTSELock (CTSE_ScopeInfo &tse)
void RemoveFromHistory (CTSE_ScopeInfo &tse, bool drop_from_ds=false)
bool TSEIsInQueue (const CTSE_ScopeInfo &tse) const
void RemoveTSE_Lock (const CTSE_Lock &lock)
void AddTSE_Lock (const CTSE_Lock &lock)
void UnlockedTSEsSave (void)
void UnlockedTSEsRelease (void)
CDataSourceGetDataSource (void)
const CDataSourceGetDataSource (void) const
CDataLoaderGetDataLoader (void)
bool CanBeEdited (void) const
bool IsConst (void) const
void SetConst (void)
void SetCanRemoveOnResetHistory (void)
bool CanRemoveOnResetHistory (void) const
TTSE_Lock GetTSE_Lock (const CTSE_Lock &tse)
TTSE_Lock FindTSE_Lock (const CSeq_entry &tse)
TSeq_entry_Lock GetSeq_entry_Lock (const CBlobIdKey &blob_id)
TSeq_entry_Lock FindSeq_entry_Lock (const CSeq_entry &entry)
TSeq_annot_Lock FindSeq_annot_Lock (const CSeq_annot &annot)
TBioseq_set_Lock FindBioseq_set_Lock (const CBioseq_set &seqset)
TBioseq_Lock FindBioseq_Lock (const CBioseq &bioseq)
TSeq_feat_Lock FindSeq_feat_Lock (const CSeq_id_Handle &loc_id, TSeqPos loc_pos, const CSeq_feat &feat)
SSeqMatch_Scope BestResolve (const CSeq_id_Handle &idh, int get_flag)
SSeqMatch_Scope Resolve (const CSeq_id_Handle &idh, CTSE_ScopeInfo &tse)
void AttachTSE (CTSE_ScopeInfo &tse, const CTSE_Lock &lock)
void GetBlobs (TSeqMatchMap &match_map)
bool TSEIsReplaced (const TBlobId &blob_id) const
- Public Member Functions inherited from CObject
 CObject (void)
 Constructor. More...
 CObject (const CObject &src)
 Copy constructor. More...
virtual ~CObject (void)
 Destructor. More...
CObjectoperator= (const CObject &src) THROWS_NONE
 Assignment operator. More...
bool CanBeDeleted (void) const THROWS_NONE
 Check if object can be deleted. More...
bool IsAllocatedInPool (void) const THROWS_NONE
 Check if object is allocated in memory pool (not system heap) More...
bool Referenced (void) const THROWS_NONE
 Check if object is referenced. More...
bool ReferencedOnlyOnce (void) const THROWS_NONE
 Check if object is referenced only once. More...
void AddReference (void) const
 Add reference to object. More...
void RemoveReference (void) const
 Remove reference to object. More...
void ReleaseReference (void) const
 Remove reference without deleting object. More...
virtual void DoNotDeleteThisObject (void)
 Mark this object as not allocated in heap – do not delete this object. More...
virtual void DoDeleteThisObject (void)
 Mark this object as allocated in heap – object can be deleted. More...
void * operator new (size_t size)
 Define new operator for memory allocation. More...
void * operator new[] (size_t size)
 Define new[] operator for 'array' memory allocation. More...
void operator delete (void *ptr)
 Define delete operator for memory deallocation. More...
void operator delete[] (void *ptr)
 Define delete[] operator for memory deallocation. More...
void * operator new (size_t size, void *place)
 Define new operator. More...
void operator delete (void *ptr, void *place)
 Define delete operator. More...
void * operator new (size_t size, CObjectMemoryPool *place)
 Define new operator using memory pool. More...
void operator delete (void *ptr, CObjectMemoryPool *place)
 Define delete operator. More...
virtual void DebugDump (CDebugDumpContext ddc, unsigned int depth) const
 Define method for dumping debug information. More...
- Public Member Functions inherited from CDebugDumpable
 CDebugDumpable (void)
virtual ~CDebugDumpable (void)
void DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const
void DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const
void DumpToConsole (void) const

Protected Member Functions

SSeqMatch_Scope x_GetSeqMatch (const CSeq_id_Handle &idh)
SSeqMatch_Scope x_FindBestTSE (const CSeq_id_Handle &idh)
void x_SetMatch (SSeqMatch_Scope &match, CTSE_ScopeInfo &tse, const CSeq_id_Handle &idh) const
void x_SetMatch (SSeqMatch_Scope &match, const SSeqMatch_DS &ds_match)
void x_IndexTSE (CTSE_ScopeInfo &tse)
void x_UnindexTSE (const CTSE_ScopeInfo &tse)
TTSE_ScopeInfo x_FindBestTSEInIndex (const CSeq_id_Handle &idh) const
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...

Static Protected Member Functions

static bool x_IsBetter (const CSeq_id_Handle &idh, const CTSE_ScopeInfo &tse1, const CTSE_ScopeInfo &tse2)

Private Member Functions

 CDataSource_ScopeInfo (const CDataSource_ScopeInfo &)
const CDataSource_ScopeInfooperator= (const CDataSource_ScopeInfo &)

Private Attributes

TDataSourceLock m_DataSource
bool m_CanBeUnloaded
bool m_CanBeEdited
bool m_CanRemoveOnResetHistory
int m_NextTSEIndex
TTSE_InfoMap m_TSE_InfoMap
TTSE_InfoMapMutex m_TSE_InfoMapMutex
TTSE_BySeqId m_TSE_BySeqId
TTSE_LockSet m_TSE_LockSet
TTSE_LockSetMutex m_TSE_LockSetMutex
TTSE_UnlockQueue m_TSE_UnlockQueue
TTSE_LockSetMutex m_TSE_UnlockQueueMutex
CRef< CDataSource_ScopeInfom_EditDS
set< TBlobIdm_ReplacedTSEs


class CScope_Impl
class CTSE_ScopeInfo

Additional Inherited Members

- Static Public Member Functions inherited from CObject
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (const type_info &type)
static EAllocFillMode GetAllocFillMode (void)
static void SetAllocFillMode (EAllocFillMode mode)
static void SetAllocFillMode (const string &value)
 Set mode from configuration parameter value. More...
- Static Public Member Functions inherited from CDebugDumpable
static void EnableDebugDump (bool on)
- Static Public Attributes inherited from CObject
static const TCount eCounterBitsCanBeDeleted = 1 << 0
 Define possible object states. More...
static const TCount eCounterBitsInPlainHeap = 1 << 1
 Heap signature was found. More...
static const TCount eCounterBitsPlaceMask
 Mask for 'in heap' state flags. More...
static const int eCounterStep = 1 << 2
 Skip over the "in heap" bits. More...
static const TCount eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2)
 Minimal value for valid objects (reference counter is zero) Must be a single bit value. More...
static const TCount eCounterStateMask
 Valid object, and object in heap. More...

Detailed Description

Definition at line 207 of file scope_info.hpp.

Member Typedef Documentation

◆ TBioseq_Lock

Definition at line 264 of file scope_info.hpp.

◆ TBioseq_set_Lock

Definition at line 263 of file scope_info.hpp.

◆ TBlobId

Definition at line 212 of file scope_info.hpp.

◆ TDataSourceLock

Definition at line 210 of file scope_info.hpp.

◆ TSeq_annot_Lock

Definition at line 262 of file scope_info.hpp.

◆ TSeq_entry_Lock

Definition at line 261 of file scope_info.hpp.

◆ TSeq_feat_Lock

Definition at line 265 of file scope_info.hpp.

◆ TSeqMatchMap

Definition at line 283 of file scope_info.hpp.

◆ TTSE_BySeqId

Definition at line 215 of file scope_info.hpp.

◆ TTSE_InfoMap

Definition at line 213 of file scope_info.hpp.

◆ TTSE_InfoMapMutex

Definition at line 228 of file scope_info.hpp.

◆ TTSE_Lock

Definition at line 260 of file scope_info.hpp.

◆ TTSE_LockSet

Definition at line 214 of file scope_info.hpp.

◆ TTSE_LockSetMutex

Definition at line 232 of file scope_info.hpp.

◆ TTSE_ScopeInfo

Definition at line 211 of file scope_info.hpp.

◆ TTSE_UnlockQueue

Definition at line 217 of file scope_info.hpp.

Constructor & Destructor Documentation

◆ CDataSource_ScopeInfo() [1/2]

CDataSource_ScopeInfo::CDataSource_ScopeInfo ( CScope_Impl scope,
CDataSource ds 

Definition at line 106 of file scope_info.cpp.

◆ ~CDataSource_ScopeInfo()

CDataSource_ScopeInfo::~CDataSource_ScopeInfo ( void  )

Definition at line 121 of file scope_info.cpp.

References _ASSERT, m_DataSource, and m_Scope.

◆ CDataSource_ScopeInfo() [2/2]

CDataSource_ScopeInfo::CDataSource_ScopeInfo ( const CDataSource_ScopeInfo )

Member Function Documentation

◆ AcquireTSEUserLock()

void CDataSource_ScopeInfo::AcquireTSEUserLock ( CTSE_ScopeInfo tse)

◆ AddTSE_Lock()

void CDataSource_ScopeInfo::AddTSE_Lock ( const CTSE_Lock lock)

◆ AttachTSE()

void CDataSource_ScopeInfo::AttachTSE ( CTSE_ScopeInfo tse,
const CTSE_Lock lock 

◆ BestResolve()

SSeqMatch_Scope CDataSource_ScopeInfo::BestResolve ( const CSeq_id_Handle idh,
int  get_flag 

◆ CanBeEdited()

bool CDataSource_ScopeInfo::CanBeEdited ( void  ) const

◆ CanRemoveOnResetHistory()

bool CDataSource_ScopeInfo::CanRemoveOnResetHistory ( void  ) const

Definition at line 701 of file scope_info.hpp.

References m_CanRemoveOnResetHistory.

Referenced by RemoveFromHistory(), and SetCanRemoveOnResetHistory().

◆ DetachScope()

void CDataSource_ScopeInfo::DetachScope ( void  )

◆ FindBioseq_Lock()

CDataSource_ScopeInfo::TBioseq_Lock CDataSource_ScopeInfo::FindBioseq_Lock ( const CBioseq bioseq)

◆ FindBioseq_set_Lock()

CDataSource_ScopeInfo::TBioseq_set_Lock CDataSource_ScopeInfo::FindBioseq_set_Lock ( const CBioseq_set seqset)

◆ FindSeq_annot_Lock()

CDataSource_ScopeInfo::TSeq_annot_Lock CDataSource_ScopeInfo::FindSeq_annot_Lock ( const CSeq_annot annot)

◆ FindSeq_entry_Lock()

CDataSource_ScopeInfo::TSeq_entry_Lock CDataSource_ScopeInfo::FindSeq_entry_Lock ( const CSeq_entry entry)

◆ FindSeq_feat_Lock()

CDataSource_ScopeInfo::TSeq_feat_Lock CDataSource_ScopeInfo::FindSeq_feat_Lock ( const CSeq_id_Handle loc_id,
TSeqPos  loc_pos,
const CSeq_feat feat 

◆ FindTSE_Lock()

CDataSource_ScopeInfo::TTSE_Lock CDataSource_ScopeInfo::FindTSE_Lock ( const CSeq_entry tse)

◆ ForgetTSELock()

void CDataSource_ScopeInfo::ForgetTSELock ( CTSE_ScopeInfo tse)

◆ GetBlobs()

void CDataSource_ScopeInfo::GetBlobs ( TSeqMatchMap match_map)

◆ GetDataLoader()

CDataLoader * CDataSource_ScopeInfo::GetDataLoader ( void  )

◆ GetDataSource() [1/2]

CDataSource & CDataSource_ScopeInfo::GetDataSource ( void  )

◆ GetDataSource() [2/2]

const CDataSource & CDataSource_ScopeInfo::GetDataSource ( void  ) const

Definition at line 672 of file scope_info.hpp.

References m_DataSource.

◆ GetScopeImpl()

CScope_Impl & CDataSource_ScopeInfo::GetScopeImpl ( void  ) const

◆ GetSeq_entry_Lock()

CDataSource_ScopeInfo::TSeq_entry_Lock CDataSource_ScopeInfo::GetSeq_entry_Lock ( const CBlobIdKey blob_id)

◆ GetTSE_InfoMap()

const CDataSource_ScopeInfo::TTSE_InfoMap & CDataSource_ScopeInfo::GetTSE_InfoMap ( void  ) const

Definition at line 181 of file scope_info.cpp.

References m_TSE_InfoMap.

Referenced by CScope_Impl::RemoveDataLoader().

◆ GetTSE_InfoMapMutex()

CDataSource_ScopeInfo::TTSE_InfoMapMutex & CDataSource_ScopeInfo::GetTSE_InfoMapMutex ( void  ) const

Definition at line 680 of file scope_info.hpp.

References m_TSE_InfoMapMutex.

Referenced by CScope_Impl::RemoveDataLoader(), and x_FindBestTSE().

◆ GetTSE_Lock()

CTSE_ScopeUserLock CDataSource_ScopeInfo::GetTSE_Lock ( const CTSE_Lock tse)

◆ GetTSE_LockSet()

const CDataSource_ScopeInfo::TTSE_LockSet & CDataSource_ScopeInfo::GetTSE_LockSet ( void  ) const

Definition at line 188 of file scope_info.cpp.

References m_TSE_LockSet.

◆ GetTSE_LockSetMutex()

CDataSource_ScopeInfo::TTSE_LockSetMutex & CDataSource_ScopeInfo::GetTSE_LockSetMutex ( void  ) const

Definition at line 687 of file scope_info.hpp.

References m_TSE_LockSetMutex.

◆ IsConst()

bool CDataSource_ScopeInfo::IsConst ( void  ) const

◆ operator=()

const CDataSource_ScopeInfo& CDataSource_ScopeInfo::operator= ( const CDataSource_ScopeInfo )

◆ ReleaseTSEUserLock()

void CDataSource_ScopeInfo::ReleaseTSEUserLock ( CTSE_ScopeInfo tse)

◆ RemoveFromHistory()

void CDataSource_ScopeInfo::RemoveFromHistory ( CTSE_ScopeInfo tse,
bool  drop_from_ds = false 

◆ RemoveTSE_Lock()

void CDataSource_ScopeInfo::RemoveTSE_Lock ( const CTSE_Lock lock)

◆ ResetDS()

void CDataSource_ScopeInfo::ResetDS ( void  )

◆ ResetHistory()

void CDataSource_ScopeInfo::ResetHistory ( int  action_if_locked)

◆ Resolve()

SSeqMatch_Scope CDataSource_ScopeInfo::Resolve ( const CSeq_id_Handle idh,
CTSE_ScopeInfo tse 

Definition at line 856 of file scope_info.cpp.

References x_SetMatch().

Referenced by CTSE_ScopeInfo::Resolve().

◆ SetCanRemoveOnResetHistory()

void CDataSource_ScopeInfo::SetCanRemoveOnResetHistory ( void  )

◆ SetConst()

void CDataSource_ScopeInfo::SetConst ( void  )

Definition at line 150 of file scope_info.cpp.

References _ASSERT, CanBeEdited(), GetDataSource(), IsConst(), and m_CanBeEdited.

Referenced by CScope_Impl::GetConstDS().

◆ TSEIsInQueue()

bool CDataSource_ScopeInfo::TSEIsInQueue ( const CTSE_ScopeInfo tse) const

◆ TSEIsReplaced()

bool CDataSource_ScopeInfo::TSEIsReplaced ( const TBlobId blob_id) const

Definition at line 1009 of file scope_info.cpp.

References m_EditDS, m_ReplacedTSEs, and TSEIsReplaced().

Referenced by GetTSE_Lock(), and TSEIsReplaced().

◆ UnlockedTSEsRelease()

void CDataSource_ScopeInfo::UnlockedTSEsRelease ( void  )

◆ UnlockedTSEsSave()

void CDataSource_ScopeInfo::UnlockedTSEsSave ( void  )

◆ x_FindBestTSE()

SSeqMatch_Scope CDataSource_ScopeInfo::x_FindBestTSE ( const CSeq_id_Handle idh)

◆ x_FindBestTSEInIndex()

CDataSource_ScopeInfo::TTSE_ScopeInfo CDataSource_ScopeInfo::x_FindBestTSEInIndex ( const CSeq_id_Handle idh) const

◆ x_GetSeqMatch()

SSeqMatch_Scope CDataSource_ScopeInfo::x_GetSeqMatch ( const CSeq_id_Handle idh)

◆ x_IndexTSE()

void CDataSource_ScopeInfo::x_IndexTSE ( CTSE_ScopeInfo tse)

◆ x_IsBetter()

bool CDataSource_ScopeInfo::x_IsBetter ( const CSeq_id_Handle idh,
const CTSE_ScopeInfo tse1,
const CTSE_ScopeInfo tse2 

◆ x_SetMatch() [1/2]

void CDataSource_ScopeInfo::x_SetMatch ( SSeqMatch_Scope match,
const SSeqMatch_DS ds_match 

◆ x_SetMatch() [2/2]

void CDataSource_ScopeInfo::x_SetMatch ( SSeqMatch_Scope match,
CTSE_ScopeInfo tse,
const CSeq_id_Handle idh 
) const

Definition at line 942 of file scope_info.cpp.

References _ASSERT, and match().

Referenced by BestResolve(), GetBlobs(), Resolve(), and x_FindBestTSE().

◆ x_UnindexTSE()

void CDataSource_ScopeInfo::x_UnindexTSE ( const CTSE_ScopeInfo tse)

Friends And Related Function Documentation

◆ CScope_Impl

friend class CScope_Impl

Definition at line 289 of file scope_info.hpp.

◆ CTSE_ScopeInfo

friend class CTSE_ScopeInfo

Definition at line 290 of file scope_info.hpp.

Referenced by GetTSE_Lock().

Member Data Documentation

◆ m_CanBeEdited

bool CDataSource_ScopeInfo::m_CanBeEdited

Definition at line 311 of file scope_info.hpp.

Referenced by CanBeEdited(), and SetConst().

◆ m_CanBeUnloaded

bool CDataSource_ScopeInfo::m_CanBeUnloaded

Definition at line 310 of file scope_info.hpp.

Referenced by AttachTSE(), GetTSE_Lock(), and x_FindBestTSE().

◆ m_CanRemoveOnResetHistory

bool CDataSource_ScopeInfo::m_CanRemoveOnResetHistory

Definition at line 312 of file scope_info.hpp.

Referenced by CanRemoveOnResetHistory(), and SetCanRemoveOnResetHistory().

◆ m_DataSource

TDataSourceLock CDataSource_ScopeInfo::m_DataSource

Definition at line 309 of file scope_info.hpp.

Referenced by DetachScope(), GetDataSource(), and ~CDataSource_ScopeInfo().

◆ m_EditDS

CRef<CDataSource_ScopeInfo> CDataSource_ScopeInfo::m_EditDS

◆ m_NextTSEIndex

int CDataSource_ScopeInfo::m_NextTSEIndex

Definition at line 313 of file scope_info.hpp.

Referenced by GetTSE_Lock(), and ResetDS().

◆ m_ReplacedTSEs

set<TBlobId> CDataSource_ScopeInfo::m_ReplacedTSEs

◆ m_Scope

CScope_Impl* CDataSource_ScopeInfo::m_Scope

Definition at line 308 of file scope_info.hpp.

Referenced by DetachScope(), GetScopeImpl(), and ~CDataSource_ScopeInfo().

◆ m_TSE_BySeqId

TTSE_BySeqId CDataSource_ScopeInfo::m_TSE_BySeqId

Definition at line 316 of file scope_info.hpp.

Referenced by ResetDS(), x_FindBestTSEInIndex(), x_IndexTSE(), and x_UnindexTSE().

◆ m_TSE_InfoMap

TTSE_InfoMap CDataSource_ScopeInfo::m_TSE_InfoMap

◆ m_TSE_InfoMapMutex

TTSE_InfoMapMutex CDataSource_ScopeInfo::m_TSE_InfoMapMutex

◆ m_TSE_LockSet

TTSE_LockSet CDataSource_ScopeInfo::m_TSE_LockSet

◆ m_TSE_LockSetMutex

TTSE_LockSetMutex CDataSource_ScopeInfo::m_TSE_LockSetMutex

◆ m_TSE_UnlockQueue

TTSE_UnlockQueue CDataSource_ScopeInfo::m_TSE_UnlockQueue

◆ m_TSE_UnlockQueueMutex

TTSE_LockSetMutex CDataSource_ScopeInfo::m_TSE_UnlockQueueMutex

The documentation for this class was generated from the following files:
Modified on Wed Nov 29 02:16:19 2023 by rev. 669887