Exemplo n.º 1
0
numeric_t Column::getTotalValue(const CellValueRetriever* pColumn) const
{
  numeric_t total = 0.0;

  ICell* pCell = nullptr;
  foreach(pCell, m_cells)
    total += pCell->getValue(pColumn);

  return total;
}
Exemplo n.º 2
0
numeric_t Sheet::totalRowValue(const RowId& rowId) const
{
  numeric_t rowTotal = 0.0;

  Column* pColumn = NULL;
  foreach(pColumn, m_columns)
  {
    ICell* pCell = pColumn->cellAt(rowId);
    if (pCell && pCell->isNumeric() && pCell->isPartOfTotal())
      rowTotal += pCell->getValue(NULL); //pass here the total column? useless
  }
Exemplo n.º 3
0
numeric_t SplitComponent::getRowInputUnits(const RowId& rowId) const
{
  numeric_t units = 0.0;


  const InputColumn* pInputCol = NULL;
  foreach(pInputCol, m_inputs)
  {
    ICell* pCell = pInputCol->cellAt(rowId);
    Q_ASSERT(pCell);
    if (pCell)
      units += pCell->getValue(this);
  }