mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
RifEclipseDataTableFormatter. Renamed method to clearify its purpose
This commit is contained in:
parent
6b5f7ed1d9
commit
c4577084dc
@ -668,7 +668,7 @@ void RicWellPathExportCompletionDataFeatureImpl::generateCompsegTable(
|
||||
formatter.add(intersection.gridName());
|
||||
}
|
||||
cvf::Vec3st ijk = intersection.gridLocalCellIJK();
|
||||
formatter.addZeroBasedCellIndex(ijk.x()).addZeroBasedCellIndex(ijk.y()).addZeroBasedCellIndex(
|
||||
formatter.addOneBasedCellIndex(ijk.x()).addOneBasedCellIndex(ijk.y()).addOneBasedCellIndex(
|
||||
ijk.z());
|
||||
formatter.add(completion.branchNumber());
|
||||
|
||||
@ -1127,10 +1127,10 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompdatTableUsingFormatte
|
||||
formatter.add(gridName);
|
||||
}
|
||||
|
||||
formatter.addZeroBasedCellIndex(data.completionDataGridCell().localCellIndexI())
|
||||
.addZeroBasedCellIndex(data.completionDataGridCell().localCellIndexJ())
|
||||
.addZeroBasedCellIndex(data.completionDataGridCell().localCellIndexK())
|
||||
.addZeroBasedCellIndex(data.completionDataGridCell().localCellIndexK());
|
||||
formatter.addOneBasedCellIndex(data.completionDataGridCell().localCellIndexI())
|
||||
.addOneBasedCellIndex(data.completionDataGridCell().localCellIndexJ())
|
||||
.addOneBasedCellIndex(data.completionDataGridCell().localCellIndexK())
|
||||
.addOneBasedCellIndex(data.completionDataGridCell().localCellIndexK());
|
||||
switch (data.connectionState())
|
||||
{
|
||||
case OPEN:
|
||||
@ -1240,9 +1240,9 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWpimultTableUsingFormatte
|
||||
|
||||
formatter.add(completion.wpimult());
|
||||
|
||||
formatter.addZeroBasedCellIndex(completion.completionDataGridCell().localCellIndexI())
|
||||
.addZeroBasedCellIndex(completion.completionDataGridCell().localCellIndexJ())
|
||||
.addZeroBasedCellIndex(completion.completionDataGridCell().localCellIndexK());
|
||||
formatter.addOneBasedCellIndex(completion.completionDataGridCell().localCellIndexI())
|
||||
.addOneBasedCellIndex(completion.completionDataGridCell().localCellIndexJ())
|
||||
.addOneBasedCellIndex(completion.completionDataGridCell().localCellIndexK());
|
||||
formatter.rowCompleted();
|
||||
}
|
||||
|
||||
|
@ -266,16 +266,16 @@ RifEclipseDataTableFormatter& RifEclipseDataTableFormatter::add(size_t num)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseDataTableFormatter& RifEclipseDataTableFormatter::addZeroBasedCellIndex(size_t index)
|
||||
RifEclipseDataTableFormatter& RifEclipseDataTableFormatter::addOneBasedCellIndex(size_t zeroBasedIndex)
|
||||
{
|
||||
size_t column = m_lineBuffer.size();
|
||||
CVF_ASSERT(column < m_columns.size());
|
||||
|
||||
// Increase index by 1 to use Eclipse 1-based cell index instead of ResInsight 0-based
|
||||
index++;
|
||||
zeroBasedIndex++;
|
||||
|
||||
m_columns[column].width = std::max(measure(index), m_columns[column].width);
|
||||
m_lineBuffer.push_back(format(index));
|
||||
m_columns[column].width = std::max(measure(zeroBasedIndex), m_columns[column].width);
|
||||
m_lineBuffer.push_back(format(zeroBasedIndex));
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ public:
|
||||
RifEclipseDataTableFormatter& add(double num);
|
||||
RifEclipseDataTableFormatter& add(int num);
|
||||
RifEclipseDataTableFormatter& add(size_t num);
|
||||
RifEclipseDataTableFormatter& addZeroBasedCellIndex(size_t index);
|
||||
RifEclipseDataTableFormatter& addOneBasedCellIndex(size_t zeroBasedIndex);
|
||||
RifEclipseDataTableFormatter& addValueOrDefaultMarker(double value, double defaultValue);
|
||||
RifEclipseDataTableFormatter& comment(const QString& str);
|
||||
RifEclipseDataTableFormatter& addHorizontalLine(const QChar& str);
|
||||
|
Loading…
Reference in New Issue
Block a user