w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

StringAccum Class Reference

Efficiently build up Strings from pieces. More...

#include <straccum.hh>

Public Types

typedef const char * const_iterator
 
typedef char * iterator
 
typedef int(StringAccum::* unspecified_bool_type) () const
 

Public Member Functions

 StringAccum ()
 Construct an empty StringAccum (with length 0). More...
 
 StringAccum (int capacity)
 Construct a StringAccum with room for at least capacity characters. More...
 
 StringAccum (const char *cstr)
 Construct a StringAccum containing the characters in s. More...
 
 StringAccum (const char *s, int len)
 Construct a StringAccum containing the characters in s. More...
 
 StringAccum (const String &str)
 Construct a StringAccum containing the characters in str. More...
 
 StringAccum (const StringAccum &x)
 Construct a StringAccum containing a copy of x. More...
 
 ~StringAccum ()
 Destroy a StringAccum, freeing its memory. More...
 
const char * data () const
 Return the contents of the StringAccum. More...
 
char * data ()
 
const unsigned char * udata () const
 
unsigned char * udata ()
 
int length () const
 Return the length of the StringAccum. More...
 
int capacity () const
 Return the StringAccum's current capacity. More...
 
bool empty () const
 Return true iff the StringAccum is empty or out-of-memory. More...
 
bool operator! () const
 Return true iff the StringAccum does not contain characters. More...
 
bool out_of_memory () const
 Return true iff the StringAccum is out-of-memory. More...
 
const_iterator begin () const
 Return an iterator for the first character in the StringAccum. More...
 
iterator begin ()
 
const_iterator end () const
 Return an iterator for the end of the StringAccum. More...
 
iterator end ()
 
 operator unspecified_bool_type () const
 Return true iff the StringAccum contains characters. More...
 
const char * c_str ()
 Null-terminate this StringAccum and return its data. More...
 
char operator[] (int i) const
 Return the ith character in the string. More...
 
char & operator[] (int i)
 Return a reference to the ith character in the string. More...
 
char front () const
 Return the first character in the string. More...
 
char & front ()
 Return a reference to the first character in the string. More...
 
char back () const
 Return the last character in the string. More...
 
char & back ()
 Return a reference to the last character in the string. More...
 
void clear ()
 Clear the StringAccum's comments. More...
 
char * reserve (int n)
 Reserve space for at least n characters. More...
 
void set_length (int len)
 Set the StringAccum's length to len. More...
 
int resize (int len)
 Set the StringAccum's length to len. More...
 
void adjust_length (int delta)
 Adjust the StringAccum's length. More...
 
char * extend (int nadjust, int nreserve=0)
 Reserve space and adjust length in one operation. More...
 
void pop_back (int n=1)
 Remove characters from the end of the StringAccum. More...
 
void append (char c)
 Append character c to the StringAccum. More...
 
void append (unsigned char c)
 
void append_fill (int c, int len)
 Append len copies of character c to the StringAccum. More...
 
void append_utf8 (unsigned ch)
 Append the UTF-8 encoding of Unicode character ch. More...
 
void append (const char *s)
 Append the null-terminated C string s to this StringAccum. More...
 
void append (const char *s, int len)
 Append the first len characters of s to this StringAccum. More...
 
void append (const unsigned char *s, int len)
 
void append (const char *begin, const char *end)
 Append the data from begin to end to the end of this StringAccum. More...
 
void append (const unsigned char *begin, const unsigned char *end)
 
void append_break_lines (const String &text, int linelen, const String &leftmargin=String())
 
StringAccumsnprintf (int n, const char *format,...)
 Append result of snprintf() to this StringAccum. More...
 
String take_string ()
 Return a String object with this StringAccum's contents. More...
 
StringAccumoperator= (const StringAccum &x)
 Assign this StringAccum to x. More...
 
void swap (StringAccum &x)
 Swap this StringAccum's contents with x. More...
 

Private Types

enum  { MEMO_SPACE = String::MEMO_SPACE }
 

Private Member Functions

char * grow (int)
 
void assign_out_of_memory ()
 
