本文整理汇总了C++中UMLAttribute::setStereotype方法的典型用法代码示例。如果您正苦于以下问题:C++ UMLAttribute::setStereotype方法的具体用法?C++ UMLAttribute::setStereotype怎么用?C++ UMLAttribute::setStereotype使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UMLAttribute
的用法示例。
在下文中一共展示了UMLAttribute::setStereotype方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: parseStmt
//.........这里部分代码省略.........
if (m_source[m_srcIndex] != ":") {
uError() << "importPascal: expecting ':' at " << m_source[m_srcIndex];
skipStmt();
break;
}
nextToken = advance();
if (nextToken.toLower() == "array") {
nextToken = advance().toLower();
if (nextToken != "of") {
uError() << "importPascal(" << name << "): expecting 'array OF' at "
<< nextToken;
skipStmt();
return false;
}
nextToken = advance();
}
for (uint i = 0; i < parNameCount; ++i) {
UMLAttribute *att = Import_Utils::addMethodParameter(op, nextToken, parName[i]);
att->setParmKind(dir);
}
if (advance() != ";")
break;
}
}
QString returnType;
if (keyword == "function") {
if (advance() != ":") {
uError() << "importPascal: expecting \":\" at function "
<< name;
return false;
}
returnType = advance();
} else if (keyword == "constructor" || keyword == "destructor") {
op->setStereotype(keyword);
}
skipStmt();
bool isVirtual = false;
bool isAbstract = false;
checkModifiers(isVirtual, isAbstract);
Import_Utils::insertMethod(m_klass, op, m_currentAccess, returnType,
!isVirtual, isAbstract, false, false, m_comment);
return true;
}
if (m_section != sect_TYPE) {
skipStmt();
return true;
}
if (m_klass == NULL) {
const QString& name = m_source[m_srcIndex];
QString nextToken = advance();
if (nextToken != "=") {
uDebug() << name << ": expecting '=' at " << nextToken;
return false;
}
keyword = advance().toLower();
if (keyword == "(") {
// enum type
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Enum,
name, m_scope[m_scopeIndex], m_comment);
UMLEnum *enumType = static_cast<UMLEnum*>(ns);
while (++m_srcIndex < srcLength && m_source[m_srcIndex] != ")") {
Import_Utils::addEnumLiteral(enumType, m_source[m_srcIndex]);
if (advance() != ",")
break;
}
skipStmt();