diff --git a/MeshLib/Properties.cpp b/MeshLib/Properties.cpp index ced0d5659dd4db0c6859266d2a4eb22eee631015..4d19b6cc8b6c1182c6f4600753af4479d61d3f70 100644 --- a/MeshLib/Properties.cpp +++ b/MeshLib/Properties.cpp @@ -49,6 +49,18 @@ std::vector<std::string> Properties::getPropertyVectorNames() const return names; } +std::vector<std::string> Properties::getPropertyVectorNames( + MeshLib::MeshItemType t) const +{ + std::vector<std::string> names; + for (auto p : _properties) + { + if (p.second->getMeshItemType() == t) + names.push_back(p.first); + } + return names; +} + Properties Properties::excludeCopyProperties( std::vector<std::size_t> const& exclude_elem_ids, std::vector<std::size_t> const& exclude_node_ids) const diff --git a/MeshLib/Properties.h b/MeshLib/Properties.h index 9c10c6a5348e3e4cadbd6f80483b77c440288e59..35476520586788659121731f7286bcb319e8a154 100644 --- a/MeshLib/Properties.h +++ b/MeshLib/Properties.h @@ -103,6 +103,8 @@ public: bool hasPropertyVector(std::string const& name) const; std::vector<std::string> getPropertyVectorNames() const; + std::vector<std::string> getPropertyVectorNames( + MeshLib::MeshItemType t) const; /** copy all PropertyVector objects stored in the (internal) map but only * those nodes/elements of a PropertyVector whose ids are not in the vectors