char * hard_extend (int nadjust, int nreserve)
 
void hard_append (const char *s, int len)
 
void append_utf8_hard (unsigned ch)
 

Private Attributes

unsigned char * _s
 
int _len
 
int _cap
 

Friends

StringAccumoperator<< (StringAccum &sa, const char *s)
 Append null-terminated C string cstr to StringAccum sa. More...
 
StringAccumoperator<< (StringAccum &sa, const String &str)
 Append the contents of str to sa. More...
 

Related Functions

(Note that these are not member functions.)

StringAccumoperator<< (StringAccum &sa, char c)
 Append character c to StringAccum sa. More...
 
StringAccumoperator<< (StringAccum &sa, unsigned char c)
 Append character c to StringAccum sa. More...
 
StringAccumoperator<< (StringAccum &sa, const char *cstr)
 Append null-terminated C string cstr to StringAccum sa. More...
 
StringAccumoperator<< (StringAccum &sa, bool b)
 Append "true" or "false" to sa, depending on b. More...
 
StringAccumoperator<< (StringAccum &sa, short i)
 Append decimal representation of i to sa. More...
 
StringAccumoperator<< (StringAccum &sa, unsigned short u)
 Append decimal representation of u to sa. More...
 
StringAccumoperator<< (StringAccum &sa, int i)
 Append decimal representation of i to sa. More...
 
StringAccumoperator<< (StringAccum &sa, unsigned u)
 Append decimal representation of u to sa. More...
 
StringAccumoperator<< (StringAccum &sa, const String &str)
 Append the contents of str to sa. More...
 
StringAccumoperator<< (StringAccum &sa, const StringAccum &sb)
 Append the contents of sb to sa. More...
 
StringAccumoperator<< (StringAccum &sa, long i)
 Append decimal representation of i to sa. More...
 
StringAccumoperator<< (StringAccum &sa, unsigned long u)
 Append decimal representation of u to sa. More...
 

Detailed Description

Efficiently build up Strings from pieces.

Like the String class, StringAccum represents a string of characters. However, unlike a String, a StringAccum is inherently mutable, and efficiently supports building up a large string from many smaller pieces.

StringAccum objects support operator<<() operations for most fundamental data types. A StringAccum is generally built up by operator<<(), and then turned into a String by the take_string() method. Extracting the String from a StringAccum does no memory allocation or copying; the StringAccum's memory is donated to the String.

Out-of-memory StringAccums

When there is not enough memory to add requested characters to a StringAccum object, the object becomes a special "out-of-memory" StringAccum. Out-of-memory objects are contagious: the result of any concatenation operation involving an out-of-memory StringAccum is another out-of-memory StringAccum. Appending an out-of-memory String with "sa << s" makes "sa" out-of-memory. (However, other usually-equivalent calls, such as "sa.append(s.begin(), s.end())", do not make "sa" out-of-memory.) Calling take_string() on an out-of-memory StringAccum returns an out-of-memory String.

Out-of-memory StringAccum objects have length zero.

Definition at line 21 of file straccum.hh.

Member Typedef Documentation

◆ const_iterator

Definition at line 23 of file straccum.hh.

◆ iterator

typedef char* StringAccum::iterator

Definition at line 24 of file straccum.hh.

◆ unspecified_bool_type

typedef int(StringAccum::* StringAccum::unspecified_bool_type) () const

Definition at line 26 of file straccum.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
MEMO_SPACE 

Definition at line 146 of file straccum.hh.

Constructor & Destructor Documentation

◆ StringAccum() [1/6]

StringAccum::StringAccum ( )
inline

Construct an empty StringAccum (with length 0).

Definition at line 189 of file straccum.hh.

◆ StringAccum() [2/6]

StringAccum::StringAccum ( int  capacity)
inlineexplicit

Construct a StringAccum with room for at least capacity characters.

Parameters
capacityinitial capacity

