#1741 Add octave interface command to get names of available NNC properties

This commit is contained in:
Bjørnar Grip Fjær
2017-08-07 15:28:27 +02:00
parent cb06ce11bb
commit 79c48338a7
5 changed files with 256 additions and 0 deletions

View File

@@ -293,6 +293,28 @@ const std::vector<double>* RigNNCData::dynamicConnectionScalarResultByName(const
return nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<QString> RigNNCData::availableProperties(NNCResultType resultType) const
{
std::vector<QString> properties;
for (auto it : m_connectionResults)
{
if (resultType == NNC_STATIC && it.second.size() == 1 && it.second[0].size() > 0)
{
properties.push_back(it.first);
}
else if (resultType == NNC_DYNAMIC && it.second.size() > 1 && it.second[0].size() > 0)
{
properties.push_back(it.first);
}
}
return properties;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------