ARB
Classes | Macros | Functions | Variables
adquery.cxx File Reference
#include "gb_aci.h"
#include "gb_comm.h"
#include "gb_index.h"
#include "gb_key.h"
#include "gb_localdata.h"
#include "gb_ta.h"
#include <algorithm>
#include <arb_strbuf.h>
#include <arb_match.h>
#include <cctype>
Include dependency graph for adquery.cxx:

Go to the source code of this file.

Classes

class  keychar_table
 

Macros

#define GB_PATH_MAX   1024
 
#define BUFFERSIZE   1024
 

Functions

static void build_GBDATA_path (GBDATA *gbd, char **buffer)
 
static const charGB_get_GBDATA_path (GBDATA *gbd)
 
static bool gb_find_value_equal (GBDATA *gb, GB_TYPES type, const char *val, GB_CASE case_sens)
 
static GBDATAfind_sub_by_quark (GBCONTAINER *father, GBQUARK key_quark, GB_TYPES type, const char *val, GB_CASE case_sens, GBDATA *after, size_t skip_over)
 
GBDATAGB_find_sub_by_quark (GBDATA *father, GBQUARK key_quark, GBDATA *after, size_t skip_over)
 
static GBDATAGB_find_subcontent_by_quark (GBDATA *father, GBQUARK key_quark, GB_TYPES type, const char *val, GB_CASE case_sens, GBDATA *after, size_t skip_over)
 
static GBDATAfind_sub_sub_by_quark (GBCONTAINER *const father, const char *key, GBQUARK sub_key_quark, GB_TYPES type, const char *val, GB_CASE case_sens, GBDATA *after)
 
static GBDATAgb_find_internal (GBDATA *gbd, const char *key, GB_TYPES type, const char *val, GB_CASE case_sens, GB_SEARCH_TYPE gbs)
 
GBDATAGB_find (GBDATA *gbd, const char *key, GB_SEARCH_TYPE gbs)
 
GBDATAGB_find_string (GBDATA *gbd, const char *key, const char *str, GB_CASE case_sens, GB_SEARCH_TYPE gbs)
 
NOT4PERL GBDATAGB_find_int (GBDATA *gbd, const char *key, long val, GB_SEARCH_TYPE gbs)
 
GBDATAGB_child (GBDATA *father)
 
GBDATAGB_nextChild (GBDATA *child)
 
GBDATAGB_entry (GBDATA *father, const char *key)
 
GBDATAGB_nextEntry (GBDATA *entry)
 
GBDATAGB_followingEntry (GBDATA *entry, size_t skip_over)
 
size_t GB_countEntries (GBDATA *father, const char *key)
 
GBDATAGB_brother (GBDATA *entry, const char *key)
 
GBDATAgb_find_by_nr (GBCONTAINER *father, int index)
 
const charGB_first_non_key_char (const char *str)
 
GBDATAfind_or_create (GBCONTAINER *gb_parent, const char *key, GB_TYPES create, bool internflag)
 
GBDATAgb_search (GBCONTAINER *gbc, const char *key, GB_TYPES create, int internflag)
 
GBDATAGB_search (GBDATA *gbd, const char *fieldpath, GB_TYPES create)
 
static GBDATAgb_expect_type (GBDATA *gbd, GB_TYPES expected_type, const char *fieldname)
 
GBDATAGB_searchOrCreate_string (GBDATA *gb_container, const char *fieldpath, const char *default_value)
 
GBDATAGB_searchOrCreate_int (GBDATA *gb_container, const char *fieldpath, long default_value)
 
GBDATAGB_searchOrCreate_float (GBDATA *gb_container, const char *fieldpath, float default_value)
 
static GBDATAgb_search_marked (GBCONTAINER *gbc, GBQUARK key_quark, int firstindex, size_t skip_over)
 
long GB_number_of_marked_subentries (GBDATA *gbd)
 
GBDATAGB_first_marked (GBDATA *gbd, const char *keystring)
 
GBDATAGB_following_marked (GBDATA *gbd, const char *keystring, size_t skip_over)
 
GBDATAGB_next_marked (GBDATA *gbd, const char *keystring)
 

Variables

static keychar_table keychars
 

Macro Definition Documentation

#define GB_PATH_MAX   1024

Definition at line 24 of file adquery.cxx.

#define BUFFERSIZE   1024

