Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

Table::DuplicateKeyRemover Class Reference

Removes records with identical keys. More...

Inheritance diagram for Table::DuplicateKeyRemover:
Table::Converter::RowManipulator

List of all members.

Public Member Functions

 DuplicateKeyRemover ()
bool accept (BufferStringSet &) const
 if false returned, the row should not be written
int nrRemoved () const

Public Attributes

TypeSet< int > keycols_
 column numbers (mand)

Protected Member Functions

void setPrevKeys (const BufferStringSet &) const

Protected Attributes

BufferStringSet prevkeys_
int nrdone_
int nrremoved_

Detailed Description

Removes records with identical keys.

Will only compare with previous record, so make sure the input is sorted on the keys.


Constructor & Destructor Documentation

Table::DuplicateKeyRemover::DuplicateKeyRemover (  )  [inline]

Member Function Documentation

bool Table::DuplicateKeyRemover::accept ( BufferStringSet  )  const [virtual]

if false returned, the row should not be written

Implements Table::Converter::RowManipulator.

int Table::DuplicateKeyRemover::nrRemoved (  )  const [inline]
void Table::DuplicateKeyRemover::setPrevKeys ( const BufferStringSet  )  const [protected]

Member Data Documentation

column numbers (mand)

int Table::DuplicateKeyRemover::nrdone_ [mutable, protected]
int Table::DuplicateKeyRemover::nrremoved_ [mutable, protected]