mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1532 Rename RifEclipseOutputTableFormatter to RifEclipseDataTableFormatter
This commit is contained in:
@@ -167,7 +167,7 @@ void RicExportFishbonesWellSegmentsFeature::exportWellSegments(const RimWellPath
|
||||
std::vector<WellSegmentLocation> locations = RicWellPathExportCompletionDataFeature::findWellSegmentLocations(settings.caseToApply, wellPath, fishbonesSubs);
|
||||
|
||||
QTextStream stream(&exportFile);
|
||||
RifEclipseOutputTableFormatter formatter(stream);
|
||||
RifEclipseDataTableFormatter formatter(stream);
|
||||
generateWelsegsTable(formatter, wellPath, settings, locations);
|
||||
generateCompsegsTable(formatter, wellPath, settings, locations);
|
||||
}
|
||||
@@ -175,7 +175,7 @@ void RicExportFishbonesWellSegmentsFeature::exportWellSegments(const RimWellPath
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportFishbonesWellSegmentsFeature::generateWelsegsTable(RifEclipseOutputTableFormatter& formatter, const RimWellPath* wellPath, const RicExportWellSegmentsSettingsUi& settings, const std::vector<WellSegmentLocation>& locations)
|
||||
void RicExportFishbonesWellSegmentsFeature::generateWelsegsTable(RifEclipseDataTableFormatter& formatter, const RimWellPath* wellPath, const RicExportWellSegmentsSettingsUi& settings, const std::vector<WellSegmentLocation>& locations)
|
||||
{
|
||||
formatter.keyword("WELSEGS");
|
||||
|
||||
@@ -297,7 +297,7 @@ void RicExportFishbonesWellSegmentsFeature::generateWelsegsTable(RifEclipseOutpu
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportFishbonesWellSegmentsFeature::generateCompsegsTable(RifEclipseOutputTableFormatter& formatter, const RimWellPath* wellPath, const RicExportWellSegmentsSettingsUi& settings, const std::vector<WellSegmentLocation>& locations)
|
||||
void RicExportFishbonesWellSegmentsFeature::generateCompsegsTable(RifEclipseDataTableFormatter& formatter, const RimWellPath* wellPath, const RicExportWellSegmentsSettingsUi& settings, const std::vector<WellSegmentLocation>& locations)
|
||||
{
|
||||
RigMainGrid* grid = settings.caseToApply->eclipseCaseData()->mainGrid();
|
||||
formatter.keyword("COMPSEGS");
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RifEclipseOutputTableFormatter.h"
|
||||
#include "RifEclipseDataTableFormatter.h"
|
||||
|
||||
#include "RicExportWellSegmentsSettingsUi.h"
|
||||
|
||||
@@ -47,6 +47,6 @@ private:
|
||||
static RimWellPath* selectedWellPath();
|
||||
|
||||
static void exportWellSegments(const RimWellPath* wellPath, const std::vector<RimFishbonesMultipleSubs*>& fishbonesSubs, const RicExportWellSegmentsSettingsUi& settings);
|
||||
static void generateWelsegsTable(RifEclipseOutputTableFormatter& formatter, const RimWellPath* wellPath, const RicExportWellSegmentsSettingsUi& settings, const std::vector<WellSegmentLocation>& locations);
|
||||
static void generateCompsegsTable(RifEclipseOutputTableFormatter& formatter, const RimWellPath* wellPath, const RicExportWellSegmentsSettingsUi& settings, const std::vector<WellSegmentLocation>& locations);
|
||||
static void generateWelsegsTable(RifEclipseDataTableFormatter& formatter, const RimWellPath* wellPath, const RicExportWellSegmentsSettingsUi& settings, const std::vector<WellSegmentLocation>& locations);
|
||||
static void generateCompsegsTable(RifEclipseDataTableFormatter& formatter, const RimWellPath* wellPath, const RicExportWellSegmentsSettingsUi& settings, const std::vector<WellSegmentLocation>& locations);
|
||||
};
|
||||
|
||||
@@ -149,7 +149,7 @@ void RicWellPathExportCompletionDataFeature::exportCompletions(const std::vector
|
||||
}
|
||||
|
||||
QTextStream stream(&exportFile);
|
||||
RifEclipseOutputTableFormatter formatter(stream);
|
||||
RifEclipseDataTableFormatter formatter(stream);
|
||||
|
||||
for (auto wellPath : wellPaths)
|
||||
{
|
||||
@@ -190,7 +190,7 @@ void RicWellPathExportCompletionDataFeature::exportCompletions(const std::vector
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellPathExportCompletionDataFeature::generateCompdatTable(RifEclipseOutputTableFormatter& formatter, const std::vector<RigCompletionData>& completionData)
|
||||
void RicWellPathExportCompletionDataFeature::generateCompdatTable(RifEclipseDataTableFormatter& formatter, const std::vector<RigCompletionData>& completionData)
|
||||
{
|
||||
std::vector<RifEclipseOutputTableColumn> header = {
|
||||
RifEclipseOutputTableColumn("Well"),
|
||||
@@ -271,7 +271,7 @@ void RicWellPathExportCompletionDataFeature::generateCompdatTable(RifEclipseOutp
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellPathExportCompletionDataFeature::generateWpimultTable(RifEclipseOutputTableFormatter& formatter, const std::vector<RigCompletionData>& completionData)
|
||||
void RicWellPathExportCompletionDataFeature::generateWpimultTable(RifEclipseDataTableFormatter& formatter, const std::vector<RigCompletionData>& completionData)
|
||||
{
|
||||
std::vector<RifEclipseOutputTableColumn> header = {
|
||||
RifEclipseOutputTableColumn("Well"),
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RifEclipseOutputTableFormatter.h"
|
||||
#include "RifEclipseDataTableFormatter.h"
|
||||
|
||||
#include "RigWellLogExtractionTools.h"
|
||||
#include "RigWellPathIntersectionTools.h"
|
||||
@@ -130,8 +130,8 @@ public:
|
||||
private:
|
||||
static void exportCompletions(const std::vector<RimWellPath*>& wellPaths, const RicExportCompletionDataSettingsUi& exportSettings);
|
||||
|
||||
static void generateCompdatTable(RifEclipseOutputTableFormatter& formatter, const std::vector<RigCompletionData>& completionData);
|
||||
static void generateWpimultTable(RifEclipseOutputTableFormatter& formatter, const std::vector<RigCompletionData>& completionData);
|
||||
static void generateCompdatTable(RifEclipseDataTableFormatter& formatter, const std::vector<RigCompletionData>& completionData);
|
||||
static void generateWpimultTable(RifEclipseDataTableFormatter& formatter, const std::vector<RigCompletionData>& completionData);
|
||||
|
||||
static std::vector<RigCompletionData> generateFishbonesCompdatValues(const RimWellPath* wellPath, const RicExportCompletionDataSettingsUi& settings);
|
||||
static std::vector<RigCompletionData> generateFishbonesWellPathCompdatValues(const RimWellPath* wellPath, const RicExportCompletionDataSettingsUi& settings);
|
||||
|
||||
@@ -5,9 +5,9 @@ if (${CMAKE_VERSION} VERSION_GREATER "2.8.2")
|
||||
endif()
|
||||
|
||||
set (SOURCE_GROUP_HEADER_FILES
|
||||
${CEE_CURRENT_LIST_DIR}RifEclipseDataTableFormatter.h
|
||||
${CEE_CURRENT_LIST_DIR}RifEclipseInputFileTools.h
|
||||
${CEE_CURRENT_LIST_DIR}RifEclipseOutputFileTools.h
|
||||
${CEE_CURRENT_LIST_DIR}RifEclipseOutputTableFormatter.h
|
||||
${CEE_CURRENT_LIST_DIR}RifEclipseRestartDataAccess.h
|
||||
${CEE_CURRENT_LIST_DIR}RifEclipseRestartFilesetAccess.h
|
||||
${CEE_CURRENT_LIST_DIR}RifEclipseSummaryTools.h
|
||||
@@ -25,9 +25,9 @@ ${CEE_CURRENT_LIST_DIR}RifWellPathImporter.h
|
||||
)
|
||||
|
||||
set (SOURCE_GROUP_SOURCE_FILES
|
||||
${CEE_CURRENT_LIST_DIR}RifEclipseDataTableFormatter.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RifEclipseInputFileTools.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RifEclipseOutputFileTools.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RifEclipseOutputTableFormatter.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RifEclipseRestartDataAccess.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RifEclipseRestartFilesetAccess.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RifEclipseUnifiedRestartFileAccess.cpp
|
||||
|
||||
@@ -16,21 +16,21 @@
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RifEclipseOutputTableFormatter.h"
|
||||
#include "RifEclipseDataTableFormatter.h"
|
||||
|
||||
#include "cvfAssert.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseOutputTableFormatter::RifEclipseOutputTableFormatter(QTextStream& out) : m_out(out)
|
||||
RifEclipseDataTableFormatter::RifEclipseDataTableFormatter(QTextStream& out) : m_out(out)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseOutputTableFormatter::~RifEclipseOutputTableFormatter()
|
||||
RifEclipseDataTableFormatter::~RifEclipseDataTableFormatter()
|
||||
{
|
||||
CVF_ASSERT(m_buffer.empty());
|
||||
CVF_ASSERT(m_columns.empty());
|
||||
@@ -39,7 +39,7 @@ RifEclipseOutputTableFormatter::~RifEclipseOutputTableFormatter()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RifEclipseOutputTableFormatter::outputBuffer()
|
||||
void RifEclipseDataTableFormatter::outputBuffer()
|
||||
{
|
||||
if (m_columns.size() > 0)
|
||||
{
|
||||
@@ -74,7 +74,7 @@ void RifEclipseOutputTableFormatter::outputBuffer()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RifEclipseOutputTableFormatter::outputComment(RifEclipseOutputTableLine& comment)
|
||||
void RifEclipseDataTableFormatter::outputComment(RifEclipseOutputTableLine& comment)
|
||||
{
|
||||
m_out << "-- " << comment.data[0] << "\n";
|
||||
}
|
||||
@@ -82,7 +82,7 @@ void RifEclipseOutputTableFormatter::outputComment(RifEclipseOutputTableLine& co
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RifEclipseOutputTableFormatter::tableCompleted()
|
||||
void RifEclipseDataTableFormatter::tableCompleted()
|
||||
{
|
||||
outputBuffer();
|
||||
// Output an "empty" line after a finished table
|
||||
@@ -92,7 +92,7 @@ void RifEclipseOutputTableFormatter::tableCompleted()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseOutputTableFormatter& RifEclipseOutputTableFormatter::keyword(const QString keyword)
|
||||
RifEclipseDataTableFormatter& RifEclipseDataTableFormatter::keyword(const QString keyword)
|
||||
{
|
||||
CVF_ASSERT(m_buffer.empty());
|
||||
CVF_ASSERT(m_columns.empty());
|
||||
@@ -103,7 +103,7 @@ RifEclipseOutputTableFormatter& RifEclipseOutputTableFormatter::keyword(const QS
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseOutputTableFormatter& RifEclipseOutputTableFormatter::header(const std::vector<RifEclipseOutputTableColumn> header)
|
||||
RifEclipseDataTableFormatter& RifEclipseDataTableFormatter::header(const std::vector<RifEclipseOutputTableColumn> header)
|
||||
{
|
||||
outputBuffer();
|
||||
m_columns = header;
|
||||
@@ -117,7 +117,7 @@ RifEclipseOutputTableFormatter& RifEclipseOutputTableFormatter::header(const std
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseOutputTableFormatter& RifEclipseOutputTableFormatter::comment(const QString comment)
|
||||
RifEclipseDataTableFormatter& RifEclipseDataTableFormatter::comment(const QString comment)
|
||||
{
|
||||
RifEclipseOutputTableLine line;
|
||||
line.data.push_back(comment);
|
||||
@@ -136,7 +136,7 @@ RifEclipseOutputTableFormatter& RifEclipseOutputTableFormatter::comment(const QS
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseOutputTableFormatter& RifEclipseOutputTableFormatter::add(const QString str)
|
||||
RifEclipseDataTableFormatter& RifEclipseDataTableFormatter::add(const QString str)
|
||||
{
|
||||
size_t column = m_lineBuffer.size();
|
||||
CVF_ASSERT(column < m_columns.size());
|
||||
@@ -148,7 +148,7 @@ RifEclipseOutputTableFormatter& RifEclipseOutputTableFormatter::add(const QStrin
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseOutputTableFormatter& RifEclipseOutputTableFormatter::add(double num)
|
||||
RifEclipseDataTableFormatter& RifEclipseDataTableFormatter::add(double num)
|
||||
{
|
||||
size_t column = m_lineBuffer.size();
|
||||
CVF_ASSERT(column < m_columns.size());
|
||||
@@ -160,7 +160,7 @@ RifEclipseOutputTableFormatter& RifEclipseOutputTableFormatter::add(double num)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseOutputTableFormatter& RifEclipseOutputTableFormatter::add(int num)
|
||||
RifEclipseDataTableFormatter& RifEclipseDataTableFormatter::add(int num)
|
||||
{
|
||||
size_t column = m_lineBuffer.size();
|
||||
CVF_ASSERT(column < m_columns.size());
|
||||
@@ -172,7 +172,7 @@ RifEclipseOutputTableFormatter& RifEclipseOutputTableFormatter::add(int num)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseOutputTableFormatter& RifEclipseOutputTableFormatter::add(size_t num)
|
||||
RifEclipseDataTableFormatter& RifEclipseDataTableFormatter::add(size_t num)
|
||||
{
|
||||
size_t column = m_lineBuffer.size();
|
||||
CVF_ASSERT(column < m_columns.size());
|
||||
@@ -184,7 +184,7 @@ RifEclipseOutputTableFormatter& RifEclipseOutputTableFormatter::add(size_t num)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseOutputTableFormatter& RifEclipseOutputTableFormatter::addZeroBasedCellIndex(size_t index)
|
||||
RifEclipseDataTableFormatter& RifEclipseDataTableFormatter::addZeroBasedCellIndex(size_t index)
|
||||
{
|
||||
size_t column = m_lineBuffer.size();
|
||||
CVF_ASSERT(column < m_columns.size());
|
||||
@@ -200,7 +200,7 @@ RifEclipseOutputTableFormatter& RifEclipseOutputTableFormatter::addZeroBasedCell
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RifEclipseOutputTableFormatter::rowCompleted()
|
||||
void RifEclipseDataTableFormatter::rowCompleted()
|
||||
{
|
||||
RifEclipseOutputTableLine line;
|
||||
line.data = m_lineBuffer;
|
||||
@@ -212,7 +212,7 @@ void RifEclipseOutputTableFormatter::rowCompleted()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RifEclipseOutputTableFormatter::measure(const QString str)
|
||||
int RifEclipseDataTableFormatter::measure(const QString str)
|
||||
{
|
||||
return str.length();
|
||||
}
|
||||
@@ -220,7 +220,7 @@ int RifEclipseOutputTableFormatter::measure(const QString str)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RifEclipseOutputTableFormatter::measure(double num)
|
||||
int RifEclipseDataTableFormatter::measure(double num)
|
||||
{
|
||||
return format(num).length();
|
||||
}
|
||||
@@ -228,7 +228,7 @@ int RifEclipseOutputTableFormatter::measure(double num)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RifEclipseOutputTableFormatter::measure(int num)
|
||||
int RifEclipseDataTableFormatter::measure(int num)
|
||||
{
|
||||
return format(num).length();
|
||||
}
|
||||
@@ -236,7 +236,7 @@ int RifEclipseOutputTableFormatter::measure(int num)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RifEclipseOutputTableFormatter::measure(size_t num)
|
||||
int RifEclipseDataTableFormatter::measure(size_t num)
|
||||
{
|
||||
return format(num).length();
|
||||
}
|
||||
@@ -244,7 +244,7 @@ int RifEclipseOutputTableFormatter::measure(size_t num)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RifEclipseOutputTableFormatter::format(double num)
|
||||
QString RifEclipseDataTableFormatter::format(double num)
|
||||
{
|
||||
return QString("%1").arg(num, 0, 'f', m_doubleDecimals);
|
||||
}
|
||||
@@ -252,7 +252,7 @@ QString RifEclipseOutputTableFormatter::format(double num)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RifEclipseOutputTableFormatter::format(int num)
|
||||
QString RifEclipseDataTableFormatter::format(int num)
|
||||
{
|
||||
return QString("%1").arg(num);
|
||||
}
|
||||
@@ -260,7 +260,7 @@ QString RifEclipseOutputTableFormatter::format(int num)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RifEclipseOutputTableFormatter::format(size_t num)
|
||||
QString RifEclipseDataTableFormatter::format(size_t num)
|
||||
{
|
||||
return QString("%1").arg(num);
|
||||
}
|
||||
@@ -268,7 +268,7 @@ QString RifEclipseOutputTableFormatter::format(size_t num)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RifEclipseOutputTableFormatter::formatColumn(const QString str, RifEclipseOutputTableColumn column)
|
||||
QString RifEclipseDataTableFormatter::formatColumn(const QString str, RifEclipseOutputTableColumn column)
|
||||
{
|
||||
if (column.alignment == LEFT)
|
||||
{
|
||||
@@ -71,20 +71,20 @@ struct RifEclipseOutputTableColumn
|
||||
//==================================================================================================
|
||||
//
|
||||
//==================================================================================================
|
||||
class RifEclipseOutputTableFormatter
|
||||
class RifEclipseDataTableFormatter
|
||||
{
|
||||
public:
|
||||
RifEclipseOutputTableFormatter(QTextStream& out);
|
||||
virtual ~RifEclipseOutputTableFormatter();
|
||||
RifEclipseDataTableFormatter(QTextStream& out);
|
||||
virtual ~RifEclipseDataTableFormatter();
|
||||
|
||||
RifEclipseOutputTableFormatter& keyword(const QString keyword);
|
||||
RifEclipseOutputTableFormatter& header(std::vector<RifEclipseOutputTableColumn> tableHeader);
|
||||
RifEclipseOutputTableFormatter& add(const QString str);
|
||||
RifEclipseOutputTableFormatter& add(double num);
|
||||
RifEclipseOutputTableFormatter& add(int num);
|
||||
RifEclipseOutputTableFormatter& add(size_t num);
|
||||
RifEclipseOutputTableFormatter& addZeroBasedCellIndex(size_t index);
|
||||
RifEclipseOutputTableFormatter& comment(const QString str);
|
||||
RifEclipseDataTableFormatter& keyword(const QString keyword);
|
||||
RifEclipseDataTableFormatter& header(std::vector<RifEclipseOutputTableColumn> tableHeader);
|
||||
RifEclipseDataTableFormatter& add(const QString str);
|
||||
RifEclipseDataTableFormatter& add(double num);
|
||||
RifEclipseDataTableFormatter& add(int num);
|
||||
RifEclipseDataTableFormatter& add(size_t num);
|
||||
RifEclipseDataTableFormatter& addZeroBasedCellIndex(size_t index);
|
||||
RifEclipseDataTableFormatter& comment(const QString str);
|
||||
void rowCompleted();
|
||||
void tableCompleted();
|
||||
|
||||
Reference in New Issue
Block a user