ARB
Functions
adChangeKey.cxx File Reference
#include <arbdbt.h>
#include <arb_global_defs.h>
#include "gb_local.h"
Include dependency graph for adChangeKey.cxx:

Go to the source code of this file.

Functions

GBDATAGBT_get_changekey (GBDATA *gb_main, const char *key, const char *change_key_path)
 
GB_TYPES GBT_get_type_of_changekey (GBDATA *gb_main, const char *field_name, const char *change_key_path)
 
static GB_ERROR gbt_set_type_of_changekey (GBDATA *gb_main, const char *field_name, GB_TYPES type, const char *change_key_path)
 
GBDATAGBT_searchOrCreate_itemfield_according_to_changekey (GBDATA *gb_item, const char *field_name, const char *change_key_path)
 
GB_ERROR GBT_add_new_changekey_to_keypath (GBDATA *gb_main, const char *name, GB_TYPES type, const char *keypath)
 
GB_ERROR GBT_add_new_species_changekey (GBDATA *gb_main, const char *name, GB_TYPES type)
 
GB_ERROR GBT_add_new_gene_changekey (GBDATA *gb_main, const char *name, GB_TYPES type)
 
GB_ERROR GBT_add_new_experiment_changekey (GBDATA *gb_main, const char *name, GB_TYPES type)
 
GB_ERROR GBT_add_new_changekey (GBDATA *gb_main, const char *name, int type)
 
GB_ERROR GBT_add_alignment_changekeys (GBDATA *gb_main, const char *ali)
 
static GB_ERROR write_int_converted (GBDATA *gbfield, const char *data, bool trimmed, size_t *rounded)
 
static GB_ERROR write_float_converted (GBDATA *gbfield, const char *data, bool trimmed)
 
GB_ERROR GBT_write_int_converted (GBDATA *gb_int_writable, const char *data, size_t *rounded)
 
GB_ERROR GBT_write_float_converted (GBDATA *gb_float_writable, const char *data)
 
GB_ERROR GBT_convert_changekey (GBDATA *gb_main, const char *name, GB_TYPES target_type)
 

Function Documentation

GBDATA* GBT_get_changekey ( GBDATA gb_main,
const char key,
const char change_key_path 
)
GB_TYPES GBT_get_type_of_changekey ( GBDATA gb_main,
const char field_name,
const char change_key_path 
)
static GB_ERROR gbt_set_type_of_changekey ( GBDATA gb_main,
const char field_name,
GB_TYPES  type,
const char change_key_path 
)
static
GBDATA* GBT_searchOrCreate_itemfield_according_to_changekey ( GBDATA gb_item,
const char field_name,
const char change_key_path 
)

search or create an item entry. If the entry exists, the result is identical to GB_search(gb_item, field_name, GB_FIND). If the entry does not exist, an entry with the type stored in the changekey-table will be created.

Returns
created itemfield or NULp in case of error (which is exported in that case)

Definition at line 61 of file adChangeKey.cxx.

References gb_assert, GB_clear_error(), GB_export_errorf(), GB_FIND, GB_get_root(), GB_have_error(), GB_NONE, GB_search(), GBT_get_type_of_changekey(), and type.

Referenced by calc_and_update_alignment_errors_cb(), mark_action(), mergeSimilarSpecies(), set_field_of_queried_cb(), and st_ml_add_quality_string_to_species().

GB_ERROR GBT_add_new_changekey_to_keypath ( GBDATA gb_main,
const char name,
GB_TYPES  type,
const char keypath 
)

Add a new or check an existing changekey for items using 'keypath'

Parameters
gb_maindatabase
namename of changekey. may be hierarchical (e.g. 'ali_16s/data')
typefield type of the key (yields error on mismatch!)
keypathlocation in database where changekeys are stored.
Returns
error

Definition at line 86 of file adChangeKey.cxx.

References ARB_strdup(), CHANGEKEY, CHANGEKEY_NAME, CHANGEKEY_TYPE, error(), gb_assert, GB_await_error(), GB_CREATE_CONTAINER, GB_create_container(), GB_DB, GB_first_non_key_char(), GB_search(), GBS_global_string(), GBT_get_changekey(), GBT_read_int(), GBT_write_int(), GBT_write_string(), and NULp.

Referenced by awt_string_handler::awar_changed(), field_create_cb(), GBT_add_new_experiment_changekey(), GBT_add_new_gene_changekey(), GBT_add_new_species_changekey(), prepare_and_get_selected_itemfield(), and SpeciesFlag::prepare_itemfield().

GB_ERROR GBT_add_new_species_changekey ( GBDATA gb_main,
const char name,
GB_TYPES  type 
)
GB_ERROR GBT_add_new_gene_changekey ( GBDATA gb_main,
const char name,
GB_TYPES  type 
)
GB_ERROR GBT_add_new_experiment_changekey ( GBDATA gb_main,
const char name,
GB_TYPES  type 
)
GB_ERROR GBT_add_new_changekey ( GBDATA gb_main,
const char name,
int  type 
)

Definition at line 145 of file adChangeKey.cxx.

References GBT_add_new_species_changekey().

GB_ERROR GBT_add_alignment_changekeys ( GBDATA gb_main,
const char ali 
)
static GB_ERROR write_int_converted ( GBDATA gbfield,
const char data,
bool  trimmed,
size_t rounded 
)
static

Definition at line 164 of file adChangeKey.cxx.

References error(), GB_write_int(), GBS_global_string(), GBS_trim(), and NULp.

Referenced by GBT_write_int_converted().

static GB_ERROR write_float_converted ( GBDATA gbfield,
const char data,
bool  trimmed 
)
static

Definition at line 201 of file adChangeKey.cxx.

References error(), GB_write_float(), GBS_global_string(), GBS_trim(), and NULp.

Referenced by GBT_write_float_converted().

GB_ERROR GBT_write_int_converted ( GBDATA gb_int_writable,
const char data,
size_t rounded 
)

Definition at line 224 of file adChangeKey.cxx.

References write_int_converted().

Referenced by GBT_convert_changekey().

GB_ERROR GBT_write_float_converted ( GBDATA gb_float_writable,
const char data 
)

Definition at line 228 of file adChangeKey.cxx.

References write_float_converted().

Referenced by GBT_convert_changekey().

GB_ERROR GBT_convert_changekey ( GBDATA gb_main,
const char name,
GB_TYPES  target_type 
)