/usr/lib/bouml/xmi2import/8833.bodies is in bouml-plugouts-src 4.21-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 | class UmlItem
!!!188546.cpp!!! import(in path : QString) : void
UmlCom::trace("Error : must be applied on a package<br>");
!!!191362.cpp!!! addItem(in id : string, inout in : FileIn) : void
QMap<QCString, UmlItem *>::ConstIterator iter = All.find(id);
if (iter != All.end())
in.error("xmi:id '" + id + "' used twice");
All.insert(id, this);
_xmi_id = id;
!!!191490.cpp!!! import(inout in : FileIn, inout tk : Token) : void
QCString key = tk.what() + " " + tk.xmiType();
PFunc pf = Functions[key];
if (pf != 0)
pf(in, tk, this);
else
in.bypass(tk);
!!!192770.cpp!!! container(in kind : anItemKind, in token : Token, inout in : FileIn) : UmlItem
return parent()->container(kind, token, in);
!!!214530.cpp!!! generalizeDependRealize(inout target : UmlItem, inout in : FileIn, in context : int, in label : string, in constraint : string) : void
static const struct {
aRelationKind rk;
const char * err;
} r[] = {
{ aGeneralisation, "cannot create generalization from '" },
{ aDependency, "cannot create dependency from '" },
{ aRealization, "cannot create realization from '" },
{ aDependency, "cannot create usage from '" },
{ aDependency, "cannot create import from '" }
};
UmlItem * rel = UmlNcRelation::create(r[context].rk, this, target);
if (rel == 0)
in.warning(r[context].err + name() + "' to '" + target->name() + "'");
else if (!label.isEmpty())
rel->set_Name(label);
!!!213250.cpp!!! solveGeneralizationDependencyRealization(in context : int, in idref : string, in label : string, in constraint : string) : void
QMap<QCString, UmlItem *>::Iterator it = All.find(idref);
if (it != All.end()) {
static const struct {
aRelationKind rk;
const char * err;
} r[] = {
{ aGeneralisation, "cannot create generalization from '" },
{ aDependency, "cannot create dependency from '" },
{ aRealization, "cannot create realization from '" },
{ aDependency, "cannot create usage from '" },
{ aDependency, "cannot create import from '" }
};
UmlItem * target = *it;
UmlItem * rel = UmlNcRelation::create(r[context].rk, this, target);
if (rel == 0)
UmlCom::trace(r[context].err + name() + "' to '" + target->name() + "'<br>");
else {
if (! label.isEmpty())
rel->set_Name(label);
switch (context) {
case 3:
rel->set_Stereotype("use");
break;
case 4:
rel->set_Stereotype("import");
break;
default:
break;
}
}
}
else if (!FileIn::isBypassedId(idref))
UmlCom::trace("relation : unknown target reference '" + idref + "'<br>");
!!!211330.cpp!!! setType(in idref : string, inout type : UmlTypeSpec) : bool
if (idref.isEmpty())
return FALSE;
else if (getType(idref, type))
return TRUE;
else {
Unresolved::addRef(this, idref);
return FALSE;
}
!!!195074.cpp!!! setType(in idref : string, in context : int, inout type : UmlTypeSpec) : bool
if (idref.isEmpty())
return FALSE;
else if (getType(idref, type))
return TRUE;
else {
UnresolvedWithContext::add(this, idref, context);
return FALSE;
}
!!!243074.cpp!!! setType(inout token : Token, inout type : UmlTypeSpec) : bool
QCString idref = token.xmiIdref();
if (idref.isEmpty())
return UmlClass::isPrimitiveType(token, type);
else if (getType(idref, type))
return TRUE;
else {
Unresolved::addRef(this, idref);
return FALSE;
}
!!!243202.cpp!!! setType(inout token : Token, in context : int, inout type : UmlTypeSpec) : bool
QCString idref = token.xmiIdref();
if (idref.isEmpty())
return UmlClass::isPrimitiveType(token, type);
else if (getType(idref, type))
return TRUE;
else {
UnresolvedWithContext::add(this, idref, context);
return FALSE;
}
!!!263554.cpp!!! loadFromProfile() : void
QCString id;
if (propertyValue("xmiId", id) && (All.find(id) == All.end()))
All.insert(id, this);
const QVector<UmlItem> ch = children();
unsigned n = ch.size();
for (unsigned u = 0; u != n; u += 1)
ch[u]->loadFromProfile();
!!!209794.cpp!!! getType(in idref : string, inout type : UmlTypeSpec) : bool
QMap<QCString, UmlItem *>::Iterator it = All.find(idref);
type.type = 0;
type.explicit_type = "";
if (it != All.end()) {
if ((*it)->kind() == aClass) {
type.type = (UmlClass *) *it;
return TRUE;
}
else
return FALSE;
}
else {
QMap<QCString, UmlTypeSpec>::Iterator itp = PrimitiveTypes.find(idref);
if (itp != PrimitiveTypes.end()) {
type = *itp;
return TRUE;
}
else
return FALSE;
}
!!!191618.cpp!!! declareFct(in what : string, in type : string, inout fct : PFunc) : void
Functions[what + " " + type] = fct;
!!!253314.cpp!!! getFct(in tk : Token) : PFunc
QCString key = tk.what() + " " + tk.xmiType();
return Functions[key];
!!!259586.cpp!!! readComment(inout in : FileIn, inout token : Token) : QCString
in.bypassedId(token);
QCString doc = token.valueOf("body");
if (! token.closed()) {
QCString k = token.what();
const char * kstr = k;
while (in.read(), !token.close(kstr)) {
if (token.what() == "body") {
if (! doc.isEmpty())
doc += "\n";
doc += in.body("body");
}
else if (! token.closed())
in.finish(token.what());
}
}
return doc;
!!!195458.cpp!!! init() : void
declareFct("xmi:documentation", "", &importDocumentation);
declareFct("ownedcomment", "uml:Comment", &importComment);
declareFct("ownedcomment", "", &importComment); // andromda emf
declareFct("xmi:extension", "", &importExtension);
declareFct("incoming", "", &incoming);
declareFct("outgoing", "", &outgoing);
declareFct("ownedbehavior", "uml:OpaqueBehavior", &importOpaqueDef);
declareFct("ownedmember", "uml:OpaqueExpression", &importOpaqueDef);
declareFct("packagedelement", "uml:OpaqueExpression", &importOpaqueDef);
declareFct("generalization", "uml:Generalization", &importGeneralization);
declareFct("generalization", "", &importGeneralization); // eclipse
declareFct("ownedelement", "uml:Dependency", &importDependency);
declareFct("ownedmember", "uml:Dependency", &importDependency);
declareFct("packagedelement", "uml:Dependency", &importDependency);
declareFct("ownedelement", "uml:Usage", &importDependency);
declareFct("ownedmember", "uml:Usage", &importDependency);
declareFct("packagedelement", "uml:Usage", &importDependency);
declareFct("ownedelement", "uml:Realization", &importRealization);
declareFct("ownedmember", "uml:Realization", &importRealization);
declareFct("packagedelement", "uml:Realization", &importRealization);
declareFct("interfacerealization", "uml:InterfaceRealization", &importRealization);
!!!234242.cpp!!! importDocumentation(inout in : FileIn, inout token : Token, inout where : UmlItem) : void
QCString who = token.valueOf("exporter");
if (who.isNull())
who = token.valueOf("xmi:exporter");
if (! who.isNull()) {
UmlCom::trace("xmi file produced by <b>" + who + "</b><br><br>");
FromBouml = (who == "Bouml");
}
if (! token.closed())
in.finish(token.what());
!!!195586.cpp!!! importComment(inout in : FileIn, inout token : Token, inout where : UmlItem) : void
QCString doc = readComment(in, token);
if (! doc.isEmpty())
where->set_Description(doc);
!!!208514.cpp!!! importExtension(inout in : FileIn, inout token : Token, inout where : UmlItem) : void
if (! token.closed()) {
QCString s = token.valueOf("extender");
if (s.isNull())
s = token.valueOf("xmi:extender");
if (s == "Bouml") {
QCString k = token.what();
const char * kstr = k;
while (in.read(), !token.close(kstr)) {
s = token.what();
if (s == "taggedvalue")
// is closed
where->set_PropertyValue(token.valueOf("tag"), token.valueOf("value"));
else if (s == "stereotype")
where->set_Stereotype(token.valueOf("name"));
if (! token.closed())
in.finish(token.what());
}
}
else if (s == "Visual Paradigm for UML") {
QCString k = token.what();
const char * kstr = k;
while (in.read(), !token.close(kstr)) {
s = token.what();
if (s == "appliedstereotype") {
s = token.valueOf("xmi:value");
if (s.right(3) == "_id") {
s = s.mid(s.find("_") + 1);
s = s.left(s.length() - 3).lower();
}
where->set_Stereotype(s);
}
if (! token.closed())
in.finish(token.what());
}
}
else
in.finish(token.what());
}
!!!212226.cpp!!! importOpaqueDef(inout in : FileIn, inout token : Token, inout where : UmlItem) : void
QCString id = token.xmiId();
QMap<QCString, QCString>::ConstIterator iter = OpaqueDefs.find(id);
if (iter != OpaqueDefs.end())
in.error("xmi:id '" + id + "' used twice");
QCString s = token.valueOf("body");
if (!s.isNull()) {
OpaqueDefs.insert(id, s);
if (! token.closed())
in.finish(token.what());
}
else if (! token.closed()) {
QCString k = token.what();
const char * kstr = k;
while (in.read(), !token.close(kstr)) {
s = token.what();
if (s == "body")
OpaqueDefs.insert(id, in.body("body"));
else if (! token.closed())
in.finish(s);
}
}
!!!213122.cpp!!! importGeneralization(inout in : FileIn, inout token : Token, inout where : UmlItem) : void
QCString id = token.valueOf("general");
QCString constraint;
if (! token.closed()) {
QCString k = token.what();
const char * kstr = k;
while (in.read(), !token.close(kstr)) {
QCString s = token.what();
if (s == "general") {
id = token.xmiIdref();
if (id.isEmpty() && !(id = token.valueOf("href")).isEmpty()) {
int index = id.find('#');
if (index != -1)
id = id.mid(index + 1);
}
}
else if (s == "ownedrule") {
constraint = UmlItem::readConstraint(in, token);
continue;
}
if (! token.closed())
in.finish(s);
}
}
if (!id.isEmpty()) {
QMap<QCString, UmlItem *>::ConstIterator iter = All.find(id);
if (iter != All.end())
where->generalizeDependRealize(*iter, in, 0, "", constraint);
else
Unresolved::addGeneralization(where, id, constraint);
}
else
in.warning("'general' is missing");
!!!213890.cpp!!! importDependency(inout in : FileIn, inout token : Token, inout where : UmlItem) : void
QCString client = token.valueOf("client");
QCString supplier = token.valueOf("supplier");
QCString label = token.valueOf("name");
QCString constraint;
int kind = (token.xmiType() == "uml:Usage") ? 3 : 1;
if (! token.closed()) {
QCString k = token.what();
const char * kstr = k;
while (in.read(), !token.close(kstr)) {
QCString s = token.what();
if (s == "client")
client = token.xmiIdref();
else if (s == "supplier")
supplier = token.xmiIdref();
else if (s == "ownedrule") {
constraint = UmlItem::readConstraint(in, token);
continue;
}
if (! token.closed())
in.finish(s);
}
}
if (client.isEmpty())
in.warning("'client' is missing");
else {
if (supplier.isEmpty())
// Borland Together 2006 for Eclipse
supplier = where->id();
QMap<QCString, UmlItem *>::ConstIterator from = All.find(client);
QMap<QCString, UmlItem *>::ConstIterator to = All.find(supplier);
if ((from != All.end()) && (to != All.end()))
(*from)->generalizeDependRealize(*to, in, kind, label, constraint);
else
UnresolvedRelation::add(kind, client, supplier, label, constraint);
}
!!!214786.cpp!!! importRealization(inout in : FileIn, inout token : Token, inout where : UmlItem) : void
QCString client = token.valueOf("client");
QCString supplier = token.valueOf("supplier");
QCString label = token.valueOf("name");
QCString constraint;
if (! token.closed()) {
QCString k = token.what();
const char * kstr = k;
while (in.read(), !token.close(kstr)) {
QCString s = token.what();
if (s == "client")
client = token.xmiIdref();
else if (s == "supplier")
supplier = token.xmiIdref();
else if (s == "ownedrule") {
constraint = UmlItem::readConstraint(in, token);
continue;
}
if (! token.closed())
in.finish(s);
}
}
if (client.isEmpty())
in.warning("'client' is missing");
else {
if (supplier.isEmpty())
// Borland Together 2006 for Eclipse
supplier = where->id();
QMap<QCString, UmlItem *>::ConstIterator from = All.find(client);
QMap<QCString, UmlItem *>::ConstIterator to = All.find(supplier);
if ((from != All.end()) && (to != All.end()))
(*from)->generalizeDependRealize(*to, in, 2, label, constraint);
else
UnresolvedRelation::add(2, client, supplier, label, constraint);
}
!!!209026.cpp!!! incoming(inout in : FileIn, inout token : Token, inout where : UmlItem) : void
Incomings.insert(token.xmiIdref(), where);
if (! token.closed())
in.finish(token.what());
!!!218242.cpp!!! outgoing(inout in : FileIn, inout token : Token, inout where : UmlItem) : void
while (where->kind() == aRegion)
// up to the state
where = where->parent();
Outgoings.insert(token.xmiIdref(), where);
if (! token.closed())
in.finish(token.what());
!!!240770.cpp!!! legalName(in s : string) : string
unsigned index;
unsigned n = s.length();
for (index = 0; index != n; index += 1) {
char c = s.at(index);
if (!(((c >= 'a') && (c <= 'z')) ||
((c >= 'A') && (c <= 'Z')) ||
((c >= '0') && (c <= '9')) ||
(c == '_')))
s.replace(index, 1, "_");
}
return s;
!!!247042.cpp!!! fromEclipse() : bool
return FromEclipse;
!!!260866.cpp!!! readConstraint(inout in : FileIn, inout token : Token) : QCString
QCString constraint;
if (! token.closed()) {
QCString k = token.what();
const char * kstr = k;
while (in.read(), !token.close(kstr)) {
QCString s = token.what();
if ((s == "specification") && (token.xmiType() == "uml:OpaqueExpression")) {
constraint = token.valueOf("body");
if (! token.closed()) {
while (in.read(), !token.close("specification")) {
s = token.what();
if (s == "body")
constraint = in.body("body");
else if (! token.closed())
in.finish(s);
}
}
}
else
in.bypass(token);
}
}
return constraint;
|