From 2a1d8379a5994a57080bde5f1734cce4fa0ae97f Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Tue, 19 Mar 2019 09:43:11 +0100 Subject: [PATCH] adjustments --- .../CellFilters/RimPlotCellFilter.cpp | 6 ++--- .../CellFilters/RimPlotCellFilter.h | 4 ++-- .../CellFilters/RimPlotCellPropertyFilter.cpp | 4 ++-- doc/cell_filter_classes.plantuml | 24 +++++++++++++++---- 4 files changed, 26 insertions(+), 12 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/GridCrossPlots/CellFilters/RimPlotCellFilter.cpp b/ApplicationCode/ProjectDataModel/GridCrossPlots/CellFilters/RimPlotCellFilter.cpp index 13bbd13950..1abd85e180 100644 --- a/ApplicationCode/ProjectDataModel/GridCrossPlots/CellFilters/RimPlotCellFilter.cpp +++ b/ApplicationCode/ProjectDataModel/GridCrossPlots/CellFilters/RimPlotCellFilter.cpp @@ -36,7 +36,7 @@ CAF_PDM_ABSTRACT_SOURCE_INIT(RimPlotCellFilter, "RimPlotCellFilter"); //-------------------------------------------------------------------------------------------------- RimPlotCellFilter::RimPlotCellFilter() { - CAF_PDM_InitFieldNoDefault(&m_filterType, "FilterType", "Filter Type", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_filterMode, "FilterMode", "Filter Mode", "", "", ""); } //-------------------------------------------------------------------------------------------------- @@ -50,7 +50,7 @@ void RimPlotCellFilter::updateCellVisibility(size_t timeStepIndex, cvf::UByteArr //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimPlotCellFilter::FilterModeType RimPlotCellFilter::filterType() const +RimPlotCellFilter::FilterModeType RimPlotCellFilter::filterMode() const { - return m_filterType(); + return m_filterMode(); } diff --git a/ApplicationCode/ProjectDataModel/GridCrossPlots/CellFilters/RimPlotCellFilter.h b/ApplicationCode/ProjectDataModel/GridCrossPlots/CellFilters/RimPlotCellFilter.h index 7e6a9f24e9..e0eb10d594 100644 --- a/ApplicationCode/ProjectDataModel/GridCrossPlots/CellFilters/RimPlotCellFilter.h +++ b/ApplicationCode/ProjectDataModel/GridCrossPlots/CellFilters/RimPlotCellFilter.h @@ -41,11 +41,11 @@ public: RimPlotCellFilter(); void updateCellVisibility(size_t timeStepIndex, cvf::UByteArray* cellVisibility); - FilterModeType filterType() const; + FilterModeType filterMode() const; protected: virtual void updateCellVisibilityFromFilter(size_t timeStepIndex, cvf::UByteArray* cellVisibility) = 0; private: - caf::PdmField> m_filterType; + caf::PdmField> m_filterMode; }; diff --git a/ApplicationCode/ProjectDataModel/GridCrossPlots/CellFilters/RimPlotCellPropertyFilter.cpp b/ApplicationCode/ProjectDataModel/GridCrossPlots/CellFilters/RimPlotCellPropertyFilter.cpp index 35131934f7..7e1979b41b 100644 --- a/ApplicationCode/ProjectDataModel/GridCrossPlots/CellFilters/RimPlotCellPropertyFilter.cpp +++ b/ApplicationCode/ProjectDataModel/GridCrossPlots/CellFilters/RimPlotCellPropertyFilter.cpp @@ -128,14 +128,14 @@ void RimPlotCellPropertyFilter::updateCellVisibilityFromFilter(size_t timeStepIn double scalarValue = cellResultValues[cellResultIndex]; if (lowerBound <= scalarValue && scalarValue <= upperBound) { - if (filterType() == RimPlotCellFilter::EXCLUDE) + if (filterMode() == RimPlotCellFilter::EXCLUDE) { (*visibleCells)[reservoirCellIndex] = false; } } else { - if (filterType() == RimPlotCellFilter::INCLUDE) + if (filterMode() == RimPlotCellFilter::INCLUDE) { (*visibleCells)[reservoirCellIndex] = false; } diff --git a/doc/cell_filter_classes.plantuml b/doc/cell_filter_classes.plantuml index c034d9d6e4..e464fe3e06 100644 --- a/doc/cell_filter_classes.plantuml +++ b/doc/cell_filter_classes.plantuml @@ -1,13 +1,27 @@ @startuml -package Rim { PdmObject <|-- RimPlotCellFilter -RimPlotCellFilter <|-- RimPlotCellRangeFilter -RimPlotCellFilter <|-- RimPlotCellPropertyFilter -RimPlotCellFilter <|-- RimPlotCellRegionFilter + class RimPlotCellFilter { - bool isCellAcceptedByFilter(size_t reservoirCellIndex); + void updateCellVisibilityFromFilter(size_t timeStepIndex, + cvf::UByteArray* cellVisibility) + + FilterModeType filterMode() const; } + +RimPlotCellFilter <|-- RimPlotCellPropertyFilter +RimPlotCellFilter <|-- RimPlotCellFilterCollection + +RimPlotCellFilterCollection -> RimPlotCellFilter +class RimPlotCellFilterCollection +{ + std::vector m_filters +} + +RimPlotCellFilter <|-- RimPlotCellRegionFilter_planned +RimPlotCellFilter <|-- RimPlotCellRangeFilter_planned + + @enduml