本文整理汇总了C++中UmlOperation::set_Description方法的典型用法代码示例。如果您正苦于以下问题:C++ UmlOperation::set_Description方法的具体用法?C++ UmlOperation::set_Description怎么用?C++ UmlOperation::set_Description使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UmlOperation
的用法示例。
在下文中一共展示了UmlOperation::set_Description方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QCString
UmlOperation * UmlOperation::cpp2Python(UmlClass * python, UmlClass * cpp,
const char * cppname,
const char * pythonname)
{
if (pythonname == 0)
pythonname = cppname;
UmlOperation * from = cpp->get_operation(cppname);
if (from == 0) {
QCString err = QCString("cannot find operation '") +
cppname + QCString("' in class '") + cpp->name()
+ QCString("'<br>\n");
UmlCom::trace(err);
throw 0;
}
UmlOperation * to = UmlBaseOperation::create(python, pythonname);
if (to == 0) {
QCString err = QCString("cannot create operation '") +
pythonname + QCString("' in class '") + python->name()
+ QCString("'<br>\n");
UmlCom::trace(err);
throw 0;
}
UmlCom::trace("add operation " + python->name() + "::" + pythonname + "<br>\n");
to->set_Description(::cpp2Python(from->description()));
to->set_ReturnType(from->returnType());
to->set_isClassMember(from->isClassMember());
to->set_Visibility(from->visibility());
to->set_CppVisibility(from->cppVisibility());
const QValueList<UmlParameter> params = from->params();
unsigned index;
for (index = 0; index != params.count(); index += 1)
to->addParameter(index, params[index]);
const QValueList<UmlTypeSpec> exceptions = from->exceptions();
for (index = 0; index != exceptions.count(); index += 1)
to->addException(index, exceptions[index]);
to->set_isCppVirtual(from->isCppVirtual());
to->set_isCppConst(from->isCppConst());
to->set_isCppInline(from->isCppInline());
to->set_CppDecl(::cpp2Python(from->cppDecl()));
to->set_CppDef(::cpp2Python(from->cppDef()));
to->set_CppBody(::cpp2Python(from->cppBody()));
to->set_isJavaFinal(from->isJavaFinal());
to->set_JavaDef(from->javaDef());
to->set_JavaBody(::cpp2Python(from->javaBody()));
return to;
}
示例2: new_one
//.........这里部分代码省略.........
container->set_updated();
}
}
if (ite1 != exceptions.end()) {
// have missing exceptions
container->set_updated();
do {
op->addException(rank, *ite1);
ite1++;
rank += 1;
} while (ite1 != exceptions.end());
}
else if (ite2 != old_exceptions.end()) {
// have extra exceptions
container->set_updated();
do {
op->removeException(rank);
ite2++;
} while (ite2 != old_exceptions.end());
}
if (neq(def, op->javaDecl())) {
container->set_updated();
op->set_JavaDecl(def);
}
Lex::clear_comments(); // params & body comments
Lex::finish_line();
if (def.find("${description}") != -1) {
if (nequal(op->description(), description)) {
container->set_updated();
op->set_Description(description);
}
}
else if (nequal(op->description(), Lex::simplify_comment(comment))) {
op->set_Description(comment); // comment was set
container->set_updated();
}
expected_order.append(op);
return TRUE;
}
// operation doesn't yet exist
container->set_updated();
op = UmlBaseOperation::create(cl, name);
if (op == 0) {
JavaCatWindow::trace(Q3CString("<font face=helvetica><b>cannot add operation <i>")
+ name + "</i> in <i>" + cl->name()
+ "</i></b></font><br>");
throw 0;
}
expected_order.append(op);
Q3ValueList<UmlParameter>::ConstIterator itp;
for (rank = 0, itp = params.begin(); itp != params.end(); ++itp)
op->addParameter(rank++, *itp);
Q3ValueList<UmlTypeSpec>::ConstIterator ite;
示例3: import
void UmlOperation::import(File & f, UmlClass * parent)
{
QByteArray s;
if (f.read(s) != STRING)
f.syntaxError(s, "operations's name");
QByteArray id;
QByteArray ste;
QByteArray doc;
QHash<QByteArray, QByteArray*> prop;
QByteArray s2;
int k;
do {
k = f.readDefinitionBeginning(s2, id, ste, doc, prop);
}
while (id.isEmpty());
UmlOperation * x;
if (scanning) {
QByteArray name;
if (s.left(8) != "operator")
name = (s.at(0) == '~')
? ("~" + legalName(s.mid(1)))
: legalName(s);
else
name = s;
if ((x = UmlBaseOperation::create(parent, name)) == 0) {
UmlCom::trace("<br>cannot create operation '" + s + "' in " +
parent->fullName());
throw 0;
}
newItem(x, id);
if (!ste.isEmpty()) {
bool managed = FALSE;
QStringList l = QString(ste).split(",");
for (QStringList::Iterator it = l.begin();
it != l.end();
++it) {
if ((*it) == "const") {
managed = TRUE;
x->set_isCppConst(TRUE);
}
else if ((*it) == "abstract") {
managed = TRUE;
x->set_isAbstract(TRUE);
x->set_isCppVirtual(TRUE);
}
else if ((*it) == "virtual") {
managed = TRUE;
x->set_isCppVirtual(TRUE);
}
else if ((*it) == "static") {
managed = TRUE;
x->set_isClassMember(TRUE);
}
}
if (!managed)
x->set_Stereotype(ste);
}
if (!doc.isEmpty())
x->set_Description(doc);
}
else if ((x = (UmlOperation *) findItem(id, anOperation)) == 0) {
UmlCom::trace("<br>unknown operation '" + s + "' in " +
parent->fullName());
throw 0;
}
else {
switch (((UmlClass *) x->parent())->language()) {
case Cplusplus:
case AnsiCplusplus:
case VCplusplus:
x->cplusplus(prop);
break;
case Oracle8:
x->oracle8(prop);
break;
case Corba:
x->corba(prop);
break;
case Java:
x->java(prop);
break;
default:
break;
}
//.........这里部分代码省略.........