NCBI C++ ToolKit
Macros | Functions | Variables
seq_id_tree.cpp File Reference
#include <ncbi_pch.hpp>
#include <objects/misc/error_codes.hpp>
#include <corelib/ncbi_param.hpp>
#include "seq_id_tree.hpp"
#include <objects/seq/seq_id_mapper.hpp>
#include <common/ncbi_sanitizers.h>
+ Include dependency graph for seq_id_tree.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Macros

#define NCBI_USE_ERRCODE_X   Objects_SeqIdMap
 

Functions

static void s_AssignObject_id (CObject_id &new_id, const CObject_id &old_id)
 
static void s_AssignDbtag (CDbtag &new_id, const CDbtag &old_id)
 
static void s_AssignTextseq_id (CTextseq_id &new_tid, const CTextseq_id &old_tid)
 
static void s_AssignSeq_id (CSeq_id &new_id, const CSeq_id &old_id)
 
static size_t sx_StringMemory (const string &s)
 
 NCBI_PARAM_DECL (bool, OBJECTS, PACK_TEXTID)
 
 NCBI_PARAM_DEF_EX (bool, OBJECTS, PACK_TEXTID, true, eParam_NoThread, OBJECTS_PACK_TEXTID)
 
static bool s_PackTextidEnabled (void)
 
 NCBI_PARAM_DECL (bool, OBJECTS, PACK_GENERAL)
 
 NCBI_PARAM_DEF_EX (bool, OBJECTS, PACK_GENERAL, true, eParam_NoThread, OBJECTS_PACK_GENERAL)
 
static bool s_PackGeneralEnabled (void)
 
static void s_RestoreNumber (string &str, size_t pos, size_t len, TIntId number)
 
static TIntId s_ParseNumber (const string &str, size_t pos, size_t len)
 
static CSeq_id_Handle::TVariant s_RestoreCaseVariant (string &str, size_t len, CSeq_id_Handle::TVariant variant)
 
static CSeq_id_Handle::TVariant s_RestoreCaseVariant (string &str, CSeq_id_Handle::TVariant variant)
 
static pair< CSeq_id_Handle::TVariant, CSeq_id_Handle::TVariants_ParseCaseVariant (CTempString ref, const char *str, CSeq_id_Handle::TVariant bit)
 
static pair< CSeq_id_Handle::TVariant, CSeq_id_Handle::TVariants_ParseCaseVariant (CTempString ref, const string &str, CSeq_id_Handle::TVariant bit=1)
 
static void s_RestoreNumberAndCaseVariant (string &str, size_t pos, size_t len, TIntId number, CSeq_id_Handle::TVariant variant)
 
static bool x_IsDefaultSwissprotRelease (const string &release)
 
static bool sx_AllDigits (const string &s)
 
static bool sx_ParseLocalStrId (const string &str, CObject_id::TId &id)
 
static int x_GetUnset0 (int bits)
 
static bool x_GetUnset1 (int)
 
static bool x_InRange0 (int value, int bits)
 
static bool x_InRange1 (int value, int bits)
 

Variables

static const size_t kMallocOverhead = 2*sizeof(void*)
 
static const size_t kMinGeneralStrDigits = 3
 

Macro Definition Documentation

◆ NCBI_USE_ERRCODE_X

#define NCBI_USE_ERRCODE_X   Objects_SeqIdMap

Definition at line 41 of file seq_id_tree.cpp.

Function Documentation

◆ NCBI_PARAM_DECL() [1/2]

NCBI_PARAM_DECL ( bool  ,
OBJECTS  ,
PACK_GENERAL   
)

◆ NCBI_PARAM_DECL() [2/2]

NCBI_PARAM_DECL ( bool  ,
OBJECTS  ,
PACK_TEXTID   
)

◆ NCBI_PARAM_DEF_EX() [1/2]

NCBI_PARAM_DEF_EX ( bool  ,
OBJECTS  ,
PACK_GENERAL  ,
true  ,
eParam_NoThread  ,
OBJECTS_PACK_GENERAL   
)

◆ NCBI_PARAM_DEF_EX() [2/2]

NCBI_PARAM_DEF_EX ( bool  ,
OBJECTS  ,
PACK_TEXTID  ,
true  ,
eParam_NoThread  ,
OBJECTS_PACK_TEXTID   
)

◆ s_AssignDbtag()

static void s_AssignDbtag ( CDbtag new_id,
const CDbtag old_id 
)
inlinestatic

◆ s_AssignObject_id()

static void s_AssignObject_id ( CObject_id new_id,
const CObject_id old_id 
)
inlinestatic

◆ s_AssignSeq_id()

static void s_AssignSeq_id ( CSeq_id new_id,
const CSeq_id old_id 
)
inlinestatic

◆ s_AssignTextseq_id()

static void s_AssignTextseq_id ( CTextseq_id new_tid,
const CTextseq_id old_tid 
)
inlinestatic

