本文整理汇总了C++中UmlPackage::unload方法的典型用法代码示例。如果您正苦于以下问题:C++ UmlPackage::unload方法的具体用法?C++ UmlPackage::unload怎么用?C++ UmlPackage::unload使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UmlPackage
的用法示例。
在下文中一共展示了UmlPackage::unload方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: importIt
void UmlPackage::importIt(FileIn & in, Token & token, UmlItem * where)
{
while (where->kind() != aPackage)
where = where->parent();
WrapperStr s = token.valueOf("name");
if (s.isEmpty()) {
static unsigned n = 0;
s.sprintf("anonymous %u", ++n);
}
UmlPackage * pack = create((UmlPackage *) where, s);
if (pack == 0)
in.error("cannot create package '" + s + "' in '" + where->name() + "'");
bool profile =
(token.what() == "uml:profile") || (token.xmiType() == "uml:Profile");
if (profile) {
pack->set_Stereotype("profile");
pack->set_PropertyValue("xmiId", token.xmiId());
NumberOf -= 1;
NumberOfProfile += 1;
if (!(s = token.valueOf("metamodelreference")).isEmpty())
pack->set_PropertyValue("metamodelReference", s);
if (!(s = token.valueOf("metaclassreference")).isEmpty())
pack->set_PropertyValue("metaclassReference", s);
}
s = token.xmiId();
if (!s.isEmpty()) {
pack->addItem(s, in);
if (! token.closed()) {
WrapperStr k = token.what();
const char * kstr = k;
if (profile) {
while (in.read(), !token.close(kstr)) {
if ((token.what() == "packagedelement") &&
(token.xmiType() == "uml:Extension")) {
if (! token.closed())
in.finish(token.what());
}
else if (token.what() == "packageimport")
pack->packageImport(in, token);
else
pack->UmlItem::import(in, token);
}
updateProfiles();
}
else
while (in.read(), !token.close(kstr))
pack->UmlItem::import(in, token);
}
}
else if (! token.valueOf("href", s))
in.error("xmi:id is missing"); // doesn't return
else {
in.warning("bypass external package " + s);
if (! token.closed())
in.finish(token.what());
}
pack->unload(TRUE, FALSE);
}