Add method UDQSet::wgnames()
This commit is contained in:
@@ -83,6 +83,7 @@ public:
|
||||
std::vector<UDQScalar>::const_iterator begin() const;
|
||||
std::vector<UDQScalar>::const_iterator end() const;
|
||||
|
||||
std::vector<std::string> wgnames() const;
|
||||
std::vector<double> defined_values() const;
|
||||
std::size_t defined_size() const;
|
||||
const std::string& name() const;
|
||||
@@ -93,7 +94,7 @@ private:
|
||||
|
||||
|
||||
std::string m_name;
|
||||
UDQVarType m_var_type;
|
||||
UDQVarType m_var_type = UDQVarType::NONE;
|
||||
std::unordered_map<std::string, std::size_t> wgname_index;
|
||||
std::vector<UDQScalar> values;
|
||||
};
|
||||
|
||||
@@ -207,6 +207,12 @@ UDQVarType UDQSet::var_type() const {
|
||||
return this->m_var_type;
|
||||
}
|
||||
|
||||
std::vector<std::string> UDQSet::wgnames() const {
|
||||
std::vector<std::string> names;
|
||||
for (const auto& index_pair : this->wgname_index)
|
||||
names.push_back(index_pair.first);
|
||||
return names;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user