NCBI C++ ToolKit
Functions
gencode_singleton.h File Reference

Defines the interface to interact with the genetic code singleton object. More...

#include <algo/blast/core/ncbi_std.h>
#include <algo/blast/core/blast_export.h>
+ Include dependency graph for gencode_singleton.h:
+ 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.

Functions

void GenCodeSingletonInit ()
 Initialize the genetic code singleton. More...
 
void GenCodeSingletonFini ()
 Uninitialize the genetic code singleton. More...
 
Int2 GenCodeSingletonAdd (Uint4 gen_code_id, const Uint1 *gen_code_str)
 Add a genetic code entry to the singleton. More...
 
Uint1GenCodeSingletonFind (Uint4 gen_code_id)
 Returns the genetic code string for the requested genetic code id. More...
 

Detailed Description

Defines the interface to interact with the genetic code singleton object.

Definition in file gencode_singleton.h.

Function Documentation

◆ GenCodeSingletonAdd()

Int2 GenCodeSingletonAdd ( Uint4  gen_code_id,
const Uint1 gen_code_str 
)

Add a genetic code entry to the singleton.

Parameters
gen_code_idgenetic code id [in]
gen_code_strgenetic code string [in]
Returns
0 if SUCCESS or already there, otherwise BLASTERR_MEMORY

Definition at line 56 of file gencode_singleton.c.

References ASSERT, DynamicSGenCodeNodeArray_Append(), g_theInstance, SGenCodeNode::gc_id, and SGenCodeNode::gc_str.

Referenced by CAutomaticGenCodeSingleton::AddGeneticCode(), BOOST_AUTO_TEST_CASE(), CAutomaticGenCodeSingleton::CAutomaticGenCodeSingleton(), SetupQueries_OMF(), and SetupSubjects_OMF().

◆ GenCodeSingletonFind()

Uint1* GenCodeSingletonFind ( Uint4  gen_code_id)

Returns the genetic code string for the requested genetic code id.

Parameters
gen_code_idgenetic code id [in]
Returns
the genetic code string or NULL if this genetic code was not added to the singleton
Note
it's the API layer's responsibility to add least add BLAST_GENETIC_CODE to the singleton (for backwards compatibility and to meet the engine's expectations)

Definition at line 66 of file gencode_singleton.c.

References ASSERT, DynamicSGenCodeNodeArray_Find(), and g_theInstance.

Referenced by CAutomaticGenCodeSingleton::AddGeneticCode(), BLAST_ComputeTraceback_MT(), BLAST_PreliminarySearchEngine(), Blast_RedoAlignmentCore_MT(), BOOST_AUTO_TEST_CASE(), CAutomaticGenCodeSingleton::CAutomaticGenCodeSingleton(), s_MatchingSequenceInitialize(), SetupQueries_OMF(), and SetupSubjects_OMF().

◆ GenCodeSingletonFini()

void GenCodeSingletonFini ( )

Uninitialize the genetic code singleton.

Definition at line 50 of file gencode_singleton.c.

References DynamicSGenCodeNodeArrayFree(), and g_theInstance.

Referenced by BOOST_AUTO_TEST_CASE(), and CAutomaticGenCodeSingleton::~CAutomaticGenCodeSingleton().

◆ GenCodeSingletonInit()

void GenCodeSingletonInit ( )

Initialize the genetic code singleton.

Note
this function is *NOT* thread safe, call it from the main thread
See also
CAutomaticGenCodeSingleton

Definition at line 41 of file gencode_singleton.c.

References ASSERT, DynamicSGenCodeNodeArrayNew(), g_theInstance, and NULL.

Referenced by BOOST_AUTO_TEST_CASE(), and CAutomaticGenCodeSingleton::CAutomaticGenCodeSingleton().

Modified on Mon May 27 04:40:21 2024 by modify_doxy.py rev. 669887