ARB
|
#include <arb_strarray.h>
Public Member Functions | |
void | reserve (size_t forElems) |
void | optimize_space () |
size_t | size () const |
bool | empty () const |
const char * | operator[] (int i) const |
void | swap (int i1, int i2) |
void | move (int from, int to) |
void | remove (int i) |
void | safe_remove (int i) |
void | resize (int newsize) |
void | clear () |
void | sort (CharPtrArray_compare_fun compare, void *client_data) |
void | uniq (CharPtrArray_compare_fun compare, void *client_data) |
void | sort_and_uniq (CharPtrArray_compare_fun compare, void *client_data) |
int | index_of (const char *search_for) const |
Protected Member Functions | |
bool | ok () const |
bool | elem_index (int i) const |
bool | allocated_index (int i) const |
void | set_space (size_t new_allocated) |
void | reserve_space (size_t forElems, bool alloc_ahead) |
CharPtrArray () | |
virtual | ~CharPtrArray () |
virtual void | free_elem (int i)=0 |
void | erase_elems () |
Protected Attributes | |
char ** | str |
size_t | elems |
Definition at line 31 of file arb_strarray.h.
|
inlineprotected |
Definition at line 67 of file arb_strarray.h.
|
inlineprotectedvirtual |
Definition at line 68 of file arb_strarray.h.
|
inlineprotected |
Definition at line 38 of file arb_strarray.h.
References elems.
Referenced by erase_elems(), operator[](), FINAL_TYPE< SEQTYPE >::put(), ConstStrArray::put(), remove(), FINAL_TYPE< SEQTYPE >::replace(), ConstStrArray::replace(), set_space(), and swap().
|
inlineprotected |
Definition at line 45 of file arb_strarray.h.
References elems.
Referenced by remove(), FINAL_TYPE< SEQTYPE >::replace(), ConstStrArray::replace(), safe_remove(), and swap().
|
inlineprotected |
Definition at line 46 of file arb_strarray.h.
Referenced by FINAL_TYPE< SEQTYPE >::put(), and ConstStrArray::put().
|
inlineprotected |
Definition at line 48 of file arb_strarray.h.
References arb_assert, ARB_calloc(), ARB_recalloc(), and ok().
Referenced by optimize_space(), and reserve_space().
|
inlineprotected |
Definition at line 60 of file arb_strarray.h.
References set_space().
Referenced by FINAL_TYPE< SEQTYPE >::put(), ConstStrArray::put(), and reserve().
|
protectedpure virtual |
Referenced by erase_elems(), and remove().
|
inlineprotected |
Definition at line 72 of file arb_strarray.h.
References arb_assert, elems, empty(), free_elem(), and ok().
Referenced by FINAL_TYPE< SEQTYPE >::erase(), and ConstStrArray::erase().
|
inline |
Definition at line 82 of file arb_strarray.h.
References reserve_space().
Referenced by GBT_get_configuration_names(), GBT_get_tree_names(), and GEN_read_position().
|
inline |
Definition at line 83 of file arb_strarray.h.
References set_space().
|
inline |
Definition at line 85 of file arb_strarray.h.
References elems.
Referenced by RefEntries::addRefsTo(), SaiBoolchainOperator::apply(), SaiAciApplicator::apply(), AW_create_fileselection_awars(), aw_help_history(), AWT_insert_DBcompression_selector(), AWT_modify_managed_configs(), AWT_trigger_remote_action(), boolchain_gui_changed_cb(), build_consensus_tree(), clear_comment_cb(), clearMacroExecutionAuthorization(), config_modified_cb(), LocationEditor::create_GEN_position_from_fields(), create_probe_design_variables(), ArbImporter::detect_format(), elemOr(), export_nds_cb(), FieldTransfer::RuleSet::extractUsedFields(), File_selection::fill(), AWT_configuration_selection::fill(), AW_subset_selection::fill_entries_matching_values(), gb_hierarchy_location::gb_hierarchy_location(), GBT_commit_rename_session(), GBT_save_colorset(), File_selection::get_newest_dir_modtime(), AWT_configuration::keep_changed_fields(), ListDisplayRow::ListDisplayRow(), MG_equal_alignments(), ConfigModifier::modifyConfig(), move(), move_field_cb(), mp_file2list(), mp_list2file(), new_input_window(), NT_alltree_remove_leafs(), nt_build_sai_string(), NT_database_optimization(), parse_helix_list(), parseCSV(), GBL_IMPL::print_trace(), probe_design_event(), PT_start_design(), FINAL_TYPE< SEQTYPE >::put_before(), ConstStrArray::put_before(), readableUnknownNames(), FieldTransfer::ReadRule::readFrom(), resize(), restore_colorset_representation(), sort(), SpeciesSpace::SpeciesSpace(), split_ali_cb(), standard_file2list(), standard_list2file(), uniq(), and update_colorset_selection_list().
|
inline |
Definition at line 86 of file arb_strarray.h.
Referenced by add_boolrule_cb(), ARB_main(), AWT_trigger_remote_action(), build_consensus_tree(), del_boolrule_cb(), erase_elems(), AWT_tree_selection::fill(), AWT_configuration_selection::fill(), GBT_commit_rename_session(), loadsave_colorset_cb(), mp_file2list(), mp_list2file(), NT_alltree_remove_leafs(), refill_boolrules_sellist(), and selected_configs_awar_changed_cb().
Definition at line 88 of file arb_strarray.h.
References arb_assert, NULp, and ok().
Definition at line 94 of file arb_strarray.h.
References arb_assert, elem_index(), ok(), and swap().
Referenced by move().
moves an array-entry from 'oidx' to 'nidx' (entries between get shifted by one) -1 means "last entry" if 'nidx' is out of bounds, it'll be moved to start of array
Definition at line 132 of file arb_strarray.cxx.
References arb_assert, size(), and swap().
Referenced by add_selected_cb(), lower_reference_cb(), move_field_cb(), FINAL_TYPE< SEQTYPE >::put_before(), ConstStrArray::put_before(), and raise_reference_cb().
void CharPtrArray::remove | ( | int | i | ) |
Definition at line 152 of file arb_strarray.cxx.
References arb_assert, elem_index(), elems, free_elem(), and ok().
Referenced by GBT_commit_rename_session(), get_global_alignments(), MG_equal_alignments(), ConfigModifier::modifyConfig(), and move_field_cb().
|
inline |
like remove, but does NOOP if index out of bounds
Definition at line 103 of file arb_strarray.h.
References elem_index().
Referenced by clear_comment_cb(), del_boolrule_cb(), and del_reference_cb().
|
inline |
|
inline |
Definition at line 114 of file arb_strarray.h.
References resize().
Referenced by AW_getColorRangeNames(), and clear_comment_cb().
void CharPtrArray::sort | ( | CharPtrArray_compare_fun | compare, |
void * | client_data | ||
) |
sort the array
Definition at line 18 of file arb_strarray.cxx.
References GB_sort(), and size().
Referenced by sort_and_uniq().
void CharPtrArray::uniq | ( | CharPtrArray_compare_fun | compare, |
void * | client_data | ||
) |
remove consecutive equal elements
Definition at line 25 of file arb_strarray.cxx.
References size().
Referenced by sort_and_uniq().
|
inline |
sort the array and remove all duplicates
compare | function defining order on elements ( |
client_data | user parameter forwarded to compare |
Definition at line 118 of file arb_strarray.h.
References sort(), and uniq().
Referenced by get_SAI_groups().
Definition at line 118 of file arb_strarray.cxx.
Referenced by add_selected_cb(), del_reference_cb(), lower_reference_cb(), and raise_reference_cb().
|
protected |
Definition at line 35 of file arb_strarray.h.
|
protected |
Definition at line 36 of file arb_strarray.h.
Referenced by elem_index(), erase_elems(), ok(), FINAL_TYPE< SEQTYPE >::put(), ConstStrArray::put(), remove(), and size().