Search Toolkit Book for CSeqDBVolSet
#include "seqdbvolset.hpp"
(Private to src/objtools/blast/seqdb_reader
.)
This class stores a set of CSeqDBVol objects and defines an interface to control usage of them. Several methods are provided to create the set of volumes, or to get the required volumes by different criteria. Also, certain methods perform operations over the set of volumes. The CSeqDBVolEntry class, defined internally to this one, provides some of this abstraction.
Definition at line 157 of file seqdbvolset.hpp.
◆ CSeqDBVolSet() [1/3]Standard Constructor.
An object of this class will be constructed after the alias files have been read, and the volume names will come from that processing step. All of the specified volumes will be opened and the metadata will be verified during construction.
Definition at line 37 of file seqdbvolset.cpp.
References i, int, m_VolList, NCBI_THROW, CSeqDBAtlas::Unlock(), and x_AddVolume().
◆ CSeqDBVolSet() [2/3] CSeqDBVolSet::CSeqDBVolSet ( )Default Constructor.
An empty volume set will be created; this is in support of the CSeqDBExpert class's default constructor.
Definition at line 89 of file seqdbvolset.cpp.
◆ ~CSeqDBVolSet() CSeqDBVolSet::~CSeqDBVolSet ( )Destructor.
The destructor will release all resources still held, but some of the resources will probably already be cleaned up via a call to the UnLease method.
Definition at line 94 of file seqdbvolset.cpp.
References i, int, and m_VolList.
◆ CSeqDBVolSet() [3/3]Private constructor to prevent copy operation.
◆ FindVol() [1/3]Find a volume by OID.
Many of the CSeqDB methods identify which sequence to use by OID. That OID applies to all sequences in all volumes of the opened database(s). This method is used to find the volume (if any) that contains this OID, and to return both a pointer to that volume and the OID within that volume that corresponds to the global input OID.
Definition at line 293 of file seqdbvolset.hpp.
References int, m_RecentVol, m_VolList, CSeqDBVolEntry::OIDEnd(), CSeqDBVolEntry::OIDStart(), and CSeqDBVolEntry::Vol().
◆ FindVol() [2/3]Find a volume by OID.
Many of the CSeqDB methods identify which sequence to use by OID. That OID applies to all sequences in all volumes of the opened database(s). This method is used to find the volume (if any) that contains this OID, and to return both a pointer to that volume and the OID within that volume that corresponds to the global input OID.
Definition at line 210 of file seqdbvolset.hpp.
Referenced by CSeqDBImpl::GetAmbigPartialSeq(), CSeqDBImpl::GetAmbigSeq(), CSeqDBImpl::GetBioseq(), CSeqDBImpl::GetColumnBlob(), CSeqDBImpl::GetMaskData(), CSeqDBImpl::GetRawSeqAndAmbig(), CSeqDBImpl::GetSeqData(), CSeqDBImpl::GetSeqIDs(), CSeqDBImpl::GetSeqLengthApprox(), CSeqDBImpl::GetSequence(), CSeqDBImpl::OidToGi(), CSeqDBImpl::OidToPig(), CSeqDBImpl::SetOffsetRanges(), CSeqDBImpl::x_FillSeqBuffer(), CSeqDBImpl::x_GetHdr(), CSeqDBImpl::x_GetSeqGI(), CSeqDBImpl::x_GetSeqLength(), and CSeqDBImpl::x_ScanTotals().
◆ FindVol() [3/3]Find a volume by OID.
Many of the CSeqDB methods identify which sequence to use by OID. That OID applies to all sequences in all volumes of the opened database(s). This method is used to find the volume (if any) that contains this OID, and to return a pointer to that volume, the OID within that volume that corresponds to the global input OID, and the volume index.
Definition at line 245 of file seqdbvolset.hpp.
References int, m_RecentVol, m_VolList, NULL, CSeqDBVolEntry::OIDEnd(), CSeqDBVolEntry::OIDStart(), and CSeqDBVolEntry::Vol().
◆ GetMaxLength() int CSeqDBVolSet::GetMaxLength ( ) const inline ◆ GetMinLength() int CSeqDBVolSet::GetMinLength ( ) const inline ◆ GetNumOIDs() int CSeqDBVolSet::GetNumOIDs ( ) const inline ◆ GetNumVols() int CSeqDBVolSet::GetNumVols ( ) const inlineGet the number of volumes.
This returns the number of volumes available from this set. It would be needed, for example, in order to iterate over all volumes with the GetVol(int) method.
Definition at line 441 of file seqdbvolset.hpp.
References m_VolList.
Referenced by CSeqDBImpl::AccessionToOids(), CSeqDBLMDBSet::CSeqDBLMDBSet(), CSeqDBImpl::FlushOffsetRangeCache(), CSeqDBAliasFile::GetAliasFileValues(), CSeqDBImpl::GetColumnMetaData(), CSeqDBImpl::GetDate(), CSeqDBImpl::GetGiBounds(), CSeqDBImpl::GetNumOfVols(), CSeqDBImpl::GetOidAtOffset(), CSeqDBImpl::GetPigBounds(), CSeqDBImpl::GetStringBounds(), CSeqDBImpl::GiToOid(), CSeqDBImpl::GiToOidwFilterCheck(), CSeqDBImpl::HashToOids(), CSeqDBImpl::IdsToOids(), CSeqDBImpl::ListColumns(), CSeqDBImpl::PigToOid(), s_GetFilteredOidRange(), CSeqDBImpl::SeqidToOids(), CSeqDBImpl::SetVolsMemBit(), CSeqDBImpl::SetVolsOidMaskType(), CSeqDBImpl::TiToOid(), CSeqDBImpl::x_BuildMaskAlgorithmList(), CSeqDBOIDList::x_ComputeFilters(), CSeqDBImpl::x_GetColumnId(), CSeqDBGiListSet::x_ResolveNegativeList(), CSeqDBGiListSet::x_ResolvePositiveList(), and CSeqDBOIDList::x_Setup().
◆ GetVol() [1/3]Find a volume by name (non-const version).
Each volume has a name, which is the name of the component files (.pin, .psq, etc), without the file extension. This method returns a non-const pointer to the volume matching the specified name.
Definition at line 426 of file seqdbvolset.hpp.
References x_FindVolName().
◆ GetVol() [2/3]Find a volume by name.
Each volume has a name, which is the name of the component files (.pin, .psq, etc), without the file extension. This method returns a const pointer to the volume matching the specified name.
Definition at line 407 of file seqdbvolset.hpp.
References x_FindVolName().
◆ GetVol() [3/3]Find a volume by index.
This method returns a volume by index, so that 0 is the first volume, and N-1 is the last volume of a set of N.
Definition at line 333 of file seqdbvolset.hpp.
References i, m_RecentVol, and m_VolList.
Referenced by CSeqDBImpl::AccessionToOids(), CSeqDBLMDBSet::CSeqDBLMDBSet(), CSeqDBAliasFile::GetAliasFileValues(), CSeqDBImpl::GetDate(), CSeqDBImpl::GetGiBounds(), CSeqDBImpl::GetOidAtOffset(), CSeqDBImpl::GetPigBounds(), CSeqDBImpl::GetSeqType(), CSeqDBImpl::GetStringBounds(), CSeqDBImpl::GiToOid(), CSeqDBImpl::GiToOidwFilterCheck(), CSeqDBImpl::HashToOids(), CSeqDBImpl::IdsToOids(), CSeqDBImpl::PigToOid(), s_GetFilteredOidRange(), CSeqDBImpl::SeqidToOids(), CSeqDBImpl::TiToOid(), and CSeqDBAliasNode::WalkNodes().
◆ GetVolEntry() ◆ GetVolNonConst()Find a volume by index.
This method returns a volume by index, so that 0 is the first volume, and N-1 is the last volume of a set of N.
Definition at line 357 of file seqdbvolset.hpp.
References i, m_RecentVol, and m_VolList.
Referenced by CSeqDBImpl::FlushOffsetRangeCache(), CSeqDBImpl::GetColumnMetaData(), CSeqDBImpl::ListColumns(), CSeqDBImpl::SetVolsMemBit(), CSeqDBImpl::SetVolsOidMaskType(), CSeqDBImpl::x_BuildMaskAlgorithmList(), and CSeqDBImpl::x_GetColumnId().
◆ GetVolOIDStart() int CSeqDBVolSet::GetVolOIDStart ( int i ) const inline ◆ GetVolumeSetLength() Uint8 CSeqDBVolSet::GetVolumeSetLength ( ) const inlineFind total volume length for all volumes.
Each volume in the set has an internally stored length, which indicates the length (in nucleotides/residues/bases) of all of the sequences in the volume. This returns the total of these lengths.
Definition at line 503 of file seqdbvolset.hpp.
References int, and m_VolList.
Referenced by s_VerifySeqidlist(), and CSeqDBImpl::x_GetVolumeLength().
◆ operator=()Private operator to prevent assignment.
◆ OptimizeGiLists() void CSeqDBVolSet::OptimizeGiLists ( ) inlineOptimize the GI list configuration.
This tells the volumes to examine and optimize their GI list configuration. It should not be called until all GI lists have been added to the volumes (by alias file processing).
Definition at line 541 of file seqdbvolset.hpp.
References i, int, and m_VolList.
Referenced by CSeqDBImpl::CSeqDBImpl().
◆ UnLease() void CSeqDBVolSet::UnLease ( ) inline ◆ x_AddVolume()Add a volume.
This method adds a volume to the set.
Definition at line 101 of file seqdbvolset.cpp.
References m_VolList, CSeqDBVolEntry::SetStartAndEnd(), and x_GetNumOIDs().
Referenced by CSeqDBVolSet().
◆ x_FindVolName() [1/2]Find a volume by name.
This returns the CSeqDBVolEntry object for the volume matching the specified name (non const version).
Definition at line 616 of file seqdbvolset.hpp.
References i, int, and m_VolList.
◆ x_FindVolName() [2/2] ◆ x_GetNumOIDs() int CSeqDBVolSet::x_GetNumOIDs ( ) const inlineprivate ◆ m_RecentVol volatile int CSeqDBVolSet::m_RecentVol mutableprivateThe index of the most recently used volume.
This variable is mutable and volatile, but is not protected by locking. Instead, the following precautions are always taken.
1. First, the value is copied into a local variable. 2. Secondly, the range is always checked. 3. It is always treated as a hint; there is always fallback code to search for the correct volume.
Definition at line 639 of file seqdbvolset.hpp.
Referenced by FindVol(), GetVol(), GetVolEntry(), GetVolNonConst(), and GetVolOIDStart().
◆ m_VolListThe actual set of volumes.
Definition at line 628 of file seqdbvolset.hpp.
Referenced by CSeqDBVolSet(), FindVol(), GetMaxLength(), GetMinLength(), GetNumVols(), GetVol(), GetVolEntry(), GetVolNonConst(), GetVolOIDStart(), GetVolumeSetLength(), OptimizeGiLists(), UnLease(), x_AddVolume(), x_FindVolName(), x_GetNumOIDs(), and ~CSeqDBVolSet().
The documentation for this class was generated from the following files:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4