NCBI C++ ToolKit
Classes | Macros | Functions
seqdbatlas.hpp File Reference

The SeqDB memory management layer. More...

#include <corelib/ncbimtx.hpp>
#include <corelib/ncbiatomic.hpp>
#include <corelib/ncbifile.hpp>
#include <corelib/ncbi_system.hpp>
#include <corelib/ncbiapp_api.hpp>
#include <objtools/blast/seqdb_reader/impl/seqdbgeneral.hpp>
#include <vector>
#include <map>
#include <set>
#include <mutex>
#include <iostream>
+ Include dependency graph for seqdbatlas.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

class  CSeqDBLockHold
 CSeqDBLockHold. More...
 
class  CSeqDBMemReg
 CSeqDBMemReg. More...
 
class  CSeqDB_AtlasRegionHolder
 Hold a memory region refcount, return to atlas when destroyed. More...
 
class  CSeqDBAtlas
 CSeqDBAtlas class. More...
 
class  CSeqDBAtlas::CAtlasMappedFile
 
class  CSeqDBAtlasHolder
 Guard object for the SeqDBAtlas singleton. More...
 
class  CSeqDBFileMemMap
 

Macros

#define INT4IFY_STRING(a)
 Define memory marker for class (4+ bytes of uppercase ascii). More...
 
#define CLASS_MARKER_FIELD(a)
 
#define INIT_CLASS_MARK()   m_ClassMark = x_GetClassMark()
 Marker initializer for constructor. More...
 
#define CHECK_MARKER()
 Assertion to verify the marker. More...
 
#define BREAK_MARKER()   m_ClassMark |= 0x20202020;
 Make the marker of this class invalid. More...
 

Functions

string SeqDB_MakeOSPath (const string &dbs)
 Return path with delimiters changed to platform preferred kind. More...
 

Detailed Description

The SeqDB memory management layer.

Defines classes: CSeqDBLockHold CSeqDBMemReg CSeqDB_AtlasRegionHolder CSeqDBAtlas CSeqDBAtlasHolder

Implemented for: UNIX, MS-Windows

Definition in file seqdbatlas.hpp.

Macro Definition Documentation

◆ BREAK_MARKER

#define BREAK_MARKER ( )    m_ClassMark |= 0x20202020;

Make the marker of this class invalid.

Definition at line 121 of file seqdbatlas.hpp.

◆ CHECK_MARKER

#define CHECK_MARKER ( )
Value:
if (m_ClassMark != x_GetClassMark()) { \
cout << "Marker=" << m_ClassMark << endl; \
cout << "GetMrk=" << x_GetClassMark() << endl; \
cout << "\n!! Broken [" << x_GetMarkString() << "] mark detected.\n" \
<< "!! Mark is [" << hex << m_ClassMark << "], should be [" \
<< hex << x_GetClassMark() << "]." << endl; \
_ASSERT(m_ClassMark == x_GetClassMark()); \
}
static void hex(unsigned char c)
Definition: mdb_dump.c:56

Assertion to verify the marker.

Definition at line 110 of file seqdbatlas.hpp.

◆ CLASS_MARKER_FIELD

#define CLASS_MARKER_FIELD (   a)
Value:
static int x_GetClassMark() { return INT4IFY_STRING(a); } \
static string x_GetMarkString() { return string((a a), 4); } \
int m_ClassMark;
string
Definition: cgiapp.hpp:687
unsigned int a
Definition: ncbi_localip.c:102
#define INT4IFY_STRING(a)
Define memory marker for class (4+ bytes of uppercase ascii).
Definition: seqdbatlas.hpp:95

Definition at line 101 of file seqdbatlas.hpp.

◆ INIT_CLASS_MARK

#define INIT_CLASS_MARK ( )    m_ClassMark = x_GetClassMark()

Marker initializer for constructor.

Definition at line 107 of file seqdbatlas.hpp.

◆ INT4IFY_STRING

#define INT4IFY_STRING (   a)
Value:
(((a[3] & 0xFF) << 24) | \
((a[2] & 0xFF) << 16) | \
((a[1] & 0xFF) << 8) | \
((a[0] & 0xFF)))

Define memory marker for class (4+ bytes of uppercase ascii).

Definition at line 95 of file seqdbatlas.hpp.

Function Documentation

◆ SeqDB_MakeOSPath()

string SeqDB_MakeOSPath ( const string dbs)

Return path with delimiters changed to platform preferred kind.

The path is modified and returned. The 'Make' interface is more convenient for cases where the input path and output path are different objects. Delimiter conversion should be called by SeqDB at least once on any path received from the user, or via filesystem sources such as alias files.

Parameters
dbsThis is the input path.
Returns
The modified path is returned.

Definition at line 298 of file seqdbcommon.cpp.

References SeqDB_ConvertOSPath().

Referenced by CSeqDB_SimpleAccessor::DoesFileExist(), s_ContainsBinaryNumericIdList(), s_SeqDB_TryPaths(), SeqDB_ReadBinaryGiList(), SeqDB_ReadGiList(), SeqDB_ReadMixList(), SeqDB_ReadPigList(), SeqDB_ReadSiList(), SeqDB_ReadTaxIdList(), and SeqDB_ReadTiList().

Modified on Wed Jun 12 11:19:34 2024 by modify_doxy.py rev. 669887