本文整理汇总了C++中UMLClassifier::doc方法的典型用法代码示例。如果您正苦于以下问题:C++ UMLClassifier::doc方法的具体用法?C++ UMLClassifier::doc怎么用?C++ UMLClassifier::doc使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UMLClassifier
的用法示例。
在下文中一共展示了UMLClassifier::doc方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateContent
/**
* update the start and end text for this hierarchicalcodeblock.
*/
void CPPHeaderClassDeclarationBlock::updateContent ()
{
CPPHeaderCodeDocument *parentDoc = dynamic_cast<CPPHeaderCodeDocument*>(getParentDocument());
UMLClassifier *c = parentDoc->getParentClassifier();
QString endLine = UMLApp::app()->commonPolicy()->getNewLineEndingChars();
bool isInterface = parentDoc->parentIsInterface(); // a little shortcut
QString CPPHeaderClassName = CodeGenerator::cleanName(c->name());
bool forceDoc = UMLApp::app()->commonPolicy()->getCodeVerboseDocumentComments();
// COMMENT
//check if class is abstract.. it should have abstract methods
if(!isInterface && c->isAbstract() && !c->hasAbstractOps())
{
getComment()->setText(QLatin1String("******************************* Abstract Class ****************************") + endLine
+ CPPHeaderClassName + QLatin1String(" does not have any pure virtual methods, but its author") + endLine
+ QLatin1String(" defined it as an abstract class, so you should not use it directly.") + endLine
+ QLatin1String(" Inherit from it instead and create only objects from the derived classes") + endLine
+ QLatin1String("*****************************************************************************"));
} else {
if(isInterface)
getComment()->setText(QLatin1String("Interface ") + CPPHeaderClassName + endLine + c->doc());
else
getComment()->setText(QLatin1String("Class ") + CPPHeaderClassName + endLine + c->doc());
}
if(forceDoc || !c->doc().isEmpty())
getComment()->setWriteOutText(true);
else
getComment()->setWriteOutText(false);
// Now set START/ENDING Text
QString startText;
/*
*/
/*
if(parentDoc->parentIsInterface())
startText.append(QLatin1String("interface "));
else
*/
startText.append(QLatin1String("class "));
startText.append(CPPHeaderClassName);
// write inheritances out
UMLClassifierList superclasses = c->findSuperClassConcepts();
int nrof_superclasses = superclasses.count();
// write out inheritance
int i = 0;
if(nrof_superclasses >0)
startText.append(QLatin1String(" : "));
foreach (UMLClassifier* concept, superclasses) {
startText.append(Uml::Visibility::toString(concept->visibility()) + QLatin1Char(' ') +
CodeGenerator::cleanName(concept->name()));
if(i != (nrof_superclasses-1))
startText.append(QLatin1String(", "));
i++;
}