ARB
Public Member Functions | List of all members
GBS_strstruct Class Reference

#include <arb_strbuf.h>

Inheritance diagram for GBS_strstruct:
Inheritance graph
[legend]
Collaboration diagram for GBS_strstruct:
Collaboration graph
[legend]

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 charget_data () const
 
charget_copy () const
 
charrelease ()
 
charrelease_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)
 

Detailed Description

Definition at line 37 of file arb_strbuf.h.

Constructor & Destructor Documentation

GBS_strstruct::GBS_strstruct ( )
inline

Definition at line 94 of file arb_strbuf.h.

GBS_strstruct::GBS_strstruct ( size_t  buffersize)
inline

Definition at line 99 of file arb_strbuf.h.

GBS_strstruct::~GBS_strstruct ( )
inline

Definition at line 106 of file arb_strbuf.h.

Member Function Documentation

size_t GBS_strstruct::get_buffer_size ( ) const
inline

returns the current buffer size.

Definition at line 108 of file arb_strbuf.h.

size_t GBS_strstruct::get_position ( ) const
inline
bool GBS_strstruct::filled ( ) const
inline

Definition at line 117 of file arb_strbuf.h.

References get_position().

Referenced by empty().

bool GBS_strstruct::empty ( ) const
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().

const char* GBS_strstruct::get_data ( ) const
inline
char* GBS_strstruct::get_copy ( ) const
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().

char* GBS_strstruct::release ( )
inline
char* GBS_strstruct::release_memfriendly ( )
inline
void GBS_strstruct::erase ( )
inline
void GBS_strstruct::cut_tail ( size_t  byte_count)
inline
void GBS_strstruct::cut ( const size_t  at,
const size_t  byte_count 
)
inline

Definition at line 150 of file arb_strbuf.h.

References get_position().

Referenced by helix_pairs_changed_cb().

void GBS_strstruct::swap_content ( GBS_strstruct other)
inline

Definition at line 166 of file arb_strbuf.h.

References swap().

Referenced by GBS_string_eval_in_env().

void GBS_strstruct::put ( char  c)
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().

void GBS_strstruct::nput ( char  c,
size_t  count 
)
inline

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().

void GBS_strstruct::ncat ( const char from,
size_t  count 
)
inline
void GBS_strstruct::cat ( const char from)
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().

int GBS_strstruct::ncatPadded ( const char from,
size_t  count,
size_t  paddedWidth 
)
inline

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().

int GBS_strstruct::catPadded ( const char from,
size_t  paddedWidth 
)
inline

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().

void GBS_strstruct::npaste_at ( size_t  at,
const char from,
size_t  count 
)
inline

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().

void GBS_strstruct::paste_at ( size_t  at,
const char from 
)
inline

like npaste_at(), but always use complete string 'from'

Definition at line 232 of file arb_strbuf.h.

References npaste_at().

void GBS_strstruct::vnprintf ( size_t  maxlen,
const char templat,
va_list &  parg 
)

Definition at line 13 of file arb_strbuf.cxx.

References assert_or_exit, and buffer.

Referenced by nprintf().

void GBS_strstruct::nprintf ( size_t  maxlen,
const char templat,
  ... 
)
void GBS_strstruct::putlong ( long  l)
inline
void GBS_strstruct::putfloat ( float  f)
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().

void GBS_strstruct::cat_wrapped ( const char in,
const char from 
)
inline

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().

void GBS_strstruct::cat_sQuoted ( const char from)
inline

Definition at line 251 of file arb_strbuf.h.

References cat_wrapped().

Referenced by GBK_singlequote(), GBT_write_group_name(), and sina_start().

void GBS_strstruct::cat_dQuoted ( const char from)
inline

Definition at line 252 of file arb_strbuf.h.

References cat_wrapped().


The documentation for this class was generated from the following files: