void handle_alias_glob2(char **expr, int **t_ind, int **l_ind, t_norm_hag *t) { (t->a) = 0; while ((*expr)[(t->i) + (t->a)] && !( is_whitespace((*expr)[(t->i) + (t->a)]) && !is_intouchable((t->i) + (t->a), (*t_ind), (*l_ind)))) { if (is_intouchable((t->i) + (t->a), (*t_ind), (*l_ind))) { (t->continu) = TRUE; (t->i) += (t->a) + 1; (t->first_time) = FALSE; break ; } (t->a)++; } if ((t->continu) == TRUE) return ; if ((t->first_time)) replace_alias(expr, t_ind, (t->i), (t->a)); replace_glob(expr, t_ind, (t->i), (t->a)); (t->i) += (t->a) + 1; (t->first_time) = FALSE; }
void UmlRelation::compute_dependency(Q3PtrList<CppRefType> & dependencies, const Q3CString & cl_stereotype, bool all_in_h) { if (cl_stereotype == "enum") return; switch (relationKind()) { case aDependency: if (stereotype() == "friend") break; CppRefType::add(roleType(), dependencies, cppDecl() != "#include in source", roleType()->isCppExternal()); break; case aGeneralisation: case aRealization: CppRefType::add(roleType(), dependencies, TRUE); break; default: Q3CString decl = cppDecl(); int index; if ((index = decl.find("${static}")) != -1) decl.remove((unsigned) index, 9); if ((index = decl.find("${mutable}")) != -1) decl.remove((unsigned) index, 10); if ((index = decl.find("${volatile}")) != -1) decl.remove((unsigned) index, 11); if ((index = decl.find("${const}")) != -1) decl.remove((unsigned) index, 8); if ((index = decl.find("${multiplicity}")) != -1) decl.remove((unsigned) index, 15); if ((index = decl.find("${name}")) != -1) decl.remove((unsigned) index, 7); if ((index = decl.find("${inverse_name}")) != -1) decl.remove((unsigned) index, 15); if ((index = decl.find("${value}")) != -1) decl.remove((unsigned) index, 8); if ((index = decl.find("${h_value}")) != -1) decl.remove((unsigned) index, 10); if ((index = decl.find("${stereotype}")) != -1) decl.replace((unsigned) index, 13, CppSettings::relationAttributeStereotype(stereotype())); if ((index = decl.find("${association}")) != -1) { decl.replace((unsigned) index, 14, association().toString()); } replace_alias(decl); UmlTypeSpec type; type.type = roleType(); UmlClassMember::compute_dependency(dependencies, decl, type, all_in_h); } }
void UmlAttribute::compute_dependency(Q3PtrList<CppRefType> & dependency, const Q3CString & cl_stereotype, bool all_in_h) { if ((cl_stereotype == "enum") || (cl_stereotype == "typedef")) return; Q3CString decl = cppDecl(); int index; if ((index = decl.find("${static}")) != -1) decl.remove((unsigned) index, 9); if ((index = decl.find("${mutable}")) != -1) decl.remove((unsigned) index, 10); if ((index = decl.find("${volatile}")) != -1) decl.remove((unsigned) index, 11); if ((index = decl.find("${const}")) != -1) decl.remove((unsigned) index, 8); if ((index = decl.find("${multiplicity}")) != -1) decl.remove((unsigned) index, 15); if ((index = decl.find("${value}")) != -1) decl.remove((unsigned) index, 8); if ((index = decl.find("${h_value}")) != -1) decl.remove((unsigned) index, 10); if ((index = decl.find("${name}")) != -1) decl.remove((unsigned) index, 7); if ((index = decl.find("${stereotype}")) != -1) decl.replace((unsigned) index, 13, CppSettings::relationAttributeStereotype(stereotype())); replace_alias(decl); if (!UmlClassMember::compute_dependency(dependency, decl, type(), all_in_h)) { write_trace_header(); UmlCom::trace(Q3CString(" <font color=\"red\"><b>type missing for attribute <i>") + name() + "</i></b></font><br>"); incr_error(); } }
void UmlClass::compute_dependency(Q3PtrList<CppRefType> & dependencies, const Q3CString &, bool all_in_h) { Q3PtrVector<UmlItem> ch = children(); const Q3CString stereotype = cpp_stereotype(); bool a_typedef = (stereotype == "typedef"); bool an_enum = (stereotype == "enum"); const Q3ValueList<UmlFormalParameter> formals = this->formals(); const Q3ValueList<UmlActualParameter> actuals = this->actuals(); if (!formals.isEmpty()) // template class, force depend in h all_in_h = TRUE; for (unsigned index = 0; index != ch.size(); index += 1) { if (ch[index]->kind() != aNcRelation) { UmlClassItem * it = (UmlClassItem *) ch[index]; if (! it->cppDecl().isEmpty()) it->compute_dependency(dependencies, stereotype, all_in_h); } } if (an_enum && (!formals.isEmpty() || !actuals.isEmpty())) { write_trace_header(); UmlCom::trace(" <font color=\"red\"><b><i>template enum</i></b></font><br>"); incr_warning(); } else if (a_typedef && !formals.isEmpty()) { write_trace_header(); UmlCom::trace(" <font color=\"red\"><b><i>template typedef</i></b></font><br>"); incr_warning(); } else { Q3ValueList<UmlFormalParameter>::ConstIterator itf; for (itf = formals.begin(); itf != formals.end(); ++itf) CppRefType::remove((*itf).name(), dependencies); Q3ValueList<UmlActualParameter>::ConstIterator ita; for (ita = actuals.begin(); ita != actuals.end(); ++ita) UmlClassMember::compute_dependency(dependencies, "${type}", (*ita).value(), all_in_h); if (a_typedef) { Q3CString decl = cppDecl(); int index; remove_comments(decl); if ((index = decl.find("${name}")) != -1) decl.remove((unsigned) index, 7); replace_alias(decl); UmlClassMember::compute_dependency(dependencies, decl, baseType(), all_in_h); } } if ((associatedArtifact() == 0) || (associatedArtifact()->associatedClasses().count() == 1)) CppRefType::remove(this, dependencies); else CppRefType::force_ref(this, dependencies); }