Definition at line 636 of file TableDataSource.h. References GetDoubleDataByID(), GetIntDataByID(), GetNormalizedDataByID(), GetTextDataByID(), mFilterByMark, mFilters, mFiltersActive, mMarkedRows, TYPE_DOUBLE, TYPE_INT, TYPE_NORMALIZEDVALUE, and TYPE_TEXT. Referenced by SortAndFilter(). 00637 { 00638 // filter by marked state: 00639 if (mFilterByMark > -1) 00640 { 00641 if (mMarkedRows.find(id) != mMarkedRows.end()) 00642 { 00643 if (!(mMarkedRows[id] & mFilterByMark)) 00644 return true; 00645 } 00646 else if (mFilterByMark != 0) 00647 return true; 00648 } 00649 00650 // filter by columns: 00651 if (!mFiltersActive) 00652 return false; 00653 00654 std::list<TableFilter*>::iterator it; 00655 for (it=mFilters.begin(); it!=mFilters.end(); it++) 00656 { 00657 if ((*it)->GetType() == TYPE_TEXT) 00658 { 00659 String txt = GetTextDataByID((*it)->GetColumn(), id); 00660 if ((*it)->IsFilteredByText(txt)) 00661 return true; 00662 } 00663 if ((*it)->GetType() == TYPE_NORMALIZEDVALUE) 00664 { 00665 double dVal = GetNormalizedDataByID((*it)->GetColumn(),id); 00666 if ((*it)->IsFilteredByValue(dVal)) 00667 return true; 00668 } 00669 if ((*it)->GetType() == TYPE_DOUBLE) 00670 { 00671 double dVal = GetDoubleDataByID((*it)->GetColumn(),id); 00672 if ((*it)->IsFilteredByValue(dVal)) 00673 return true; 00674 } 00675 if ((*it)->GetType() == TYPE_INT) 00676 { 00677 int iVal = GetIntDataByID((*it)->GetColumn(),id); 00678 // DO: Converts to double automatically? Is this right? 00679 if ((*it)->IsFilteredByValue(iVal)) 00680 return true; 00681 } 00682 } 00683 return false; 00684 }
Here is the call graph for this function:
|