10#ifndef LIBCWD_CLASS_DEBUG_STRING_H
11#define LIBCWD_CLASS_DEBUG_STRING_H
23struct DebugStringStackElement;
24struct DebugObject_ThreadSpecificData;
35 friend class DebugObject;
36 friend struct DebugObject_ThreadSpecificData;
42 size_t default_capacity_;
43 static constexpr size_t min_capacity = 64;
45 size_t calculate_capacity(
size_t);
46 void internal_assign(
char const* s,
size_t l);
47 void internal_append(
char const* s,
size_t l);
48 void internal_prepend(
char const* s,
size_t l);
49 void internal_swallow(DebugString
const&);
52 void NS_internal_init(
char const* s,
size_t l);
58 friend struct DebugStringStackElement;
59 DebugString(DebugString
const& ds);
65 char const*
c_str()
const;
66 void assign(
char const* str,
size_t len);
67 void append(
char const* str,
size_t len);
68 void prepend(
char const* str,
size_t len);
69 void assign(std::string
const& str);
70 void append(std::string
const& str);
71 void prepend(std::string
const& str);
75struct DebugStringStackElement
78 DebugStringStackElement* next;
The Debug Object class, this object represents one output device (ostream).
Definition DebugObject.h:110
A string class used for the debug output margin and marker.
Definition DebugString.h:34
void append(char const *str, size_t len)
Append str with size len to the string.
Definition DebugString.inl.h:37
void assign(char const *str, size_t len)
Assign str with size len to the string.
Definition DebugString.inl.h:29
void prepend(char const *str, size_t len)
Prepend str with size len to the string.
Definition DebugString.inl.h:45
size_t size() const
The size of the string.
Definition DebugString.inl.h:53
size_t capacity() const
The capacity of the string.
Definition DebugString.inl.h:61
char const * c_str() const
A zero terminated char const pointer.
Definition DebugString.inl.h:69
void reserve(size_t)
Reserve memory for the string in advance.
Definition debug.cxx:777