本文整理汇总了C++中UmlPackage::get_deploymentview方法的典型用法代码示例。如果您正苦于以下问题:C++ UmlPackage::get_deploymentview方法的具体用法?C++ UmlPackage::get_deploymentview怎么用?C++ UmlPackage::get_deploymentview使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UmlPackage
的用法示例。
在下文中一共展示了UmlPackage::get_deploymentview方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: need_artifact
void UmlClass::need_artifact(const QStringList & imports,
bool remove_java_lang,
const QStringList & ,
const WrapperStr & path, UmlArtifact *& cp)
{
if (parent()->kind() == aClassView) {
if (cp != 0)
cp->addAssociatedClass(this);
else {
UmlPackage * pack = (UmlPackage *) parent()->parent();
if ((cp = associatedArtifact()) == 0) {
// create associated artifact
QFileInfo fi(path);
WrapperStr artname = WrapperStr(fi.baseName().toAscii().constData());
if ((cp = UmlBaseArtifact::create(pack->get_deploymentview(), artname)) == 0) {
UmlCom::trace(WrapperStr("<font face=helvetica><b>cannot create<i> artifact ")
+ artname + "</i></b></font><br>");
return;
}
cp->addAssociatedClass(this);
}
cp->set_Stereotype("source");
WrapperStr s = JavaSettings::sourceContent();
int index = s.find("${definition}");
if (index != -1) {
for (QStringList::const_iterator it = imports.begin(); it != imports.end(); it++) {
WrapperStr import = WrapperStr((*it).toAscii().constData());
if (!remove_java_lang || (import != "java.lang.")) {
import += (((const char *) import)[import.length() - 1] == '.')
? "*;\n" : ";\n";
s.insert(index, (const char *)("import " + import));
index = s.find("${definition}", index);
}
}
for (QStringList::const_iterator it = imports.begin(); it != imports.end(); it++) {
s.insert(index, (const char *)("import static" + WrapperStr((*it).toAscii().constData()) + '\n'));
index = s.find("${definition}", index);
}
}
cp->set_JavaSource(WrapperStr(s));
}
}
}
示例2: reverse_file
void Package::reverse_file(WrapperStr path, WrapperStr name)
{
if (! Lex::open(path)) {
// very strange !
if (! scan)
UmlCom::trace(WrapperStr("<font face=helvetica><b>cannot open <i>")
+ path + "</i></b></font><br>");
}
else {
UmlArtifact * art = 0;
WrapperStr file_start;
WrapperStr file_end;
UmlCom::message(((scan) ? "scan " : "reverse ") + path);
// go after <?[php]
Lex::mark();
bool redo;
bool before_class;
do {
redo = FALSE;
before_class = TRUE;
WrapperStr s;
char c = Lex::read_word_bis();
while (c != 0) {
if (c == '<') {
c = Lex::read_word_bis();
if (c == '?') {
if (!scan) file_start = Lex::region();
s = Lex::read_word();
if (s.lower() == "php") {
if (!scan) file_start = Lex::region();
s = Lex::read_word();
}
break;
}
}
else
c = Lex::read_word_bis();
}
aVisibility visibility = PackageVisibility;
bool abstractp = FALSE;
bool finalp = FALSE;
bool inside_namespace_brace = FALSE;
while (!s.isEmpty()) {
if ((s == "class") || (s == "interface")) {
#ifdef REVERSE
if (!scan && (art == 0)) {
UmlPackage * pack = get_uml(TRUE);
if ((art = UmlBaseArtifact::create(pack->get_deploymentview(Namespace::current()), name)) == 0) {
UmlCom::trace(WrapperStr("<font face=helvetica><b>cannot create<i> artifact ")
+ name + "</i></b></font><br>");
Namespace::exit();
Lex::close();
return;
}
art->set_Stereotype("source");
}
#endif
if (!Class::reverse(this, s, abstractp, finalp, path, art))
break;
visibility = PackageVisibility;
abstractp = FALSE;
finalp = FALSE;
before_class = FALSE;
Lex::mark();
}
else if (s == "public")
visibility = PublicVisibility;
else if (s == "protected")
visibility = ProtectedVisibility;
else if (s == "private")
visibility = PrivateVisibility;
else if (s == "final")
finalp = TRUE;
else if (s == "abstract")
abstractp = TRUE;
else if ((s == "namespace") && before_class) {
Namespace::exit();
s = Lex::read_word();
//.........这里部分代码省略.........