Files
ResInsight/ApplicationLibCode/ReservoirDataModel/RigCaseRealizationParameters.h
T
Magne Sjaastad 1c4c304064 #14476 ApplicationLibCode: Remove unused cvf includes
Remove 95 cvf include lines that the including file does not use. Found by
extracting the symbols declared by every VizFwk header, including symbols they
re-export, and flagging includes where none of those symbols appear anywhere in
the file. Each removal is verified by a full build.

Most of them are cvfVector3.h and cvfObject.h, left behind as the files they
were once needed by changed.

pch.h is left untouched. It includes cvfObject.h and cvfVector3.h on purpose, so
that the files using the precompiled header do not have to.

Note that a clean build after removing an include does not prove the include was
unnecessary, only that the declarations still arrive some other way. That path
can differ between platforms and with RESINSIGHT_ENABLE_UNITY_BUILD, so this
needs a CI round on Linux as well.
2026-08-07 15:05:57 +02:00

92 lines
2.6 KiB
C++

/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2016- Statoil ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include <QString>
#include <map>
#include <memory>
#include <set>
//==================================================================================================
//
//
//==================================================================================================
class RigCaseRealizationParameters
{
public:
// Internal class
class Value
{
enum ValueType
{
TYPE_NONE,
TYPE_NUMERIC,
TYPE_TEXT
};
public:
Value();
Value( double value );
Value( const QString& value );
void setValue( double value );
void setValue( const QString& value );
bool isValid() const { return m_valueType != TYPE_NONE; }
bool isNumeric() const { return m_valueType == TYPE_NUMERIC; }
bool isText() const { return m_valueType == TYPE_TEXT; }
double numericValue() const;
const QString& textValue() const;
private:
ValueType m_valueType;
double m_numericValue;
QString m_textValue;
};
RigCaseRealizationParameters()
: m_parametersHash( 0 )
, m_realizationNumber( -1 )
{
}
void addParameter( const QString& name, double value );
void addParameter( const QString& name, const QString& value );
Value parameterValue( const QString& name );
std::map<QString, Value> parameters() const;
std::set<QString> parameterNames() const;
size_t parameterHash( const QString& name ) const;
size_t parametersHash();
int realizationNumber() const;
void setRealizationNumber( int realization );
void clearParametersHash();
void calculateParametersHash( const std::set<QString>& paramNames = std::set<QString>() );
private:
std::map<QString, Value> m_parameters;
size_t m_parametersHash;
int m_realizationNumber;
};