A class used for logical ordering of rows. More...
#include <Promoter.h>
Public Member Functions | |
void | cleanLogRowsAndProcessKeys () |
void | cleanPreproccessKeys () |
Cleans the storage of the primary keys. Next time enabled, will be necessary to proccess all primary keys again. More... | |
size_t | getLogicalRow (const size_t &visualRow) |
Returns the logical position of the row visualRow. More... | |
size_t | map2Row (te::da::ObjectId *oid) |
Given an object id returns its row. More... | |
void | preProcessKeys (te::da::DataSet *dset, const std::vector< size_t > &pkeys) |
Proccess primary keys and stores it. More... | |
void | promote (const te::da::ObjectIdSet *oids) |
Promotes the rows identified by oids primary keys. More... | |
Promoter () | |
Constructor. More... | |
void | resetPromotion () |
Returns the rows to its original positions. More... | |
~Promoter () | |
Destructor. More... | |
Protected Attributes | |
std::vector< size_t > | m_logicalRows |
Map original row to logical postion. More... | |
std::map< std::string, size_t > | m_PkeysRows |
Map object id to its position in DataSet. More... | |
A class used for logical ordering of rows.
The promotion just group a set of ObjectIds on the begining of table. When enable promotion requires some time to preproccess the primary keys of each data on the DataSet. Next time promotion is instantaneous.
Definition at line 69 of file Promoter.h.
te::qt::widgets::Promoter::Promoter | ( | ) |
Constructor.
te::qt::widgets::Promoter::~Promoter | ( | ) |
Destructor.
void te::qt::widgets::Promoter::cleanLogRowsAndProcessKeys | ( | ) |
Cleans pre processed keys and vector of mapping logical rows.
void te::qt::widgets::Promoter::cleanPreproccessKeys | ( | ) |
Cleans the storage of the primary keys. Next time enabled, will be necessary to proccess all primary keys again.
size_t te::qt::widgets::Promoter::getLogicalRow | ( | const size_t & | visualRow | ) |
Returns the logical position of the row visualRow.
visualRow | The visible row. |
size_t te::qt::widgets::Promoter::map2Row | ( | te::da::ObjectId * | oid | ) |
Given an object id returns its row.
oid | Identifier of some row. |
void te::qt::widgets::Promoter::preProcessKeys | ( | te::da::DataSet * | dset, |
const std::vector< size_t > & | pkeys | ||
) |
Proccess primary keys and stores it.
dset | Dataset to be used. |
pkeys | Positions of the primary keys columns. |
void te::qt::widgets::Promoter::promote | ( | const te::da::ObjectIdSet * | oids | ) |
Promotes the rows identified by oids primary keys.
oids | Set of object ids to be promoted. |
void te::qt::widgets::Promoter::resetPromotion | ( | ) |
Returns the rows to its original positions.
|
protected |
Map original row to logical postion.
Definition at line 136 of file Promoter.h.
|
protected |
Map object id to its position in DataSet.
Definition at line 134 of file Promoter.h.