souffle  2.0.2-371-g6315b36
Public Member Functions | Data Fields
souffle::profile::Table Class Reference

#include <Table.h>

Collaboration diagram for souffle::profile::Table:
Collaboration graph

Public Member Functions

void addRow (std::shared_ptr< Row > row)
 
std::vector< std::shared_ptr< Row > > getRows ()
 
void sort (int col_num)
 
 Table ()
 

Data Fields

std::vector< std::shared_ptr< Row > > rows
 

Detailed Description

Definition at line 24 of file Table.h.

Constructor & Destructor Documentation

◆ Table()

souffle::profile::Table::Table ( )
inline

Definition at line 28 of file Table.h.

28 : rows() {}

Member Function Documentation

◆ addRow()

void souffle::profile::Table::addRow ( std::shared_ptr< Row row)
inline

◆ getRows()

std::vector<std::shared_ptr<Row> > souffle::profile::Table::getRows ( )
inline

◆ sort()

void souffle::profile::Table::sort ( int  col_num)
inline

Definition at line 38 of file Table.h.

38  {
39  switch (col_num) {
40  case 1: std::sort(rows.begin(), rows.end(), DataComparator::NR_T); break;
41  case 2: std::sort(rows.begin(), rows.end(), DataComparator::R_T); break;
42  case 3: std::sort(rows.begin(), rows.end(), DataComparator::C_T); break;
43  case 4: std::sort(rows.begin(), rows.end(), DataComparator::TUP); break;
44  case 5: std::sort(rows.begin(), rows.end(), DataComparator::ID); break;
45  case 6: std::sort(rows.begin(), rows.end(), DataComparator::NAME); break;
46  case 0:
47  default: // if the col_num isn't defined use TIME
48  std::sort(rows.begin(), rows.end(), DataComparator::TIME);
49  break;
50  }
51  }

References souffle::profile::DataComparator::C_T(), souffle::profile::DataComparator::ID(), souffle::profile::DataComparator::NAME(), souffle::profile::DataComparator::NR_T(), souffle::profile::DataComparator::R_T(), rows, souffle::profile::DataComparator::TIME(), and souffle::profile::DataComparator::TUP().

Referenced by id(), rel(), relRul(), rul(), and verRul().

Here is the call graph for this function:

Field Documentation

◆ rows

std::vector<std::shared_ptr<Row> > souffle::profile::Table::rows

Definition at line 26 of file Table.h.

Referenced by addRow(), genJson(), getRows(), and sort().


The documentation for this class was generated from the following file:
souffle::profile::DataComparator::TIME
static bool TIME(const std::shared_ptr< Row > &a, const std::shared_ptr< Row > &b)
Sort by total time.
Definition: DataComparator.h:30
souffle::profile::Table::rows
std::vector< std::shared_ptr< Row > > rows
Definition: Table.h:26
souffle::profile::DataComparator::R_T
static bool R_T(const std::shared_ptr< Row > &a, const std::shared_ptr< Row > &b)
Sort by recursive time.
Definition: DataComparator.h:40
souffle::profile::DataComparator::NR_T
static bool NR_T(const std::shared_ptr< Row > &a, const std::shared_ptr< Row > &b)
Sort by non-recursive time.
Definition: DataComparator.h:35
souffle::profile::DataComparator::ID
static bool ID(const std::shared_ptr< Row > &a, const std::shared_ptr< Row > &b)
Sort by ID.
Definition: DataComparator.h:60
souffle::profile::DataComparator::C_T
static bool C_T(const std::shared_ptr< Row > &a, const std::shared_ptr< Row > &b)
Sort by copy time.
Definition: DataComparator.h:45
souffle::profile::DataComparator::NAME
static bool NAME(const std::shared_ptr< Row > &a, const std::shared_ptr< Row > &b)
Sort by name.
Definition: DataComparator.h:55
souffle::profile::DataComparator::TUP
static bool TUP(const std::shared_ptr< Row > &a, const std::shared_ptr< Row > &b)
Sort by tuple count.
Definition: DataComparator.h:50