If capacity <= 0, the StringAccum is created empty. If capacity is too large (so that capacity bytes of memory can't be allocated), the StringAccum falls back to a smaller capacity (possibly zero).

Definition at line 200 of file straccum.hh.

References _cap, _s, assert(), capacity(), and MEMO_SPACE.

◆ StringAccum() [3/6]

StringAccum::StringAccum ( const char *  cstr)
inlineexplicit

Construct a StringAccum containing the characters in s.

Definition at line 214 of file straccum.hh.

References append().

◆ StringAccum() [4/6]

StringAccum::StringAccum ( const char *  s,
int  len 
)
inline

Construct a StringAccum containing the characters in s.

Definition at line 220 of file straccum.hh.

References append(), len, and s.

◆ StringAccum() [5/6]

StringAccum::StringAccum ( const String str)
inline

Construct a StringAccum containing the characters in str.

Definition at line 226 of file straccum.hh.

References append(), and str.

◆ StringAccum() [6/6]

StringAccum::StringAccum ( const StringAccum x)
inline

Construct a StringAccum containing a copy of x.

Definition at line 232 of file straccum.hh.

References append(), and cordic::x.

◆ ~StringAccum()

StringAccum::~StringAccum ( )
inline

Destroy a StringAccum, freeing its memory.

Definition at line 238 of file straccum.hh.

References _cap, _s, and MEMO_SPACE.

Member Function Documentation

◆ adjust_length()

void StringAccum::adjust_length ( int  delta)
inline

Adjust the StringAccum's length.

Parameters
deltalength adjustment
Precondition
If delta > 0, then length() + delta <= capacity(). If delta < 0, then length() + delta >= 0.

The StringAccum's length after adjust_length(delta) equals its old length plus delta. Generally adjust_length() is used after a call to reserve().

See also
set_length

Definition at line 416 of file straccum.hh.

References _cap, _len, assert(), and delta.

Referenced by do_file(), operator<<(), operator<<(), read_file(), snprintf(), update_autofont_map(), and write_encoding_file().

◆ append() [1/7]

◆ append() [2/7]

void StringAccum::append ( const char *  begin,
const char *  end 
)
inline

Append the data from begin to end to the end of this StringAccum.

Does nothing if begin >= end.

Definition at line 491 of file straccum.hh.

References append(), begin(), and end().

◆ append() [3/7]

void StringAccum::append ( const char *  s)

Append the null-terminated C string s to this StringAccum.

Parameters
sdata to append

Definition at line 191 of file straccum.cc.

References hard_append(), s, and strlen().

◆ append() [4/7]

void StringAccum::append ( const char *  s,
int  len 
)
inline

Append the first len characters of s to this StringAccum.

Parameters
sdata to append
lenlength of data
Precondition
len >= 0

Definition at line 473 of file straccum.hh.

References _cap, _len, _s, assert(), hard_append(), len, memcpy, and s.

◆ append() [5/7]

void StringAccum::append ( const unsigned char *  begin,
const unsigned char *  end 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 497 of file straccum.hh.

References append(), begin(), and end().

◆ append() [6/7]

void StringAccum::append ( const unsigned char *  s,
int  len 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 483 of file straccum.hh.

References append(), len, and s.

◆ append() [7/7]

void StringAccum::append ( unsigned char  c)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 457 of file straccum.hh.

References append(), and c.

◆ append_break_lines()

void StringAccum::append_break_lines ( const String text,
int  linelen,
const String leftmargin = String() 
)

◆ append_fill()

void StringAccum::append_fill ( int  c,
int  len 
)

Append len copies of character c to the StringAccum.

Definition at line 130 of file straccum.cc.

References c, extend(), len, memset(), and s.

◆ append_utf8()

void StringAccum::append_utf8 ( unsigned  ch)
inline

Append the UTF-8 encoding of Unicode character ch.

Definition at line 462 of file straccum.hh.

References append(), append_utf8_hard(), and ch.

Referenced by Efont::OpenType::Name::utf8_name().

◆ append_utf8_hard()

void StringAccum::append_utf8_hard ( unsigned  ch)
private

Definition at line 137 of file straccum.cc.

References append(), and ch.

Referenced by append_utf8().

◆ assign_out_of_memory()

void StringAccum::assign_out_of_memory ( )
private

Definition at line 60 of file straccum.cc.

References _cap, _len, _s, assert(), MEMO_SPACE, and String::out_of_memory_data().

Referenced by grow().

◆ back() [1/2]

char & StringAccum::back ( )
inline

Return a reference to the last character in the string.

Precondition
length() > 0

Definition at line 362 of file straccum.hh.

References _len, _s, and assert().

◆ back() [2/2]

char StringAccum::back ( ) const
inline

Return the last character in the string.

Precondition
length() > 0

Definition at line 355 of file straccum.hh.

References _len, _s, and assert().

◆ begin() [1/2]

StringAccum::iterator StringAccum::begin ( )
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 294 of file straccum.hh.

References _s.

◆ begin() [2/2]

StringAccum::const_iterator StringAccum::begin ( ) const
inline

Return an iterator for the first character in the StringAccum.

StringAccum iterators are simply pointers into string data, so they are quite efficient.

See also
StringAccum::data

Definition at line 289 of file straccum.hh.

References _s.

Referenced by append(), FileErrorHandler::emit(), and operator<<().

◆ c_str()

const char * StringAccum::c_str ( )

Null-terminate this StringAccum and return its data.

Note that the null character does not contribute to the StringAccum's length(), and later append() and similar operations can overwrite it. If appending the null character fails, the StringAccum becomes out-of-memory and the returned value is a null string.

Definition at line 122 of file straccum.cc.

References _cap, _len, _s, and grow().

Referenced by do_info(), do_query_optical_size(), do_query_optical_size_size(), Efont::AmfmMetrics::interpolate(), DvipsEncoding::make_metrics(), operator!=(), operator==(), output_pl(), report_underused_features(), Type1MMRemover::run(), MyFont::set_design_vector(), Metrics::shrink_encoding(), and Efont::Cff::Dict::unparse().

◆ capacity()

int StringAccum::capacity ( ) const
inline

Return the StringAccum's current capacity.

The capacity is the maximum length the StringAccum can hold without incurring a memory allocation. Returns -1 for out-of-memory StringAccums.

Definition at line 281 of file straccum.hh.

References _cap.

Referenced by operator unspecified_bool_type(), and StringAccum().

◆ clear()

void StringAccum::clear ( )
inline

Clear the StringAccum's comments.

All characters in the StringAccum are erased. Also resets the StringAccum's out-of-memory status.

Definition at line 371 of file straccum.hh.

References _cap, _len, and _s.

Referenced by Efont::Type1CharstringGen::clear(), Efont::CharstringUnparser::clear(), Efont::Type1PFBWriter::flush(), output_pl(), Type1MMRemover::run(), Smoker::run(), take_string(), and Efont::Cff::Dict::unparse().

◆ data() [1/2]

char * StringAccum::data ( )
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 254 of file straccum.hh.

References _s.

◆ data() [2/2]

const char * StringAccum::data ( ) const
inline

Return the contents of the StringAccum.

Returns
The StringAccum's contents.

The return value is null if the StringAccum is empty or out-of-memory. The returned data() value points to writable memory (unless the StringAccum itself is const).

Definition at line 249 of file straccum.hh.

References _s.

Referenced by Efont::Type1CharstringGen::data(), Efont::Type1PFBWriter::flush(), Efont::OpenType::Font::make(), output_encoding(), ErrorHandler::vxformat(), and write_encoding_file().

◆ empty()

bool StringAccum::empty ( void  ) const
inline

Return true iff the StringAccum is empty or out-of-memory.

Definition at line 267 of file straccum.hh.

References _len.

◆ end() [1/2]

StringAccum::iterator StringAccum::end ( )
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 307 of file straccum.hh.

References _len, and _s.

◆ end() [2/2]

StringAccum::const_iterator StringAccum::end ( ) const
inline

Return an iterator for the end of the StringAccum.

The return value points one character beyond the last character in the StringAccum.

Definition at line 302 of file straccum.hh.

References _len, and _s.

Referenced by append(), and operator<<().

◆ extend()

char * StringAccum::extend ( int  nadjust,
int  nreserve = 0 
)
inline

Reserve space and adjust length in one operation.

Parameters
nadjustnumber of characters to reserve and adjust length
nreserveadditional characters to reserve
Precondition
nadjust >= 0 and nreserve >= 0

This operation combines the effects of reserve(nadjust + nreserve) and adjust_length(nadjust). Returns the result of the reserve() call.

Definition at line 429 of file straccum.hh.

References _cap, _len, _s, assert(), hard_extend(), and cordic::x.

Referenced by Efont::CharstringUnparser::act_hintmask(), append_fill(), hard_append(), hard_printable(), and Efont::Type1PFBWriter::print0().

◆ front() [1/2]

char & StringAccum::front ( )
inline

Return a reference to the first character in the string.

Precondition
length() > 0

Definition at line 348 of file straccum.hh.

References _len, _s, and assert().

◆ front() [2/2]

char StringAccum::front ( ) const
inline

Return the first character in the string.

Precondition
length() > 0

Definition at line 341 of file straccum.hh.

References _len, _s, and assert().

◆ grow()

char * StringAccum::grow ( int  want)
private

Definition at line 71 of file straccum.cc.

References _cap, _len, _s, assign_out_of_memory(), errno, memcpy, MEMO_SPACE, and n.

Referenced by append(), c_str(), hard_append(), hard_extend(), reserve(), and resize().

◆ hard_append()

void StringAccum::hard_append ( const char *  s,
int  len 
)
private

Definition at line 158 of file straccum.cc.

References _cap, _len, _s, extend(), grow(), len, memcpy, MEMO_SPACE, and s.

Referenced by append().

◆ hard_extend()

char * StringAccum::hard_extend ( int  nadjust,
int  nreserve 
)
private

Definition at line 113 of file straccum.cc.

References _len, grow(), and cordic::x.

Referenced by extend().

◆ length()

◆ operator unspecified_bool_type()

StringAccum::operator unspecified_bool_type ( ) const
inline

Return true iff the StringAccum contains characters.

Returns false for empty and out-of-memory StringAccums.

Definition at line 56 of file straccum.hh.

References _len, and capacity().

◆ operator!()

bool StringAccum::operator! ( ) const
inline

Return true iff the StringAccum does not contain characters.

Returns true for empty and out-of-memory StringAccums.

Definition at line 314 of file straccum.hh.

References _len.

◆ operator=()

StringAccum & StringAccum::operator= ( const StringAccum x)
inline

Assign this StringAccum to x.

Definition at line 503 of file straccum.hh.

References _cap, _len, _s, append(), out_of_memory(), and cordic::x.

◆ operator[]() [1/2]

char & StringAccum::operator[] ( int  i)
inline

Return a reference to the ith character in the string.

Parameters
icharacter index
Precondition
0 <= i < length()

Definition at line 334 of file straccum.hh.

References _len, _s, assert(), and i.

◆ operator[]() [2/2]

char StringAccum::operator[] ( int  i) const
inline

Return the ith character in the string.

Parameters
icharacter index
Precondition
0 <= i < length()

Definition at line 326 of file straccum.hh.

References _len, _s, assert(), and i.

◆ out_of_memory()

bool StringAccum::out_of_memory ( ) const
inline

Return true iff the StringAccum is out-of-memory.

Definition at line 319 of file straccum.hh.

References _cap.

Referenced by operator=(), and take_string().

◆ pop_back()

void StringAccum::pop_back ( int  n = 1)
inline

Remove characters from the end of the StringAccum.

Parameters
nnumber of characters to remove
Precondition
n >= 0 and n <= length()

Same as adjust_length(-n).

Definition at line 444 of file straccum.hh.

References _len, assert(), and n.

Referenced by adjust_font_definitions(), DvipsEncoding::make_metrics(), Metrics::shrink_encoding(), Efont::Cff::Dict::unparse(), and GlyphFilter::unparse().

◆ reserve()

char * StringAccum::reserve ( int  n)
inline

Reserve space for at least n characters.

Returns
a pointer to at least n characters, or null if allocation fails
Precondition
n >= 0

reserve() does not change the string's length(), only its capacity(). In a frequent usage pattern, code calls reserve(), passing an upper bound on the characters that could be written by a series of operations. After writing into the returned buffer, adjust_length() is called to account for the number of characters actually written.

On failure, null is returned and errno is set to ENOMEM.

Definition at line 391 of file straccum.hh.

References _cap, _len, _s, assert(), grow(), and n.

Referenced by do_file(), ErrorHandler::make_anno(), operator<<(), operator<<(), read_file(), Efont::Type1Definition::set_string(), snprintf(), update_autofont_map(), and write_encoding_file().

◆ resize()

int StringAccum::resize ( int  len)

Set the StringAccum's length to len.

Precondition
len >= 0
Returns
0 on success, -ENOMEM on failure

Definition at line 101 of file straccum.cc.

References _cap, _len, assert(), grow(), and len.

◆ set_length()

void StringAccum::set_length ( int  len)
inline

Set the StringAccum's length to len.

Parameters
lennew length in characters
Precondition
0 <= len <= capacity()
See also
adjust_length

Definition at line 403 of file straccum.hh.

References _cap, _len, assert(), and len.

◆ snprintf()

StringAccum & StringAccum::snprintf ( int  n,
const char *  format,
  ... 
)

Append result of snprintf() to this StringAccum.

Parameters
nmaximum number of characters to print
formatformat argument to snprintf()

The terminating null character is not appended to the string.

Note
The safe vsnprintf() variant is called if it exists. It does in the Linux kernel, and on modern Unix variants. However, if it does not exist on your machine, then this function is actually unsafe, and you should make sure that the printf() invocation represented by your arguments will never write more than n characters, not including the terminating null.

Definition at line 262 of file straccum.cc.

References adjust_length(), assert(), format, len, n, reserve(), va_end, va_start, val, vsnprintf, and cordic::x.

Referenced by Efont::OpenType::Tag::text(), and GlyphFilter::unparse().

◆ swap()

void StringAccum::swap ( StringAccum x)

Swap this StringAccum's contents with x.

Definition at line 215 of file straccum.cc.

References _cap, _len, and _s.

◆ take_string()

String StringAccum::take_string ( )

Return a String object with this StringAccum's contents.

This operation donates the StringAccum's memory to the returned String. After a call to take_string(), the StringAccum object becomes empty, and any future append() operations may cause memory allocations. If the StringAccum is out-of-memory, the returned String is also out-of-memory, but the StringAccum's out-of-memory state is reset.

Definition at line 197 of file straccum.cc.

References _cap, _len, _s, clear(), len, length(), String::make_claim(), String::make_out_of_memory(), out_of_memory(), and str.

Referenced by add_delta_def(), adjust_font_definitions(), Efont::Type1CharstringGen::callsubr_string(), Smoker::char_postscript(), create_type1_font(), CharstringCheckerErrorHandler< T >::decorate(), do_file(), Sectioner::gen(), hard_printable(), MyFont::kill_def(), kill_def(), DvipsEncoding::landmark(), Efont::OpenType::Font::make(), DvipsEncoding::make_metrics(), Efont::OpenType::operator&(), output_metrics(), Smoker::points_postscript(), read_file(), report_underused_features(), Efont::Type1Definition::set_string(), Efont::Type1Definition::set_val(), shell_quote(), Metrics::shrink_encoding(), Efont::Type1Font::skeleton_make(), strip_newlines(), Efont::Type1CharstringGen::take_string(), Efont::OpenType::Tag::text(), Transform::unparse(), Efont::OpenType::Coverage::unparse(), Efont::OpenType::ClassDef::unparse(), Metrics::Ligature3::unparse(), Efont::OpenType::Substitution::unparse(), Efont::OpenType::Position::unparse(), Efont::OpenType::Positioning::unparse(), update_autofont_map(), Efont::OpenType::Name::utf8_name(), Efont::CharstringUnparser::value(), Efont::Type1Definition::value_string(), and write_encoding_file().

◆ udata() [1/2]

unsigned char * StringAccum::udata ( )
inline

Definition at line 262 of file straccum.hh.

References _s.

◆ udata() [2/2]

const unsigned char * StringAccum::udata ( ) const
inline

Definition at line 258 of file straccum.hh.

References _s.

Referenced by Efont::OpenType::Font::make().

Friends And Related Function Documentation

◆ operator<<() [1/14]

StringAccum & operator<< ( StringAccum sa,
bool  b 
)
related

Append "true" or "false" to sa, depending on b.

Returns
sa

Definition at line 549 of file straccum.hh.

References append(), and b.

◆ operator<<() [2/14]

StringAccum & operator<< ( StringAccum sa,
char  c 
)
related

Append character c to StringAccum sa.

Returns
sa
Note
Same as sa.append(c).

Definition at line 517 of file straccum.hh.

References append(), and c.

◆ operator<<() [3/14]

StringAccum & operator<< ( StringAccum sa,
const char *  cstr 
)
related

Append null-terminated C string cstr to StringAccum sa.

Returns
sa
Note
Same as sa.append(cstr).

Definition at line 539 of file straccum.hh.

◆ operator<< [4/14]

StringAccum & operator<< ( StringAccum sa,
const char *  cstr 
)
friend

Append null-terminated C string cstr to StringAccum sa.

Returns
sa
Note
Same as sa.append(cstr).

Definition at line 539 of file straccum.hh.

◆ operator<< [5/14]

StringAccum & operator<< ( StringAccum sa,
const String str 
)
friend

Append the contents of str to sa.

Returns
sa

Definition at line 599 of file straccum.hh.

◆ operator<<() [6/14]

StringAccum & operator<< ( StringAccum sa,
const String str 
)
related

Append the contents of str to sa.

Returns
sa

Definition at line 599 of file straccum.hh.

◆ operator<<() [7/14]

StringAccum & operator<< ( StringAccum sa,
const StringAccum sb 
)
related

Append the contents of sb to sa.

Returns
sa

Definition at line 621 of file straccum.hh.

References append(), begin(), and end().

◆ operator<<() [8/14]

StringAccum & operator<< ( StringAccum sa,
int  i 
)
related

Append decimal representation of i to sa.

Returns
sa

Definition at line 581 of file straccum.hh.

References i.

◆ operator<<() [9/14]

StringAccum & operator<< ( StringAccum sa,
long  i 
)
related

Append decimal representation of i to sa.

Returns
sa

Definition at line 228 of file straccum.cc.

References adjust_length(), i, len, reserve(), sprintf, and cordic::x.

◆ operator<<() [10/14]

StringAccum & operator<< ( StringAccum sa,
short  i 
)
related

Append decimal representation of i to sa.

Returns
sa

Definition at line 563 of file straccum.hh.

References i.

◆ operator<<() [11/14]

StringAccum & operator<< ( StringAccum sa,
unsigned char  c 
)
related

Append character c to StringAccum sa.

Returns
sa
Note
Same as sa.append(c).

Definition at line 528 of file straccum.hh.

References append(), and c.

◆ operator<<() [12/14]

StringAccum & operator<< ( StringAccum sa,
unsigned long  u 
)
related

Append decimal representation of u to sa.

Returns
sa

Definition at line 241 of file straccum.cc.

References adjust_length(), len, reserve(), sprintf, u, and cordic::x.

◆ operator<<() [13/14]

StringAccum & operator<< ( StringAccum sa,
unsigned short  u 
)
related

Append decimal representation of u to sa.

Returns
sa

Definition at line 572 of file straccum.hh.

References u.

◆ operator<<() [14/14]

StringAccum & operator<< ( StringAccum sa,
unsigned  u 
)
related

Append decimal representation of u to sa.

Returns
sa

Definition at line 590 of file straccum.hh.

References u.

Member Data Documentation

◆ _cap

◆ _len

◆ _s


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