3#include "Conditions/SimpleTableCondition.h"
5std::ostream& operator<<(std::ostream& s,
7 s <<
"[ TableCondition: " << btc.
getName() << std::endl;
10 for (
auto name : names) {
11 s <<
",id:\"" << name <<
'"';
14 for (std::size_t i = 0; i < btc.
getRowCount(); i++) {
23std::size_t BaseTableCondition::findKey(
unsigned int id)
const {
24 unsigned int effid =
id & idMask_;
25 std::vector<unsigned int>::const_iterator ptr =
26 std::lower_bound(keys_.begin(), keys_.end(), effid);
27 if (ptr == keys_.end() || *ptr != effid)
30 return std::distance(keys_.begin(), ptr);
33std::size_t BaseTableCondition::findKeyInsert(
unsigned int id)
const {
34 unsigned int effid =
id & idMask_;
35 std::vector<unsigned int>::const_iterator ptr =
36 std::lower_bound(keys_.begin(), keys_.end(), effid);
37 return std::distance(keys_.begin(), ptr);
virtual std::ostream & streamRow(std::ostream &s, int irow) const
Streams a given row of this table.
std::size_t getRowCount() const
Get the number of rows.
const std::vector< std::string > & getColumnNames() const
Get the names of the columns.
std::string getName() const
Get the name of this object.