void UnwindPlan::InsertRow (const UnwindPlan::RowSP &row_sp) { collection::iterator it = m_row_list.begin(); while (it != m_row_list.end()) { RowSP row = *it; if (row->GetOffset() > row_sp->GetOffset()) break; it++; } m_row_list.insert(it, row_sp); }
void UnwindPlan::InsertRow(const UnwindPlan::RowSP &row_sp, bool replace_existing) { collection::iterator it = m_row_list.begin(); while (it != m_row_list.end()) { RowSP row = *it; if (row->GetOffset() >= row_sp->GetOffset()) break; it++; } if (it == m_row_list.end() || (*it)->GetOffset() != row_sp->GetOffset()) m_row_list.insert(it, row_sp); else if (replace_existing) *it = row_sp; }