Definition at line 42 of file adquery.cxx.

Referenced by GB_get_GBDATA_path().

Function Documentation

static void build_GBDATA_path ( GBDATA gbd,
char **  buffer 
)
static

Definition at line 26 of file adquery.cxx.

References buffer, GB_FATHER(), and GB_KEY().

Referenced by GB_get_GBDATA_path().

static const char* GB_get_GBDATA_path ( GBDATA gbd)
static

Definition at line 44 of file adquery.cxx.

References ARB_alloc(), assert_or_exit, buffer, BUFFERSIZE, build_GBDATA_path(), and NULp.

Referenced by find_sub_by_quark().

static bool gb_find_value_equal ( GBDATA gb,
GB_TYPES  type,
const char val,
GB_CASE  case_sens 
)
static
static GBDATA* find_sub_by_quark ( GBCONTAINER father,
GBQUARK  key_quark,
GB_TYPES  type,
const char val,
GB_CASE  case_sens,
GBDATA after,
size_t  skip_over 
)
static
GBDATA* GB_find_sub_by_quark ( GBDATA father,
GBQUARK  key_quark,
GBDATA after,
size_t  skip_over 
)
static GBDATA* GB_find_subcontent_by_quark ( GBDATA father,
GBQUARK  key_quark,
GB_TYPES  type,
const char val,
GB_CASE  case_sens,
GBDATA after,
size_t  skip_over 
)
static

Definition at line 178 of file adquery.cxx.

References after(), GBDATA::expect_container(), find_sub_by_quark(), and type.

Referenced by find_sub_sub_by_quark(), and gb_find_internal().

static GBDATA* find_sub_sub_by_quark ( GBCONTAINER *const  father,
const char key,
GBQUARK  sub_key_quark,
GB_TYPES  type,
const char val,
GB_CASE  case_sens,
GBDATA after 
)
static
static GBDATA* gb_find_internal ( GBDATA gbd,
const char key,
GB_TYPES  type,
const char val,
GB_CASE  case_sens,
GB_SEARCH_TYPE  gbs 
)
static
GBDATA* GB_find ( GBDATA gbd,
const char key,
GB_SEARCH_TYPE  gbs 
)
GBDATA* GB_find_string ( GBDATA gbd,
const char key,
const char str,
GB_CASE  case_sens,
GB_SEARCH_TYPE  gbs 
)
NOT4PERL GBDATA* GB_find_int ( GBDATA gbd,
const char key,
long  val,
GB_SEARCH_TYPE  gbs 
)

Definition at line 311 of file adquery.cxx.

References GB_CASE_UNDEFINED, gb_find_internal(), and GB_INT.

Referenced by gbcms_talking_find().

GBDATA* GB_child ( GBDATA father)
GBDATA* GB_nextChild ( GBDATA child)
GBDATA* GB_entry ( GBDATA father,
const char key 
)

Definition at line 334 of file adquery.cxx.

References GB_find(), and SEARCH_CHILD.

