Public Member Functions

CrossTable< ROW, DIMS > Class Template Reference

Table for rows with two foreign keys which form a unique pair. More...

#include <rdb/rdb.h>

Inherits RDB::TableBase< ROW, DIMS >.

List of all members.

Public Member Functions


Detailed Description

template<class ROW, int DIMS = 2>
class RDB::CrossTable< ROW, DIMS >

Table for rows with two foreign keys which form a unique pair.


Constructor & Destructor Documentation

CrossTable (  )  [inline]

Default constructor.


Member Function Documentation

void initFirstIndex ( int  size,
typename Base::KeyMethod  keyMethod 
) [inline]

Initialize the first foreign index.

Parameters:
size Size of the hash table to use.
keyMethod Pointer to method returning the first key.
void initSecondIndex ( int  size,
typename Base::KeyMethod  keyMethod 
) [inline]

Initialize the second foreign index.

Parameters:
size Size of the hash table to use.
keyMethod Pointer to method returning the second key.
UniquePairIndex<ROW> index (  )  [inline]

Return the unique pair index.

UniquePairConstIndex<ROW> index (  )  const [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

ROW* find ( int  firstKey,
int  secondKey 
) [inline]

Find the row with the given keys.

const ROW* find ( int  firstKey,
int  secondKey 
) const [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void remove ( int  firstKey,
int  secondKey 
) [inline]

Remove the row with the given keys.

void removeFirst ( int  firstKey  )  [inline]

Remove the rows with the given value of the first key.

void removeSecond ( int  secondKey  )  [inline]

Remove the rows with the given value of the second key.