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_mem (size_t &size)
 
charrelease ()
 
void erase ()
 
void assign_mem (char *block, size_t blocksize)
 
void reassign_mem (GBS_strstruct &from)
 
void swap_content (GBS_strstruct &other)
 
void alloc_mem (size_t blocksize)
 
void realloc_mem (size_t newsize)
 
void ensure_mem (size_t needed_size)
 
void cut_tail (size_t byte_count)
 
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 ncatTrimmed (const char *from, size_t count, size_t trimmedWidth)
 
int catTrimmed (const char *from, size_t trimmedWidth)
 
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)
 

Detailed Description

Definition at line 37 of file arb_strbuf.h.

Constructor & Destructor Documentation

GBS_strstruct::GBS_strstruct ( )
inline

Definition at line 50 of file arb_strbuf.h.

GBS_strstruct::GBS_strstruct ( size_t  buffersize)
inline

Definition at line 55 of file arb_strbuf.h.

References alloc_mem().

GBS_strstruct::~GBS_strstruct ( )
inline

Definition at line 62 of file arb_strbuf.h.

Member Function Documentation

size_t GBS_strstruct::get_buffer_size ( ) const
inline

Definition at line 64 of file arb_strbuf.h.

Referenced by GBS_strforget(), and GBS_stropen().

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

Definition at line 67 of file arb_strbuf.h.

References get_position().

Referenced by empty().

bool GBS_strstruct::empty ( ) const
inline

Definition at line 68 of file arb_strbuf.h.

References filled().

Referenced by g_bs_read_final_hash(), and GBS_string_eval_in_env().

const char* GBS_strstruct::get_data ( ) const
inline
char* GBS_strstruct::get_copy ( ) const
inline

Definition at line 71 of file arb_strbuf.h.

References ARB_strndup(), get_data(), and get_position().

Referenced by GBS_strclose().

char* GBS_strstruct::release_mem ( size_t &  size)
inline

Definition at line 73 of file arb_strbuf.h.

References NULp, and result.

Referenced by GBS_stropen(), reassign_mem(), and release().

char* GBS_strstruct::release ( )
inline
void GBS_strstruct::erase ( )
inline
void GBS_strstruct::assign_mem ( char block,
size_t  blocksize 
)
inline

Definition at line 84 of file arb_strbuf.h.

References arb_assert, block, and erase().

Referenced by alloc_mem(), and reassign_mem().

void GBS_strstruct::reassign_mem ( GBS_strstruct from)
inline

Definition at line 94 of file arb_strbuf.h.

References assign_mem(), block, and release_mem().

Referenced by GBS_strforget(), and GBS_stropen().

void GBS_strstruct::swap_content ( GBS_strstruct other)
inline

Definition at line 100 of file arb_strbuf.h.

References swap().

Referenced by GBS_string_eval_in_env().

void GBS_strstruct::alloc_mem ( size_t  blocksize)
inline

Definition at line 106 of file arb_strbuf.h.

References arb_assert, and assign_mem().

Referenced by GBS_stropen(), GBS_strstruct(), and realloc_mem().

void GBS_strstruct::realloc_mem ( size_t  newsize)
inline

Definition at line 112 of file arb_strbuf.h.

References alloc_mem(), arb_assert, and ARB_realloc().

Referenced by ensure_mem().

void GBS_strstruct::ensure_mem ( size_t  needed_size)
inline

Definition at line 123 of file arb_strbuf.h.

References realloc_mem().

Referenced by ncat(), ncatTrimmed(), nput(), put(), and vnprintf().

void GBS_strstruct::cut_tail ( size_t  byte_count)
inline
void GBS_strstruct::put ( char  c)
inline
void GBS_strstruct::nput ( char  c,
size_t  count 
)
inline
void GBS_strstruct::ncat ( const char from,
size_t  count 
)
inline
void GBS_strstruct::cat ( const char from)
inline
int GBS_strstruct::ncatTrimmed ( const char from,
size_t  count,
size_t  trimmedWidth 
)
inline

Definition at line 160 of file arb_strbuf.h.

References ensure_mem(), long, max, ncat(), and nput().

Referenced by catTrimmed().

int GBS_strstruct::catTrimmed ( const char from,
size_t  trimmedWidth 
)
inline

Definition at line 167 of file arb_strbuf.h.

References ncatTrimmed().

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, buffer, and ensure_mem().

Referenced by GBS_strnprintf(), and nprintf().

void GBS_strstruct::nprintf ( size_t  maxlen,
const char templat,
  ... 
)
void GBS_strstruct::putlong ( long  l)
inline

Definition at line 179 of file arb_strbuf.h.

References nprintf().

Referenced by StrUniquifier::make_unique_key(), and sizetarray2string().

void GBS_strstruct::putfloat ( float  f)
inline

Definition at line 180 of file arb_strbuf.h.

References nprintf().


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