MCPcopy Create free account
hub / github.com/amule-project/amule / CreateECTag

Method CreateECTag

src/StatTree.cpp:188–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186#endif
187
188CECTag *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 */

Callers 1

GetECStatTreeMethod · 0.80

Calls 4

CECTagClass · 0.70
AddTagMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected