Skip to content

Commit

Permalink
[processing] allow to iterate over FilterActions
Browse files Browse the repository at this point in the history
  • Loading branch information
alemuntoni committed Mar 8, 2025
1 parent 3ef165d commit da293d9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ class ActionManager
return instance().filterActions(name);
}

static auto filterActions()
{
return instance().filterActions();
}

template<typename MeshType>
static std::shared_ptr<FilterActionT<MeshType>> filterAction(
const std::string& name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ class IDActionContainer
return it->second;
}

auto actions() {
auto f = [](const ActionMap::value_type& p) { return p.second; };
return std::views::transform(mActionMap, f);
}

private:
void checkActionDoesNotExist(const std::string& name) const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ class IDMeshManager

return actions->action<MeshType>();
}

auto filterActions() { return mFilterActions.actions(); }
};

} // namespace vcl::proc::detail
Expand Down

0 comments on commit da293d9

Please sign in to comment.