diff --git a/src/headers/parsing/ParseComponents.hpp b/src/headers/parsing/ParseComponents.hpp index f6edd22..24b7322 100644 --- a/src/headers/parsing/ParseComponents.hpp +++ b/src/headers/parsing/ParseComponents.hpp @@ -63,8 +63,14 @@ public: return reinterpret_cast(it); }); } + IS_PARSECOMPONENT + auto findReferencesById() const { + return findById() | views::transform([](T* it) { + return static_cast(*it); + }); + } IS(StandardComponents::NamedIdentifier) - optional> findByName(const string& name) const { + optional> findReferenceByName(const string& name) const { auto identifiers = findById(); for (T* identifier: identifiers) { if (identifier->getId() == typeid(T) && identifier->name == name) {