Problem statement
There are currently 2 signatures for finding components in a resource:
class Resource
{
public:
std::shared_ptr<Component> find(const smtk::common::UUID& id);
std::set<std::shared_ptr<Component>> find(const std::string& query);
};
This is causing problems with python wrapping because pybind11 cannot be configured to provide both overloads (UUIDs can be constructed from strings, so the first signature always matches as far as python is concerned).
Proposal
- If we rename the second signature (that takes a query string and returns a set of components) from
find()
tofilter()
this problem is resolved. - We should also rename the templated
findAs(const std::string& query)
tofilterAs()
for consistency.
- Accept proposal.
- Reject proposal.
- Alternative suggested in discussion below.
0 voters