◆ s_PackGeneralEnabled()

static bool s_PackGeneralEnabled ( void  )
inlinestatic

Definition at line 704 of file seq_id_tree.cpp.

References NCBI_PARAM_TYPE, and value.

Referenced by CSeq_id_General_Tree::FindInfo(), and CSeq_id_General_Tree::FindOrCreate().

◆ s_PackTextidEnabled()

static bool s_PackTextidEnabled ( void  )
inlinestatic

Definition at line 695 of file seq_id_tree.cpp.

References NCBI_PARAM_TYPE, and value.

Referenced by CSeq_id_Textseq_Tree::FindInfo(), and CSeq_id_Textseq_Tree::FindOrCreate().

◆ s_ParseCaseVariant() [1/2]

static pair<CSeq_id_Handle::TVariant, CSeq_id_Handle::TVariant> s_ParseCaseVariant ( CTempString  ref,
const char *  str,
CSeq_id_Handle::TVariant  bit 
)
inlinestatic

◆ s_ParseCaseVariant() [2/2]

static pair<CSeq_id_Handle::TVariant, CSeq_id_Handle::TVariant> s_ParseCaseVariant ( CTempString  ref,
const string str,
CSeq_id_Handle::TVariant  bit = 1 
)
inlinestatic

Definition at line 791 of file seq_id_tree.cpp.

References _ASSERT, s_ParseCaseVariant(), CTempString::size(), and str().

◆ s_ParseNumber()

static TIntId s_ParseNumber ( const string str,
size_t  pos,
size_t  len 
)
inlinestatic

Definition at line 725 of file seq_id_tree.cpp.

References i, len, number, and str().

Referenced by CSeq_id_General_Str_Info::Pack(), and CSeq_id_Textseq_Info::Pack().

◆ s_RestoreCaseVariant() [1/2]

static CSeq_id_Handle::TVariant s_RestoreCaseVariant ( string str,
CSeq_id_Handle::TVariant  variant 
)
inlinestatic

Definition at line 760 of file seq_id_tree.cpp.

References s_RestoreCaseVariant(), and str().

◆ s_RestoreCaseVariant() [2/2]

static CSeq_id_Handle::TVariant s_RestoreCaseVariant ( string str,
size_t  len,
CSeq_id_Handle::TVariant  variant 
)
inlinestatic

◆ s_RestoreNumber()

static void s_RestoreNumber ( string str,
size_t  pos,
size_t  len,
TIntId  number 
)
inlinestatic

◆ s_RestoreNumberAndCaseVariant()

static void s_RestoreNumberAndCaseVariant ( string str,
size_t  pos,
size_t  len,
TIntId  number,
CSeq_id_Handle::TVariant  variant 
)
inlinestatic

◆ sx_AllDigits()

static bool sx_AllDigits ( const string s)
inlinestatic

Definition at line 1807 of file seq_id_tree.cpp.

References i, isdigit(), and ITERATE.

Referenced by CSeq_id_General_Tree::FindMatch(), and CSeq_id_General_Tree::HaveMatch().

◆ sx_ParseLocalStrId()

static bool sx_ParseLocalStrId ( const string str,
CObject_id::TId id 
)
static

◆ sx_StringMemory()

static size_t sx_StringMemory ( const string s)
static

◆ x_GetUnset0()

static int x_GetUnset0 ( int  bits)
inlinestatic

Definition at line 3318 of file seq_id_tree.cpp.

Referenced by CSeq_id_PDB_Info::x_NormalizeDate().

◆ x_GetUnset1()

static bool x_GetUnset1 ( int  )
inlinestatic

Definition at line 3325 of file seq_id_tree.cpp.

Referenced by CSeq_id_PDB_Info::x_NormalizeDate().

◆ x_InRange0()

static bool x_InRange0 ( int  value,
int  bits 
)
inlinestatic

Definition at line 3332 of file seq_id_tree.cpp.

References value.

Referenced by CSeq_id_PDB_Info::x_NormalizeDate().

◆ x_InRange1()

static bool x_InRange1 ( int  value,
int  bits 
)
inlinestatic

Definition at line 3339 of file seq_id_tree.cpp.

References value.

Referenced by CSeq_id_PDB_Info::x_NormalizeDate().

◆ x_IsDefaultSwissprotRelease()

static bool x_IsDefaultSwissprotRelease ( const string release)
inlinestatic

Definition at line 1245 of file seq_id_tree.cpp.

Referenced by CSeq_id_Textseq_Tree::x_FindMatchByName().

Variable Documentation

◆ kMallocOverhead

const size_t kMallocOverhead = 2*sizeof(void*)
static

◆ kMinGeneralStrDigits

const size_t kMinGeneralStrDigits = 3
static
Modified on Sun Mar 03 03:16:10 2024 by modify_doxy.py rev. 669887