ARB
|
#include <arb_strbuf.h>
Public Member Functions | |
GBS_strstruct () | |
GBS_strstruct (size_t buffersize) | |
~GBS_strstruct () | |
size_t | get_buffer_size () const |
size_t | get_position () const |
bool | filled () const |
bool | empty () const |
const char * | get_data () const |
char * | get_copy () const |
char * | release () |
char * | release_memfriendly () |
void | erase () |
void | cut_tail (size_t byte_count) |
void | cut (const size_t at, const size_t byte_count) |
void | swap_content (GBS_strstruct &other) |
void | put (char c) |
void | nput (char c, size_t count) |
void | ncat (const char *from, size_t count) |
void | cat (const char *from) |
int | ncatPadded (const char *from, size_t count, size_t paddedWidth) |
int | catPadded (const char *from, size_t paddedWidth) |
void | npaste_at (size_t at, const char *from, size_t count) |
void | paste_at (size_t at, const char *from) |
void | vnprintf (size_t maxlen, const char *templat, va_list &parg) __ATTR__VFORMAT_MEMBER(2) |
void | nprintf (size_t maxlen, const char *templat,...) __ATTR__FORMAT_MEMBER(2) |
void | putlong (long l) |
void | putfloat (float f) |
void | cat_wrapped (const char *in, const char *from) |
void | cat_sQuoted (const char *from) |
void | cat_dQuoted (const char *from) |
Definition at line 37 of file arb_strbuf.h.
|
inline |
Definition at line 94 of file arb_strbuf.h.
|
inline |
Definition at line 99 of file arb_strbuf.h.
|
inline |
Definition at line 106 of file arb_strbuf.h.
|
inline |
returns the current buffer size.
Definition at line 108 of file arb_strbuf.h.
|
inline |
returns the current content size.
Definition at line 112 of file arb_strbuf.h.
Referenced by AW_init_color_group_defaults(), cut(), filled(), GB_command_interpreter_in_env(), get_copy(), helix_pairs_changed_cb(), match_string(), MP_all_species_string(), MP_match_string(), npaste_at(), nt_build_conf_string_rek(), nt_create_configuration(), pd_get_the_gene_names(), pd_get_the_names(), MG_remap::remap(), ReplaceArgs(), and ReplaceString().
|
inline |
|
inline |
Definition at line 118 of file arb_strbuf.h.
References filled().
Referenced by g_bs_read_final_hash(), GBS_string_eval_in_env(), and helix_pairs_changed_cb().
|
inline |
get content as const char*. Result is valid as long as 'this' exists and no reallocation takes place.
Definition at line 120 of file arb_strbuf.h.
Referenced by aed_start_naligning(), aw_refresh_tmp_message_display(), awt_create_select_filter_window_aw_cb(), awtc_nn_search_all_listed(), canvas_to_printer(), colorDefChanged_callback(), CON_export(), concatenateAlignments(), create_export_awars(), create_import_awars(), deleteColorTranslationTable(), BootstrapConfig::display_remark(), ED4_finish_and_show_notFoundMessage(), GB_command_interpreter_in_env(), GB_get_supported_compression_flags(), GB_xcmd(), GBS_string_eval_in_env(), GBT_save_colorset(), GBT_write_group_name(), GEN_write_position(), get_copy(), QueriedGroups::get_group_display(), helix_pairs_changed_cb(), main(), test_runtool::make_checked_piped_command(), StrUniquifier::make_unique_key(), MG_equal_alignments(), MP_all_species_string(), MP_match_string(), nt_create_configuration(), pd_query_pt_server(), Package::print_xsubs(), readXmlTree(), MG_remap::remap(), AP_pos_var::save_aliEntry_to_SAI(), set_suffix(), show_count(), sina_start(), st_ml_add_quality_string_to_species(), st_remove_entries(), GBL_IMPL::trace_params(), TreeAdmin::tree_append_remark(), NodeTextBuilder::work(), and write_entry().
|
inline |
return a heap copy of the current content of the buffer.
Definition at line 125 of file arb_strbuf.h.
References ARB_strndup(), get_data(), and get_position().
Referenced by build_split_id(), gbl_translate(), and remove_by_tab().
|
inline |
take ownership of current buffer. might be oversized.
Definition at line 129 of file arb_strbuf.h.
References s.
Referenced by AP_probe_iterate_event(), ARB_main(), arb_shell_expand(), AW_init_color_group_defaults(), collectIntFunResults(), complete_newick_comment(), ed_submit_info_event(), filter_columnstat_SAIs(), filter_seq(), g_b_undo_info(), g_bs_read_tagged_hash(), GB_find_executable(), GBK_doublequote(), GBK_singlequote(), gbl_exec(), gbl_merge(), gbl_readdb(), GBS_hashtab_2_string(), GBS_regreplace(), GBS_string_eval_in_env(), GBT_join_strings(), GBT_tree_2_newick(), AW_selection_list::get_content_as_string(), gb_hierarchy_location::get_db_path(), get_file_content_for_viewer(), get_match_hinfo_formatted(), get_match_info_formatted(), ConsensusTreeBuilder::get_tree_remark(), match_string(), MG_diff_strings(), nt_create_configuration(), pd_get_the_gene_names(), pd_get_the_names(), ptpd_read_names(), ArbImporter::read_data(), readableUnknownNames(), release_memfriendly(), MG_remap::remap(), ReplaceArgs(), ReplaceString(), PT_FamilyFinder::results2string(), EDB_root_bact::save_current_config(), SEC_xstring_to_foldedHelixList(), set_field_of_queried_cb(), set_suffix(), sizetarray2string(), and TreeReader::takeComment().
|
inline |
like release(), but shrink memory block if too oversized.
Definition at line 133 of file arb_strbuf.h.
References release().
Referenced by GBL_streams::concatenated(), do_extract_words(), g_bs_get_string_of_tag_hash(), GB_read_fp(), GBS_eval_env(), GBS_fread_string(), GBS_log_action_to(), GBS_replace_tabs_by_spaces(), GBT_commit_rename_session(), GBT_store_marked_species(), and PT_find_exProb().
|
inline |
erase buffer
Definition at line 141 of file arb_strbuf.h.
Referenced by BootstrapConfig::display_remark(), gbl_translate(), GBS_string_eval_in_env(), QueriedGroups::get_group_display(), StrUniquifier::make_unique_key(), MP_all_species_string(), MP_match_string(), remove_by_tab(), and NodeTextBuilder::work().
|
inline |
Removes 'byte_count' characters from the tail of the content
Definition at line 145 of file arb_strbuf.h.
Referenced by GBT_save_colorset(), GBT_store_marked_species(), gb_hierarchy_location::get_db_path(), nt_build_conf_string_rek(), pd_get_the_gene_names(), pd_get_the_names(), MG_remap::remap(), PT_FamilyFinder::results2string(), and sizetarray2string().
Definition at line 150 of file arb_strbuf.h.
References get_position().
Referenced by helix_pairs_changed_cb().
|
inline |
Definition at line 166 of file arb_strbuf.h.
References swap().
Referenced by GBS_string_eval_in_env().
|
inline |
append single character to content
Definition at line 174 of file arb_strbuf.h.
Referenced by aed_start_naligning(), AP_probe_iterate_event(), Package::append_code(), ARB_main(), arb_shell_expand(), AW_init_color_group_defaults(), aw_refresh_tmp_message_display(), awt_create_select_filter_window_aw_cb(), awtc_nn_search_all_listed(), build_split_id(), canvas_to_printer(), cat_internal(), cat_wrapped(), colorDefChanged_callback(), complete_newick_comment(), CON_export(), create_export_awars(), create_import_awars(), deleteColorTranslationTable(), BootstrapConfig::display_remark(), do_extract_words(), dump_hexbyte(), filter_columnstat_SAIs(), filter_seq(), g_b_undo_info(), g_bs_merge_tags(), g_bs_read_final_hash(), GB_command_interpreter_in_env(), GB_read_fp(), GB_xcmd(), GBK_doublequote(), GBK_singlequote(), gbl_exec(), gbl_translate(), gbs_build_replace_string(), GBS_fread_string(), gbs_hash_to_strstruct(), GBS_log_action_to(), GBS_regreplace(), GBS_replace_tabs_by_spaces(), GBT_join_strings(), GBT_save_colorset(), GBT_store_marked_species(), GBT_tree_2_newick(), GEN_write_position(), ED4_base::generate_configuration_string(), AW_selection_list::get_content_as_string(), gb_hierarchy_location::get_db_path(), get_file_content_for_viewer(), QueriedGroups::get_group_display(), get_match_hinfo_formatted(), ConsensusTreeBuilder::get_tree_remark(), helix_pairs_changed_cb(), main(), match_string(), MG_diff_strings(), MG_equal_alignments(), MP_all_species_string(), MP_match_string(), nt_build_conf_marked(), nt_build_conf_string_rek(), nt_build_sai_string(), nt_build_sai_string_by_hash(), pd_get_the_gene_names(), pd_get_the_names(), PT_find_exProb(), ptpd_read_names(), readXmlTree(), MG_remap::remap(), remove_by_tab(), AP_pos_var::save_aliEntry_to_SAI(), SEC_xstring_to_foldedHelixList(), set_suffix(), show_count(), sizetarray2string(), st_ml_add_quality_string_to_species(), tree2newick(), TreeAdmin::tree_append_remark(), NodeTextBuilder::work(), and write_entry().
append a character repeatedly to content
Definition at line 180 of file arb_strbuf.h.
Referenced by concatenateAlignments(), GB_command_interpreter_in_env(), gbs_hash_to_strstruct(), ncatPadded(), npaste_at(), MG_remap::remap(), and tree2newick().
append 'count' bytes of 'from' to content. (caution : copies zero byte and mem behind if used with wrong len!)
Definition at line 189 of file arb_strbuf.h.
Referenced by Package::append_code(), cat(), filter_seq(), GBK_doublequote(), GBK_singlequote(), GBS_eval_env(), GBS_regreplace(), GBS_string_eval_in_env(), ED4_base::generate_configuration_string(), get_file_content_for_viewer(), MG_diff_strings(), ncatPadded(), nt_build_sai_string_by_hash(), nt_create_configuration(), ReplaceArgs(), ReplaceString(), and set_field_of_queried_cb().
|
inline |
append whole string to content
Definition at line 199 of file arb_strbuf.h.
References ncat().
Referenced by aed_start_naligning(), AP_probe_iterate_event(), Package::append_code(), GBT_config_item::append_to_config_string(), ARB_main(), arb_shell_expand(), AW_init_color_group_defaults(), aw_refresh_tmp_message_display(), awt_create_select_filter_window_aw_cb(), awtc_nn_search_all_listed(), canvas_to_printer(), cat_internal(), cat_wrapped(), colorDefChanged_callback(), CON_export(), concatenateAlignments(), GBL_streams::concatenated(), create_export_awars(), create_import_awars(), deleteColorTranslationTable(), do_extract_words(), ed_submit_info_event(), EDB_root_bact::fill_data(), filter_columnstat_SAIs(), g_b_undo_info(), g_bs_merge_tags(), g_bs_read_final_hash(), GB_command_interpreter_in_env(), GB_find_executable(), GB_get_supported_compression_flags(), GB_xcmd(), GBK_doublequote(), gbl_exec(), gbl_merge(), gbl_readdb(), gbs_build_replace_string(), GBS_eval_env(), GBS_log_action_to(), GBS_regreplace(), GBS_string_eval_in_env(), GBT_join_strings(), GBT_save_colorset(), GBT_store_marked_species(), GBT_write_group_name(), GEN_write_position(), ED4_base::generate_configuration_string(), AW_selection_list::get_content_as_string(), gb_hierarchy_location::get_db_path(), QueriedGroups::get_group_display(), get_match_hinfo_formatted(), get_match_info_formatted(), ConsensusTreeBuilder::get_tree_remark(), main(), test_runtool::make_checked_piped_command(), StrUniquifier::make_unique_key(), match_string(), MG_diff_strings(), MG_equal_alignments(), MP_all_species_string(), MP_match_string(), nt_build_conf_marked(), nt_build_conf_string_rek(), nt_build_sai_string(), nt_build_sai_string_by_hash(), pd_get_the_gene_names(), pd_get_the_names(), pd_query_pt_server(), PT_find_exProb(), ptpd_read_names(), ArbImporter::read_data(), readableUnknownNames(), readXmlTree(), ReplaceArgs(), ReplaceString(), SEC_xstring_to_foldedHelixList(), set_suffix(), show_count(), sina_start(), st_ml_add_quality_string_to_species(), st_remove_entries(), GBL_IMPL::trace_params(), tree2newick(), TreeAdmin::tree_append_remark(), and write_entry().
like catPadded(), when strlen is known or when only a prefix of 'from' shall be concatenated.
Definition at line 204 of file arb_strbuf.h.
References long, max, ncat(), and nput().
Referenced by catPadded().
concatenate 'from' (will not be truncated if paddedWidth is smaller than 'strlen(from)'). Append spaces to pad to 'paddedWidth'. Return number of spaces appended or a negative number ('strlen(from)-paddedWidth').
Definition at line 212 of file arb_strbuf.h.
References ncatPadded().
copy 'count' bytes from 'from' over existing content starting at offset 'at'. Not meant to operate over end of content. Will fail assertion in that case.
Definition at line 220 of file arb_strbuf.h.
References arb_assert, get_position(), and nput().
Referenced by awt_create_select_filter_window_aw_cb(), and paste_at().
like npaste_at(), but always use complete string 'from'
Definition at line 232 of file arb_strbuf.h.
References npaste_at().
Definition at line 13 of file arb_strbuf.cxx.
References assert_or_exit, and buffer.
Referenced by nprintf().
Definition at line 29 of file arb_strbuf.cxx.
References va_start(), and vnprintf().
Referenced by canvas_to_printer(), BootstrapConfig::display_remark(), ED4_finish_and_show_notFoundMessage(), GBT_write_group_name(), QueriedGroups::get_group_display(), ConsensusTreeBuilder::get_tree_remark(), test_runtool::make_checked_piped_command(), MP_match_string(), putfloat(), putlong(), readableUnknownNames(), PT_FamilyFinder::results2string(), SEC_xstring_to_foldedHelixList(), show_count(), st_ml_add_quality_string_to_species(), st_remove_entries(), streamIntFunResults(), streamIntFunResultsInBrackets(), and tree2newick().
|
inline |
Definition at line 240 of file arb_strbuf.h.
References nprintf().
Referenced by aed_start_naligning(), build_split_id(), g_bs_read_tagged_hash(), gbs_hash_to_strstruct(), StrUniquifier::make_unique_key(), pd_get_the_gene_names(), pd_get_the_names(), sina_start(), and sizetarray2string().
|
inline |
Definition at line 241 of file arb_strbuf.h.
References nprintf().
Referenced by aed_start_naligning(), AP_pos_var::save_aliEntry_to_SAI(), and sina_start().
cat string 'from' wrapped into the 2 characters provided in 'in'.
Definition at line 244 of file arb_strbuf.h.
References arb_assert, cat(), and put().
Referenced by cat_dQuoted(), cat_sQuoted(), and g_bs_read_final_hash().
|
inline |
Definition at line 251 of file arb_strbuf.h.
References cat_wrapped().
Referenced by GBK_singlequote(), GBT_write_group_name(), and sina_start().
|
inline |
Definition at line 252 of file arb_strbuf.h.
References cat_wrapped().