| 186 | #endif |
| 187 | |
| 188 | CECTag *CStatTreeItemBase::CreateECTag(uint32_t max_children) |
| 189 | { |
| 190 | if (IsVisible()) { |
| 191 | wxMutexLocker lock(m_lock); |
| 192 | CECTag *tag = new CECTag(EC_TAG_STATTREE_NODE, m_label); |
| 193 | tag->AddTag(CECTag(EC_TAG_STATTREE_NODEID, m_uniqueid)); |
| 194 | AddECValues(tag); |
| 195 | m_visible_counter = max_children - 1; |
| 196 | for (std::list<CStatTreeItemBase*>::const_iterator it = m_children.begin(); |
| 197 | it != m_children.end(); ++it) { |
| 198 | CECTag *tmp = (*it)->CreateECTag(max_children); |
| 199 | if (tmp) { |
| 200 | tag->AddTag(*tmp); |
| 201 | delete tmp; |
| 202 | if (m_flags & stCapChildren) { |
| 203 | if (m_visible_counter == 0) { |
| 204 | break; |
| 205 | } else { |
| 206 | --m_visible_counter; |
| 207 | } |
| 208 | } |
| 209 | } |
| 210 | } |
| 211 | return tag; |
| 212 | } else { |
| 213 | return NULL; |
| 214 | } |
| 215 | } |
| 216 | |
| 217 | |
| 218 | /* CStatTreeItemSimple */ |
no test coverage detected