See header for documentation. */
| 152 | |
| 153 | /* See header for documentation. */ |
| 154 | TraceNode::~TraceNode() |
| 155 | { |
| 156 | g_TraceLog->m_stack.pop_back(); |
| 157 | |
| 158 | auto& out = g_TraceLog->m_file; |
| 159 | size_t depth = g_TraceLog->get_depth(); |
| 160 | size_t out_indent = (depth * 2) * g_trace_indent; |
| 161 | size_t in_indent = (depth * 2 + 1) * g_trace_indent; |
| 162 | |
| 163 | std::string out_indents(""); |
| 164 | if (out_indent) |
| 165 | { |
| 166 | out_indents = std::string(out_indent, ' '); |
| 167 | } |
| 168 | |
| 169 | std::string in_indents(in_indent, ' '); |
| 170 | |
| 171 | if (m_attrib_count) |
| 172 | { |
| 173 | out << "\n" << in_indents; |
| 174 | } |
| 175 | out << "]\n"; |
| 176 | |
| 177 | out << out_indents << "]"; |
| 178 | } |
| 179 | |
| 180 | /* See header for documentation. */ |
| 181 | void trace_add_data( |