Example #1
0
ZOrderedCells::ReverseIterator ZOrderedCells::findLast(const CellSet & cells)
{
    ReverseIterator it = rbegin();
    for(; it != rend(); ++it)
        if(cells.contains(*it))
            break;
    return it;
}
Example #2
0
ZOrderedCells::Iterator ZOrderedCells::findFirst(const CellSet & cells)
{
    Iterator it = begin();
    for(; it != end(); ++it)
        if(cells.contains(*it))
            break;
    return it;
}
Example #3
0
// Insert the new cell just below the lowest boundary cell
void ZOrderedCells::insertCell(Cell * cell)
{
    // Get boundary cells
    CellSet boundary = cell->boundary();

    // Insert at appropriate position
    if(boundary.size() == 0)
    {
        // Insert last
        insertLast(cell);
    }
    else
    {
        // Insert before boundary
        Iterator it = begin();
        while(it!=end() && !boundary.contains(*it))
            ++it;
        list_.insert(it,cell);
    }
}