Referenced by ALI_translate_marked(), apply_command_to_alignment(), arb_prm_read(), awt_add_sequences_to_list(), awt_open_ACI_URL_with_item(), AWTC_pars_names(), AWTC_recreate_name(), AWTI_import_set_ali_and_type(), FieldReader::calc_value(), ColumnStat::calculate(), CheckedConsistencies::CheckedConsistencies(), cmpByKey(), collectKeysRegisteredInDatabase(), compress_sequence_tree(), concatenateFieldsCreateNewSpecies(), config_comment_changed_cb(), config_modified_cb(), count_field_occurrence(), Data::Data(), FoundGroup::delete_from_DB(), delete_kept_ghostnodes(), delete_unused_changekeys(), DI_ENTRY::DI_ENTRY(), disexpectField(), do_hide_command_for_one_species(), do_mark_command_for_one_species(), ED4_getSaiColorString(), edit_SAI_description(), EXP_first_experiment_rel_exp_data(), expect_entry(), expectField(), export_tree_node_print_xml(), Itemfield_Selection::fill(), ALI_selection::fill(), EDB_root_bact::fill_data(), fillSelNamList(), find_group_name_entry(), find_or_create(), findAffectedKeys(), Structure3D::FindTypeOfRNA(), flush_taxonomy_if_new_group_cb(), GroupSearch::fold_found_groups(), CheckedConsistencies::forgetDoneChecks(), gb_convert_V2_to_V3(), gb_copy_explicit(), GB_countEntries(), gb_load_dictionary_data(), gb_load_key_data_and_dictionaries(), gb_load_single_key_data(), gb_resort_system_folder_to_top(), gb_save_dictionary_data(), gb_search_system_folder(), gbl_read_seq_sai_or_species(), GBT_add_data(), GBT_check_alignment(), GBT_check_data(), GBT_commit_rename_session(), GBT_convert_changekey(), GBT_count_alignments(), GBT_find_or_create(), GBT_find_sequence(), GBT_find_tree(), GBT_first_SAI(), GBT_first_SAI_rel_SAI_data(), GBT_first_species(), GBT_first_species_rel_species_data(), GBT_gen_accession_number(), GBT_get_alignment_names(), GBT_get_color_group(), GBT_get_colorset_names(), GBT_get_configuration_names(), GBT_get_item_count(), GBT_get_name(), GBT_is_partial(), GBT_read_tree_and_size(), gbt_read_tree_rek(), gbt_rename_alignment_of_item(), GBT_rename_species(), GBT_set_color_group(), GBT_size_of_tree(), GBT_tree_info_string(), gbt_write_tree(), gde_filter_weights(), GEN_create_nds_vars(), gen_extract_gene_2_pseudoSpecies(), GEN_first_gene(), GEN_first_gene_rel_gene_data(), GEN_is_genome_db(), GEN_is_organism(), GEN_make_node_text_init(), GEN_make_node_text_nds(), GEN_origin_gene(), GEN_origin_organism(), GEN_read_position(), GEN_root::GEN_root(), GEN_species_add_entry(), GEN_testAndRemoveTranslations(), GEN_write_position(), probe_input_data::get_acc(), get_cached_taxonomy(), probe_input_data::get_checksum(), probe_input_data::get_fullname(), probe_input_data::get_geneabspos(), Group::get_name(), RefEntries::RefSelector::get_refs(), ALI_ARBDB::get_SAI(), get_SAI_description(), get_SAI_id(), ALI_ARBDB::get_sequence(), ALI_ARBDB::get_sequence_string(), probe_input_data::get_shortname(), get_species_id(), probe_input_data::get_start(), probe_input_data::get_stop(), get_taxonomy(), get_tree_idx(), FoundGroup::get_tree_order(), PosGene::getName(), PosGene::getType(), group_awar_changed_cb(), group_is_folded(), group_set_folded(), ArbImporter::import_data(), NodeTextBuilder::init(), FieldTransfer::ItemClonedByRuleSet::ItemClonedByRuleSet(), KeySorter::KeySorter(), PHDATA::load(), main(), map_viewkey(), map_viewkeys(), Structure3D::MapCurrentSpeciesToEcoliTemplate(), mark_gene_species_using_current_alignment(), MERGE_sequences_simple(), mergeSimilarSpecies(), MG_create_field_content(), MG_transfer_fields_info(), nds_delete_database_entries(), nds_maintain_viewkeys(), new_gbt_message_created_cb(), no_data_error(), nt_build_conf_string_rek(), NT_convert_gene_locations(), NT_count_different_chars(), NT_create_sai_from_pfold(), NT_del_mark_move_REF(), NT_fix_gene_data(), NT_format_all_alignments(), NT_importValidNames(), nt_rename_configuration(), nt_species_join(), NT_suggestValidNames(), parseCSV(), pd_get_the_gene_names(), pd_get_the_names(), PG_get_first_probe(), PG_initSpeciesMaps(), probe_input_data::preload_rel2abs(), probe_match_event(), PS_detect_probe_length(), PS_extract_probe_data(), PS_get_first_node(), PS_get_probe_for_path(), PS_print_paths(), PT_init_map(), PT_prepare_species_sequence(), read_tree_and_size_internal(), readACC(), remove_dup_colors(), remove_redundant_translation(), FoundGroup::rename_by_ACI(), DBwriter::renumberDuplicateGenes(), reorder_trees_cb(), GBT_config::saveAsOver(), ItemFieldShader::scan_value_range_cb(), SearchedTree::SearchedTree(), selected_config_changed_cb(), SequenceHandler::SequenceHandler(), set_SAI_group(), set_tree_idx(), show_all_changekeys(), species_rename_join(), split_alignment(), SQ_evaluate(), SQ_mark_species(), SQ_pass1(), SQ_pass1_no_tree(), SQ_pass2(), SQ_pass2_no_tree(), st_remove_entries(), AWT_graphic_tree::toggle_group(), trackAlignmentChanges(), translate_getInfo(), translate_removeInfo(), TranslateGeneToAminoAcidSequence(), translateSAItoColors(), tree_node_deleted_cb(), tree_read_byte(), tree_read_float(), tree_write_byte(), tree_write_float(), TREE_write_Newick(), TREE_write_XML(), UniqueNameDetector::UniqueNameDetector(), NodeTextBuilder::work(), write_entry(), SpecSetRegistry::write_node_information(), writeHistory(), and FieldTransfer::ItemClonedByRuleSet::~ItemClonedByRuleSet().

