示例#1
0
文件: Union.cpp 项目: vt4a2h/uml-tool
 /**
  * @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();
 }
示例#2
0
 /**
  * @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();
 }
示例#3
0
 /**
  * @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();
 }