本文整理汇总了C++中UMLAttribute::getTypeName方法的典型用法代码示例。如果您正苦于以下问题:C++ UMLAttribute::getTypeName方法的具体用法?C++ UMLAttribute::getTypeName怎么用?C++ UMLAttribute::getTypeName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UMLAttribute
的用法示例。
在下文中一共展示了UMLAttribute::getTypeName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: printAttributes
void SQLWriter::printAttributes(QTextStream& sql, UMLAttributeList attributeList, bool first) {
QString attrDoc = "";
UMLAttribute* at;
for (at=attributeList.first();at;at=attributeList.next())
{
// print , after attribute
if (first == false) {
sql <<",";
} else {
first = false;
}
// print documentation/comment of last attribute at end of line
if (attrDoc.isEmpty() == false)
{
sql << " -- " << attrDoc << m_endl;
} else {
sql << m_endl;
}
// write the attribute
sql << m_indentation << cleanName(at->getName()) << " " << at->getTypeName() << " "
<< (at->getInitialValue().isEmpty()?QString(""):QString(" DEFAULT ")+at->getInitialValue());
// now get documentation/comment of current attribute
attrDoc = at->getDoc();
}
// print documentation/comment at end of line
if (attrDoc.isEmpty() == false)
{
sql << " -- " << attrDoc << m_endl;
} else {
sql << m_endl;
}
return;
}
示例2: getTypeName
/**
* Utility method to get the value of parent object type.
* the typeName of this parameters (e.g. boolean, int, etc or perhaps Class name of
* an object)
* @return the value of type
*/
QString CodeParameter::getTypeName ( )
{
UMLAttribute * at = (UMLAttribute*) m_parentObject;
return at->getTypeName();
}