Add method to get properties and types as string

This commit is contained in:
Simon Giraudot 2018-08-14 12:22:33 +02:00
parent 65f7ed1534
commit 14091145de
1 changed files with 13 additions and 0 deletions

View File

@ -861,6 +861,19 @@ public:
return out;
}
std::vector<std::pair<std::string, std::type_info> > properties_and_types() const
{
std::vector<std::string> prop = m_base.properties();
prop.erase (prop.begin()); // remove "index"
prop.erase (prop.begin()); // remove "point"
std::vector<std::pair<std::string, std::type_info> > out; out.reserve (prop.size());
for (std::size_t i = 0; i < prop.size(); ++ i)
out.push_back (std::make_pair (prop[i], m_base.get_type(prop[i])));
return out;
}
/*!
\brief Returns a sequence of \ref psp_namedparameters "Named Parameters" for Point Set Processing algorithms.