GBDATA* GB_nextEntry ( GBDATA entry)
GBDATA* GB_followingEntry ( GBDATA entry,
size_t  skip_over 
)

Definition at line 344 of file adquery.cxx.

References GB_FATHER(), GB_find_sub_by_quark(), and GB_get_quark().

size_t GB_countEntries ( GBDATA father,
const char key 
)

Definition at line 351 of file adquery.cxx.

References GB_entry(), and GB_nextEntry().

GBDATA* GB_brother ( GBDATA entry,
const char key 
)
GBDATA* gb_find_by_nr ( GBCONTAINER father,
int  index 
)
const char* GB_first_non_key_char ( const char str)
GBDATA* find_or_create ( GBCONTAINER gb_parent,
const char key,
GB_TYPES  create,
bool  internflag 
)
inline
GBDATA* gb_search ( GBCONTAINER gbc,
const char key,
GB_TYPES  create,
int  internflag 
)
GBDATA* GB_search ( GBDATA gbd,
const char fieldpath,
GB_TYPES  create 
)

Definition at line 531 of file adquery.cxx.

References GBDATA::expect_container(), and gb_search().

Referenced by alignment_vars_callback(), AliApplicable::apply_to_alignment(), ARB_main(), FINAL_TYPE< SEQTYPE >::ArbWriter(), AW_awar::AW_awar(), AW_forget_all_window_geometry(), AW_reactivate_all_questions(), awt_string_handler::awar_changed(), awar_updated_cb(), awt_create_CONFIG_selection_list(), awt_create_select_filter(), awt_create_select_filter_window_aw_cb(), AWT_default_protein_type(), AWT_modify_managed_configs(), awtc_nn_search_all_listed(), FieldSelDef::build_sel(), FieldReader::calc_value(), ED4_terminal::changed_by_database(), checkAndMergeFields(), CheckedConsistencies::CheckedConsistencies(), collectKeysRegisteredInDatabase(), compress_sequence_tree(), CON_export(), config_rename_handler(), create_new_species(), create_ref_hash(), createDataFromConsensus(), createGroupFromSelected(), dbserver_container(), AP_pos_var::delete_aliEntry_from_SAI(), delete_unused_changekeys(), DI_create_matrix_variables(), ensure_trees_have_order(), AWT_configuration::erase_deleted_configs(), MacroRecorder::execute(), EXP_get_experiment_data(), experiment_rename_handler(), FastAligner_delete_temp_entries(), field_delete_cb(), filter_columnstat_SAIs(), filter_loadable_SAIs(), filter_posvar_SAI_for_ali(), find_or_create_error_container(), findOrCreate_configuration(), flush_taxonomy_cb(), CheckedConsistencies::forgetDoneChecks(), GB_clear_macro_error(), gb_convert_V2_to_V3(), GB_get_macro_error(), gb_load_single_key_data(), gb_read_ascii_beyond_header(), gb_search_system_folder(), GB_searchOrCreate_float(), GB_searchOrCreate_int(), GB_searchOrCreate_string(), gbs_build_replace_string(), GBT_add_data(), GBT_add_new_changekey_to_keypath(), GBT_colorset_root(), GBT_find_configuration(), GBT_get_changekey(), GBT_get_configuration_names(), GBT_open(), GBT_read_as_string(), GBT_read_char_pntr(), GBT_read_float(), GBT_read_int(), GBT_read_string(), GBT_read_tree_and_size(), GBT_searchOrCreate_itemfield_according_to_changekey(), gbt_wait_for_remote_action(), GBT_write_byte(), GBT_write_float(), GBT_write_int(), GBT_write_name_to_groupData(), GBT_write_string(), gbt_write_tree(), gbt_write_tree_nodes(), GEN_create_nds_vars(), GEN_expect_gene_data(), GEN_find_gene_data(), GEN_findOrCreate_gene_data(), GEN_make_node_text_init(), GEN_make_node_text_nds(), GEN_write_position(), gene_rename_handler(), get_addid(), AWT_configuration::get_config(), FINAL_TYPE< SEQTYPE >::get_first_field(), FoundGroup::get_name(), get_next_SAI_count(), GetDisplayInfo(), getKnownMacroClients(), group_species(), NodeTextBuilder::init(), ED4_root::init_alignment(), init_tmp_branch(), awt_input_handler::link_to(), AW_awar::make_global(), DbScanner::Map(), map_viewkeys(), mark_as_macro_executor(), MERGE_sequences_simple(), mg_check_field_cb(), MG_config_delete_cb(), MG_create_db_dependent_rename_awars(), MG_transfer_config(), MG_transfer_fields_info(), modify_fields_of_queried_cb(), SEC_structure_toggler::name(), nds_delete_database_entries(), nds_maintain_viewkeys(), nt_build_sai_string(), NT_create_alignment_vars(), NT_create_sai_from_pfold(), NT_deleteValidNames(), NT_fix_dict_compress(), NT_format_all_alignments(), NT_suggestValidNames(), pars_create_all_awars(), pd_get_the_gene_names(), PH_create_ml_multiline_SAI(), PH_save_ml_cb(), probe_match_event(), PT_prepare_data(), ALI_ARBDB::put_sequence(), ALI_ARBDB::put_sequence_string(), ArbImporter::read_data(), FieldTransfer::ReadRule::readFrom(), CheckedConsistencies::register_as_performed(), RegFieldSelection::registrate(), reorder_keys(), reorder_up_down(), AP_pos_var::save_aliEntry_to_SAI(), ItemFieldShader::scan_value_range_cb(), QUERY::search_duplicated_field_content(), SEC_db_interface::SEC_db_interface(), SEC_seq_data::SEC_seq_data(), SEC_structure_toggler::SEC_structure_toggler(), selectValidNameFromList(), AWT_configuration::set_config(), set_field_of_queried_cb(), set_protection_of_queried_cb(), setIntEntryToZero(), show_all_changekeys(), AWT_graphic_tree::show_ruler(), species_rename_cb(), species_rename_handler(), SQ_helix::SQ_calc_helix_layout(), SQ_physical_layout::SQ_calc_physical_layout(), SQ_ambiguities::SQ_count_ambiguities(), SQ_evaluate(), SQ_mark_species(), SQ_pass1(), SQ_pass1_no_tree(), SQ_pass2(), SQ_pass2_no_tree(), SQ_remove_quality_entries(), transfer_field_of_listed_cb(), transfer_field_of_selected_cb(), transfer_single_field(), TreeAdmin::tree_append_remark(), TREE_install_update_callbacks(), tree_vars_callback(), wait_for_dbentry(), NodeTextBuilder::work(), writeStringToAlignment(), and FieldTransfer::WriteRule::writeTo().

static GBDATA* gb_expect_type ( GBDATA gbd,
GB_TYPES  expected_type,
const char fieldname 
)
static
GBDATA* GB_searchOrCreate_string ( GBDATA gb_container,
const char fieldpath,
const char default_value 
)
GBDATA* GB_searchOrCreate_int ( GBDATA gb_container,
const char fieldpath,
long  default_value 
)
GBDATA* GB_searchOrCreate_float ( GBDATA gb_container,
const char fieldpath,
float  default_value 
)
static GBDATA* gb_search_marked ( GBCONTAINER gbc,
GBQUARK  key_quark,
int  firstindex,
size_t  skip_over 
)
static
long GB_number_of_marked_subentries ( GBDATA gbd)
GBDATA* GB_first_marked ( GBDATA gbd,
const char keystring 
)
GBDATA* GB_following_marked ( GBDATA gbd,
const char keystring,
size_t  skip_over 
)
GBDATA* GB_next_marked ( GBDATA gbd,
const char keystring 
)

Variable Documentation

keychar_table keychars
static

Definition at line 414 of file adquery.cxx.