mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Added member ProgramOptions::firstValue()
This commit is contained in:
parent
f2821cf9be
commit
4db4e44668
@ -1,7 +1,7 @@
|
||||
//##################################################################################################
|
||||
//
|
||||
// Custom Visualization Core library
|
||||
// Copyright (C) 2011-2013 Ceetron AS
|
||||
// Copyright (C) Ceetron Solutions AS
|
||||
//
|
||||
// This library may be used under the terms of either the GNU General Public License or
|
||||
// the GNU Lesser General Public License as follows:
|
||||
@ -392,6 +392,7 @@ std::vector<String> ProgramOptions::values(const String& optionName) const
|
||||
}
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -412,6 +413,23 @@ String ProgramOptions::combinedValues(const String& optionName) const
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::String ProgramOptions::firstValue(const String& optionName) const
|
||||
{
|
||||
const ParsedOption* parsedOption = findParsedOption(optionName);
|
||||
if (parsedOption && parsedOption->m_values.size() > 0)
|
||||
{
|
||||
return parsedOption->m_values[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
return String();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -1,7 +1,7 @@
|
||||
//##################################################################################################
|
||||
//
|
||||
// Custom Visualization Core library
|
||||
// Copyright (C) 2011-2013 Ceetron AS
|
||||
// Copyright (C) Ceetron Solutions AS
|
||||
//
|
||||
// This library may be used under the terms of either the GNU General Public License or
|
||||
// the GNU Lesser General Public License as follows:
|
||||
@ -88,6 +88,7 @@ public:
|
||||
size_t valueCount(const String& optionName) const;
|
||||
std::vector<String> values(const String& optionName) const;
|
||||
String combinedValues(const String& optionName) const;
|
||||
String firstValue(const String& optionName) const;
|
||||
|
||||
std::vector<String> positionalParameters() const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user