ARB
|
#include "NT_local.h"
#include "ad_trees.h"
#include <TreeNode.h>
#include <TreeDisplay.hxx>
#include <RegExpr.hxx>
#include <awt_sel_boxes.hxx>
#include <awt_misc.hxx>
#include <awt_config_manager.hxx>
#include <awt_modules.hxx>
#include <aw_awars.hxx>
#include <aw_root.hxx>
#include <aw_msg.hxx>
#include <aw_select.hxx>
#include <ad_config.h>
#include <ad_cb_prot.h>
#include <arb_global_defs.h>
#include <map>
#include <set>
#include <string>
Go to the source code of this file.
Classes | |
class | FINAL_TYPE< SEQTYPE > |
xml element More... | |
struct | ConfigModifier |
class | ConfigRenamer |
class | ConfigDeleter |
class | Store_species |
struct | SAI_string_builder |
Macros | |
#define | AWAR_CL_SELECTED_CONFIGS "configuration_data/win%i/selected" |
#define | AWAR_CL_DISPLAY_CONFIG_MARKERS "configuration_data/win%i/display" |
#define | AWAR_CONFIG_COMMENT "tmp/configuration/comment" |
#define | CONFIG_SEPARATOR "\1" |
#define | CONFIG_BASE_PATH "/configuration_data/configuration" |
#define | MANAGED_CONFIGSET_SECTION "configmarkers" |
#define | MANAGED_CONFIGSET_ENTRY "selected_configs" |
Typedefs | |
typedef map< string, string > | ConfigHits |
Enumerations | |
enum | extractType { CONF_EXTRACT, CONF_MARK, CONF_UNMARK, CONF_INVERT, CONF_COMBINE } |
enum | ConfigCreation { BY_CALLING_THE_EDITOR, FROM_IMPORTER, FROM_MANAGER } |
Variables | |
static AW_selection * | selected_configs_list [MAX_NT_WINDOWS] = { MAX_NT_WINDOWS_NULLINIT } |
static bool | allow_selection2awar_update = true |
static bool | allow_to_activate_display = false |
const char | CFG_SEP = 1 |
#define AWAR_CL_SELECTED_CONFIGS "configuration_data/win%i/selected" |
Definition at line 40 of file NT_edconf.cxx.
Referenced by get_config_awar(), NT_activate_configMarkers_display(), and write_configs_to_awar().
#define AWAR_CL_DISPLAY_CONFIG_MARKERS "configuration_data/win%i/display" |
Definition at line 41 of file NT_edconf.cxx.
Referenced by get_display_toggle_awar(), and NT_activate_configMarkers_display().
#define AWAR_CONFIG_COMMENT "tmp/configuration/comment" |
Definition at line 43 of file NT_edconf.cxx.
Referenced by clear_comment_cb(), config_comment_changed_cb(), create_configuration_admin_window(), init_config_admin_awars(), nt_create_configuration(), and selected_config_changed_cb().
#define CONFIG_SEPARATOR "\1" |
Definition at line 133 of file NT_edconf.cxx.
Referenced by correct_managed_configsets_cb(), get_selected_configs_from_awar(), and write_configs_to_awar().
#define CONFIG_BASE_PATH "/configuration_data/configuration" |
Definition at line 241 of file NT_edconf.cxx.
Referenced by install_config_change_callbacks().
#define MANAGED_CONFIGSET_SECTION "configmarkers" |
Definition at line 269 of file NT_edconf.cxx.
Referenced by create_configuration_marker_window(), and modify_configurations().
#define MANAGED_CONFIGSET_ENTRY "selected_configs" |
Definition at line 270 of file NT_edconf.cxx.
Referenced by correct_managed_configsets_cb(), and setup_configmarker_config_cb().
typedef map<string, string> ConfigHits |
Definition at line 54 of file NT_edconf.cxx.
enum extractType |
Enumerator | |
---|---|
CONF_EXTRACT | |
CONF_MARK | |
CONF_UNMARK | |
CONF_INVERT | |
CONF_COMBINE |
Definition at line 45 of file NT_edconf.cxx.
enum ConfigCreation |
Enumerator | |
---|---|
BY_CALLING_THE_EDITOR | |
FROM_IMPORTER | |
FROM_MANAGER |
Definition at line 839 of file NT_edconf.cxx.
|
static |
Definition at line 737 of file NT_edconf.cxx.
References aw_message(), aw_message_if(), AW_root::awar(), AWAR_CONFIGURATION, AWAR_TREE_REFRESH, CI_END_OF_CONFIG, CI_SPECIES, CONF_COMBINE, CONF_EXTRACT, CONF_INVERT, CONF_MARK, CONF_UNMARK, error(), NT_global::gb_main, GB_read_flag(), GB_write_flag(), GBS_free_hash(), GBS_global_string(), GBS_hash_elements(), GBS_read_hash(), GBT_create_marked_species_hash(), GBT_find_species(), GBT_mark_all(), GLOBAL, GBT_config_item::name, GBT_config_parser::nextItem(), NO_CONFIG_SELECTED, nt_assert, NULp, AW_awar::read_string(), AW_root::SINGLETON, ta, AW_awar::touch(), and GBT_config_item::type.
Referenced by create_configuration_admin_window(), and FINAL_TYPE< SEQTYPE >::handle_click().
|
inline |
Definition at line 131 of file NT_edconf.cxx.
References md.
Referenced by selected_configs_awar_changed_cb().
Definition at line 135 of file NT_edconf.cxx.
References AW_root::awar_no_error(), GBS_global_string(), and AW_root::SINGLETON.
Referenced by get_config_awar(), and get_display_toggle_awar().
Definition at line 138 of file NT_edconf.cxx.
References AWAR_CL_SELECTED_CONFIGS, and get_canvas_awar().
Referenced by config_modified_cb(), get_selected_configs_from_awar(), and setup_configmarker_config_cb().
Definition at line 139 of file NT_edconf.cxx.
References AWAR_CL_DISPLAY_CONFIG_MARKERS, and get_canvas_awar().
Referenced by create_configuration_marker_window(), and selected_configs_awar_changed_cb().
|
static |
Definition at line 141 of file NT_edconf.cxx.
References CONFIG_SEPARATOR, GBT_splitNdestroy_string(), get_config_awar(), AW_awar::read_string(), and SPLIT_DROPEMPTY.
Referenced by config_modified_cb(), create_configuration_marker_window(), modify_configurations(), and selected_configs_awar_changed_cb().
|
static |
Definition at line 153 of file NT_edconf.cxx.
References AW_root::awar(), AWAR_CL_SELECTED_CONFIGS, CONFIG_SEPARATOR, GBS_global_string(), GBT_join_strings(), AW_root::SINGLETON, and AW_awar::write_string().
Referenced by configs_selectionlist_changed_cb(), and modify_configurations().
|
static |
Definition at line 165 of file NT_edconf.cxx.
References AWAR_CONFIGURATION, AW_root::awar_string(), DEFAULT_CONFIGURATION, NT_global::gb_main, and GLOBAL.
Referenced by init_config_admin_awars(), nt_create_config_after_import(), NT_create_startEditorOnOldConfiguration_window(), NT_start_editor_on_tree(), and selected_configs_awar_changed_cb().
|
static |
Definition at line 168 of file NT_edconf.cxx.
References allow_selection2awar_update, allow_to_activate_display, AW_root::awar(), AWAR_TREE_REFRESH, awt_set_subset_selection_content(), displays_config_markers(), DOWNCAST, CharPtrArray::empty(), AWT_canvas::gb_main, get_display_toggle_awar(), TREE_canvas::get_index(), AWT_graphic_tree::get_marker_display(), get_selected_configs_from_awar(), AWT_canvas::gfx, AWT_graphic_tree::hide_marker_display(), init_config_awars(), AW_awar::read_int(), AWT_graphic_tree::set_marker_display(), AW_root::SINGLETON, and AW_awar::touch().
Referenced by NT_activate_configMarkers_display(), and selected_configs_display_awar_changed_cb().
|
static |
Definition at line 200 of file NT_edconf.cxx.
References allow_to_activate_display, and selected_configs_awar_changed_cb().
Referenced by NT_activate_configMarkers_display().
|
static |
Definition at line 205 of file NT_edconf.cxx.
References allow_selection2awar_update, allow_to_activate_display, AW_selection::get_values(), and write_configs_to_awar().
Referenced by create_configuration_marker_window().
|
static |
Definition at line 215 of file NT_edconf.cxx.
References GB_entry(), GB_get_father(), GB_read_char_pntr(), GB_time_of_day(), get_config_awar(), get_selected_configs_from_awar(), MAX_NT_WINDOWS, NULp, CharPtrArray::size(), and AW_awar::touch().
Referenced by install_config_change_callbacks().
|
static |
Definition at line 243 of file NT_edconf.cxx.
References ASSERT_NO_ERROR, CONFIG_BASE_PATH, config_modified_cb(), GB_add_hierarchy_callback(), and GB_CB_CHANGED.
Referenced by NT_activate_configMarkers_display().
void NT_activate_configMarkers_display | ( | TREE_canvas * | ntw | ) |
Definition at line 254 of file NT_edconf.cxx.
References AW_awar::add_callback(), AWAR_CL_DISPLAY_CONFIG_MARKERS, AWAR_CL_SELECTED_CONFIGS, AW_root::awar_int(), AW_root::awar_string(), AWT_canvas::awr, gb_main, AWT_canvas::gb_main, GBS_global_string(), TREE_canvas::get_index(), install_config_change_callbacks(), selected_configs_awar_changed_cb(), selected_configs_display_awar_changed_cb(), and AW_awar::touch().
Referenced by popup_new_main_window().
|
static |
Definition at line 272 of file NT_edconf.cxx.
References AWT_config_definition::add(), AW_awar::awar_name, get_config_awar(), MANAGED_CONFIGSET_ENTRY, and nt_assert.
Referenced by create_configuration_marker_window().
|
static |
Definition at line 323 of file NT_edconf.cxx.
References ARB_strdup(), CONFIG_SEPARATOR, GBT_join_strings(), GBT_split_string(), MANAGED_CONFIGSET_ENTRY, ConfigModifier::modifyConfig(), NULp, and SPLIT_DROPEMPTY.
Referenced by modify_configurations().
|
static |
Definition at line 335 of file NT_edconf.cxx.
References AWT_modify_managed_configs(), correct_managed_configsets_cb(), NT_global::gb_main, get_selected_configs_from_awar(), GLOBAL, MANAGED_CONFIGSET_SECTION, MAX_NT_WINDOWS, ConfigModifier::modifyConfig(), and write_configs_to_awar().
Referenced by configuration_deleted_cb(), and configuration_renamed_cb().
Definition at line 347 of file NT_edconf.cxx.
References modify_configurations().
Referenced by nt_rename_configuration().
|
static |
Definition at line 348 of file NT_edconf.cxx.
References modify_configurations().
Referenced by nt_delete_configuration().
|
static |
Definition at line 350 of file NT_edconf.cxx.
References allow_selection2awar_update, AW_POPDOWN(), AWAR_CONFIGURATION, awt_create_CONFIG_selection_list(), awt_create_subset_selection_list(), AWT_insert_config_manager(), awt_set_subset_selection_content(), configs_selectionlist_changed_cb(), NT_global::gb_main, GBS_global_string(), get_display_toggle_awar(), TREE_canvas::get_index(), get_selected_configs_from_awar(), AW_selection::get_sellist(), GLOBAL, makeHelpCallback(), MANAGED_CONFIGSET_SECTION, setup_configmarker_config_cb(), and TREE_create_marker_settings_window().
Referenced by create_configuration_admin_window().
|
static |
Definition at line 434 of file NT_edconf.cxx.
References TreeNode::gb_node, GB_read_flag(), GB_write_flag(), and nt_assert.
Referenced by nt_create_configuration().
|
static |
Definition at line 441 of file NT_edconf.cxx.
References add(), TreeNode::gb_node, GB_read_flag(), GB_write_flag(), and nt_assert.
Referenced by nt_build_conf_string_rek().
Definition at line 452 of file NT_edconf.cxx.
References TreeNode::is_leaf(), and nt_assert.
Referenced by left_neighbour_leaf().
Definition at line 461 of file NT_edconf.cxx.
References father, TreeNode::gb_node, TreeNode::is_leaf(), nt_assert, NULp, rightmost_leaf(), and TreeNode::rightson.
Referenced by nt_build_conf_string_rek().
|
static |
Builds a configuration string from a tree.
used | all species inserted by this function are stored here |
tree | used for group information |
memfile | generated configuration string is stored here |
extra_marked_species | all extra marked species are inserted here |
use_species_aside | number of species to mark left and right of marked species |
auto_mark | number species to extra-mark (if not already marked) |
marked_at_left | number of species which were marked (looking to left) |
marked_at_right | number of species which are marked (when returning from recursion) |
Part : '' ( Group | Species | Sai )
Group : ( OpenedGroup | ClosedGroup ) OpenedGroup : 'G' GroupDef ClosedGroup : 'F' GroupDef GroupDef : 'groupname' [PART]* EndGroup EndGroup : ''
SPECIES : 'L' 'speciesname' SAI : 'S' 'sainame'
\0 : ASCII 0 (eos) : ASCII 1
Definition at line 482 of file NT_edconf.cxx.
References add(), GBS_strstruct::cat(), GBS_strstruct::cut_tail(), GB_entry(), TreeNode::gb_node, GB_read_byte(), GB_read_flag(), GBS_write_hash(), GBS_strstruct::get_position(), Store_species::getNode(), TreeNode::is_leaf(), left_neighbour_leaf(), mark_species(), TreeNode::name, nt_assert, NULp, GBS_strstruct::put(), Store_species::remove(), tree, and UNCOVERED.
Referenced by nt_create_configuration().
Definition at line 624 of file NT_edconf.cxx.
References GBS_strstruct::cat(), SAI_string_builder::last_group_name, GBS_strstruct::ncat(), GBS_strstruct::put(), and SAI_string_builder::sai_middle.
Referenced by nt_build_sai_string().
|
static |
Definition at line 648 of file NT_edconf.cxx.
References ARB_strdup(), GBS_strstruct::cat(), GB_FIND, GB_IGNORE_CASE, GB_number_of_subentries(), GB_read_string(), GB_search(), GBS_create_hash(), GBS_free_hash(), GBS_hash_do_const_sorted_loop(), GBS_HCF_sortedByKey(), GBS_write_hash(), GBT_find_SAI_rel_SAI_data(), GBT_first_SAI_rel_SAI_data(), GBT_get_SAI_data(), GBT_next_SAI(), GBT_split_string(), SAI_string_builder::last_group_name, nt_build_sai_string_by_hash(), NULp, GBS_strstruct::put(), s, CharPtrArray::size(), and SPLIT_DROPEMPTY.
Referenced by nt_create_configuration().
|
static |
Definition at line 716 of file NT_edconf.cxx.
References GBS_strstruct::cat(), GBS_read_hash(), GBT_first_marked_species(), GBT_next_marked_species(), GBT_read_string(), and GBS_strstruct::put().
Referenced by nt_create_configuration().
|
static |
Definition at line 817 of file NT_edconf.cxx.
References aw_message(), AW_root::awar(), AWAR_CONFIGURATION, GB_transaction::close(), configuration_deleted_cb(), error(), GB_delete(), NT_global::gb_main, GBT_find_configuration(), AW_window::get_root(), AW_selection::get_sellist(), GLOBAL, AW_selection_list::move_selection(), AW_awar::read_string(), and ta.
Referenced by create_configuration_admin_window().
|
static |
Definition at line 845 of file NT_edconf.cxx.
References aw_input(), AW_root::awar(), AWAR_CONFIG_COMMENT, AWAR_CONFIGURATION, AWAR_TOPAREA_SAIS, AWAR_TREE_NAME, BY_CALLING_THE_EDITOR, Store_species::call(), error(), GBT_config::exists(), FROM_IMPORTER, FROM_MANAGER, NT_global::gb_main, GB_MIND_CASE, GBS_create_hash(), GBS_free_hash(), GBS_global_string(), GBS_log_action_to(), GBT_get_species_count(), GBT_config::get_comment(), GBS_strstruct::get_data(), GBS_strstruct::get_position(), GLOBAL, implicated, GBT_config::MIDDLE_AREA, GBS_strstruct::ncat(), nt_assert, nt_build_conf_marked(), nt_build_conf_string_rek(), nt_build_sai_string(), NULp, AW_awar::read_char_pntr(), GBS_strstruct::release(), GBT_config::save(), GBT_config::set_comment(), GBT_config::set_definition(), AW_root::SINGLETON, ta, GBT_config::TOP_AREA, AW_awar::touch(), and unmark_species().
Referenced by nt_create_config_after_import(), NT_start_editor_on_tree(), and nt_store_configuration().
|
static |
Definition at line 956 of file NT_edconf.cxx.
References aw_message_if(), AW_root::awar(), AWAR_CONFIGURATION, FROM_MANAGER, nt_create_configuration(), NT_get_tree_root_of_canvas(), AW_awar::read_char_pntr(), and AW_root::SINGLETON.
Referenced by create_configuration_admin_window().
|
static |
Definition at line 962 of file NT_edconf.cxx.
References aw_input(), aw_message(), AW_root::awar(), AWAR_CONFIGURATION, GB_transaction::close(), configuration_renamed_cb(), GB_entry(), GB_get_transaction_level(), NT_global::gb_main, GB_write_string(), GBS_global_string(), GBT_find_configuration(), AW_window::get_root(), GLOBAL, nt_assert, NULp, AW_awar::read_string(), ta, and AW_awar::write_string().
Referenced by create_configuration_admin_window().
|
static |
Definition at line 1004 of file NT_edconf.cxx.
References ARB_strdup(), AW_root::awar(), AWAR_CONFIG_COMMENT, AWAR_CONFIGURATION, GB_entry(), NT_global::gb_main, GBT_find_configuration(), GLOBAL, AW_awar::is_mapped(), AW_awar::map(), NULp, AW_awar::read_char_pntr(), AW_awar::read_string(), AW_awar::unmap(), and AW_awar::write_string().
Referenced by config_comment_changed_cb(), and init_config_admin_awars().
|
static |
Definition at line 1033 of file NT_edconf.cxx.
References aw_message_if(), AW_root::awar(), AWAR_CONFIG_COMMENT, AWAR_CONFIGURATION, error(), GB_delete(), GB_entry(), NT_global::gb_main, GBT_find_configuration(), GBT_write_string(), GLOBAL, AW_awar::is_mapped(), nt_assert, NULp, AW_awar::read_char_pntr(), selected_config_changed_cb(), AW_awar::unmap(), and AW_awar::write_string().
Referenced by init_config_admin_awars().
|
static |
Definition at line 1075 of file NT_edconf.cxx.
References AW_awar::add_callback(), AW_root::awar(), AWAR_CONFIG_COMMENT, AWAR_CONFIGURATION, AW_root::awar_string(), config_comment_changed_cb(), NT_global::gb_main, GLOBAL, init_config_awars(), selected_config_changed_cb(), and AW_awar::touch().
Referenced by create_configuration_admin_window().
Definition at line 1086 of file NT_edconf.cxx.
References error(), nt_assert, NULp, GBT_config::saveAsOver(), and swap().
Referenced by reorder_configs_cb().
|
static |
Definition at line 1104 of file NT_edconf.cxx.
References ARM_BOTTOM, ARM_DOWN, ARM_TOP, ARM_UP, aw_message_if(), AW_root::awar(), AWAR_CONFIGURATION, GB_transaction::close(), error(), gb_main, AW_DB_selection::get_gb_main(), AW_selection_list::get_index_of(), AW_window::get_root(), AW_selection::get_sellist(), NULp, AW_awar::read_char_pntr(), AW_selection_list::size(), swap_configs(), ta, AW_selection_list::to_array(), and AW_awar::touch().
Referenced by create_configuration_admin_window().
|
static |
Definition at line 1150 of file NT_edconf.cxx.
References AW_root::awar(), AWAR_CONFIG_COMMENT, CharPtrArray::clear(), RegMatch::didMatch(), GBT_join_strings(), GBT_splitNdestroy_string(), AW_window::get_root(), RegExpr::has_failed(), implicated, line, RegExpr::match(), nt_assert, AW_awar::read_string(), CharPtrArray::safe_remove(), CharPtrArray::size(), and AW_awar::write_string().
Referenced by create_configuration_admin_window().
|
static |
Definition at line 1174 of file NT_edconf.cxx.
References AW_POPDOWN(), AWAR_CONFIG_COMMENT, AWAR_CONFIGURATION, awt_create_CONFIG_selection_list(), UNTYPED::awt_create_order_buttons(), clear_comment_cb(), CONF_COMBINE, CONF_EXTRACT, CONF_INVERT, CONF_MARK, CONF_UNMARK, create_configuration_marker_window(), NT_global::gb_main, GBS_global_string(), TREE_canvas::get_index(), GLOBAL, init_config_admin_awars(), makeHelpCallback(), MAX_NT_WINDOWS, MAX_NT_WINDOWS_NULLINIT, nt_delete_configuration(), nt_extract_configuration(), nt_rename_configuration(), nt_store_configuration(), and reorder_configs_cb().
Referenced by NT_popup_configuration_admin().
void NT_popup_configuration_admin | ( | AW_window * | aw_main, |
TREE_canvas * | ntw | ||
) |
Definition at line 1253 of file NT_edconf.cxx.
References create_configuration_admin_window(), and AW_window::get_root().
Referenced by popup_new_main_window().
|
static |
Definition at line 1260 of file NT_edconf.cxx.
References AW_root::awar(), AWAR_CONFIGURATION, AWT_system_cb(), GBK_singlequote(), GBS_global_string(), AW_window::get_root(), AW_window::hide(), and AW_awar::read_char_pntr().
Referenced by NT_create_startEditorOnOldConfiguration_window().
Definition at line 1271 of file NT_edconf.cxx.
References AW_POPDOWN(), AWAR_CONFIGURATION, awt_create_CONFIG_selection_list(), NT_global::gb_main, GLOBAL, init_config_awars(), nt_start_editor_on_configuration(), and NULp.
Referenced by popup_new_main_window().
void NT_start_editor_on_tree | ( | AW_window * | aww, |
int | use_species_aside, | ||
TREE_canvas * | ntw | ||
) |
Definition at line 1294 of file NT_edconf.cxx.
References aw_message_if(), BY_CALLING_THE_EDITOR, DEFAULT_CONFIGURATION, error(), GBK_system(), AW_window::get_root(), init_config_awars(), nt_create_configuration(), and NT_get_tree_root_of_canvas().
Referenced by popup_new_main_window().
|
inline |
Definition at line 1301 of file NT_edconf.cxx.
References ARB_dateTime_suffix(), aw_message_if(), AWT_canvas::awr, error(), FROM_IMPORTER, AWT_canvas::gb_main, GBS_global_string_copy(), GBT_find_configuration(), init_config_awars(), nt_create_configuration(), NT_get_tree_root_of_canvas(), and ta.
Referenced by NT_create_config_after_import().
void NT_create_config_after_import | ( | TREE_canvas * | ntw, |
bool | imported_from_scratch | ||
) |
create a new config after import
imported_from_scratch | if true -> DB was created from scratch, all species in DB are marked. if false -> data was imported into existing DB. Other species may be marked as well, imported species are "queried". |
Definition at line 1322 of file NT_edconf.cxx.
References GB_clear_user_flag(), AWT_canvas::gb_main, GB_read_flag(), GB_user_flag(), GB_USERFLAG_QUERY, GB_USERFLAG_WASMARKED, GB_write_flag(), GB_write_user_flag(), GBT_first_species(), GBT_next_species(), nt_create_config_after_import(), and ta.
Referenced by nt_seq_load_cb(), and start_main_window_after_import().
|
static |
Definition at line 161 of file NT_edconf.cxx.
|
static |
Definition at line 162 of file NT_edconf.cxx.
Referenced by configs_selectionlist_changed_cb(), create_configuration_marker_window(), and selected_configs_awar_changed_cb().
|
static |
Definition at line 163 of file NT_edconf.cxx.
Referenced by configs_selectionlist_changed_cb(), selected_configs_awar_changed_cb(), and selected_configs_display_awar_changed_cb().
const char CFG_SEP = 1 |
Definition at line 480 of file NT_edconf.cxx.