#include <strtreedump.h>
Collaboration diagram for StringTreeDump:
Public Member Functions | |
StringTreeDump () | |
Create empty string tree dump. | |
~StringTreeDump () | |
Destroy thereby freeing data. | |
void | AddIndent (int n=1) |
Change indent: Increase it by passed amount. | |
void | SubIndent (int n=1) |
Change indent: Decrease it by passed amount. | |
bool | IndentJustAdded () const |
Was the indent just increased? | |
void | append (const TLString &str) |
Append string to the dump:. | |
StringTreeDump & | operator+= (const TLString &str) |
Append string to the dump:. | |
void | RemoveEnd (char c) |
Remove the passed character if that char is at the end of the dump:. | |
size_t | write (FILE *fp, int indent_size=4, char indent_char=' ') |
Write the complete string representation to a FILE *. | |
Private Member Functions | |
StringTreeDump (const StringTreeDump &) | |
Do not use:. | |
void | operator= (const StringTreeDump &) |
Do not use:. | |
Private Attributes | |
LinkedList< Entry > | ents |
int | curr_indent |
bool | indent_just_added |
This class is NOT C++-safe. NOTE: This class is not thread-safe. Only one thread may append strings at a time.
Definition at line 51 of file strtreedump.h.
|
Do not use:.
|
|
Create empty string tree dump.
Definition at line 128 of file strtreedump.cc. References curr_indent, and indent_just_added. |
|
Destroy thereby freeing data.
Definition at line 135 of file strtreedump.cc. References ents, LinkedList< Entry >::IsEmpty(), and LinkedList< Entry >::PopLast(). |
|
Change indent: Increase it by passed amount.
Definition at line 106 of file strtreedump.h. References curr_indent, and indent_just_added. Referenced by VM::AssemblerFile_Plaintext::_WriteSymbols_Global(), VM::AssemblerFile_Plaintext::_WriteSymbols_Recursive(), VM::AssemblerFile_Plaintext::_WriteSymbolSectionContent(), VM::NamespaceInfo::DumpTree(), and VM::ClassInfo::DumpTree(). |
|
Append string to the dump:.
Definition at line 36 of file strtreedump.cc. References StringTreeDump::Entry::append(), LinkedList< Entry >::append(), curr_indent, ents, StringTreeDump::Entry::indent, indent_just_added, LinkedList< Entry >::last(), StringTreeDump::Entry::str, and TLString::TightenSize(). Referenced by VM::VMLinker::LinkAll(), and operator+=(). |
|
Was the indent just increased?
Definition at line 112 of file strtreedump.h. References indent_just_added. |
|
Append string to the dump:.
Definition at line 117 of file strtreedump.h. References append(). |
|
Do not use:.
|
|
Remove the passed character if that char is at the end of the dump:.
Definition at line 52 of file strtreedump.cc. References Assert, ents, LinkedList< Entry >::last(), and StringTreeDump::Entry::RemoveEnd(). |
|
Change indent: Decrease it by passed amount.
Definition at line 109 of file strtreedump.h. References curr_indent. Referenced by VM::AssemblerFile_Plaintext::_WriteSymbols_Global(), VM::AssemblerFile_Plaintext::_WriteSymbols_Recursive(), VM::AssemblerFile_Plaintext::_WriteSymbolSectionContent(), VM::NamespaceInfo::DumpTree(), and VM::ClassInfo::DumpTree(). |
|
Write the complete string representation to a FILE *. The indent_size is the number of indent_char's to be used for one level of indention. Returns number of bytes written. Definition at line 60 of file strtreedump.cc. References TLString::append(), Assert, ents, LinkedList< Entry >::first(), StringTreeDump::Entry::indent, TLString::length(), LinkedListBase< Entry >::next, TLString::str(), StringTreeDump::Entry::str, and TLString::trunc(). Referenced by VM::AssemblerFile_Plaintext::_WriteSymbolSectionContent(), and VM::VMLinker::LinkAll(). |
|
Definition at line 92 of file strtreedump.h. Referenced by AddIndent(), append(), StringTreeDump(), and SubIndent(). |
|
Definition at line 91 of file strtreedump.h. Referenced by append(), RemoveEnd(), write(), and ~StringTreeDump(). |
|
Definition at line 93 of file strtreedump.h. Referenced by AddIndent(), append(), IndentJustAdded(), and StringTreeDump(). |