/** * @brief Union::getField * @param name * @return */ SharedField Union::getField(const QString &name) const { auto it = ranges::find_if(m_Fields, [&](auto &&f) {return f->name() == name;}); return it != m_Fields.cend() ? *it : SharedField(); }
/** * @brief ClassMethod::getParameter * @param name * @return */ SharedField ClassMethod::getParameter(const QString &name) const { Q_ASSERT(!name.isEmpty()); auto it = range::find_if(m_Parameters, [&name](auto &f){ return f->name() == name; }); return it != m_Parameters.end() ? *it : SharedField(); }
/** * @brief Class::getField * @param name * @return */ SharedField Class::getField(const QString &name) const { auto it = range::find_if(m_Fields, [&name](const SharedField &f){ return f->name() == name; }); return it != m_Fields.end() ? *it : SharedField(); }