本文整理汇总了C++中UmlOperation::set_CppVisibility方法的典型用法代码示例。如果您正苦于以下问题:C++ UmlOperation::set_CppVisibility方法的具体用法?C++ UmlOperation::set_CppVisibility怎么用?C++ UmlOperation::set_CppVisibility使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UmlOperation
的用法示例。
在下文中一共展示了UmlOperation::set_CppVisibility方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}