MCPcopy Create free account
hub / github.com/9miao/CrossApp / clearData

Method clearData

CrossApp/view/CATableView.cpp:443–487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

441}
442
443void CATableView::clearData()
444{
445 m_nSections = 0;
446 m_nRowsInSections.clear();
447 m_nSectionHeaderHeights.clear();
448 m_nSectionFooterHeights.clear();
449 std::vector<std::vector<unsigned int> >::iterator itr;
450 for (itr=m_nRowHeightss.begin(); itr!=m_nRowHeightss.end(); itr++)
451 {
452 itr->clear();
453 }
454 m_nRowHeightss.clear();
455
456 std::vector<std::vector<DRect> >::iterator itr2;
457 for (itr2=m_rTableCellRectss.begin(); itr2!=m_rTableCellRectss.end(); itr2++)
458 {
459 itr2->clear();
460 }
461 m_rTableCellRectss.clear();
462
463 m_rSectionRects.clear();
464
465 std::vector<std::vector<DRect> >::iterator itr3;
466 for (itr3=m_rLineRectss.begin(); itr3!=m_rLineRectss.end(); itr3++)
467 {
468 itr3->clear();
469 }
470 m_rLineRectss.clear();
471 m_pUsedLines.clear();
472
473 std::map<CAIndexPath2E, CATableViewCell*>::iterator itr4;
474 for (itr4=m_mpUsedTableCells.begin(); itr4!=m_mpUsedTableCells.end(); itr4++)
475 {
476 CATableViewCell* cell = itr4->second;
477 CC_CONTINUE_IF(cell == NULL);
478 m_mpFreedTableCells[cell->getReuseIdentifier()].pushBack(cell);
479 itr4->second = NULL;
480 cell->removeFromSuperview();
481 cell->resetCell();
482 }
483 m_mpUsedTableCells.clear();
484 m_vpUsedTableCells.clear();
485 m_pSectionHeaderViews.clear();
486 m_pSectionHeaderViews.clear();
487}
488
489void CATableView::reloadViewSizeData()
490{

Callers 2

~CATableViewMethod · 0.95
reloadViewSizeDataMethod · 0.95

Calls 5

removeFromSuperviewMethod · 0.80
resetCellMethod · 0.80
clearMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected