umbrello/umbrello
Functions | |
bool | checkClosing (QStringList &tokens) |
QString | clean (const QString &s) |
QString | collectVerbatimText (QTextStream &stream) |
QString | extractImmediateValues (QStringList &l) |
QString | extractValue (QStringList &l, QTextStream &stream) |
UMLListViewItem::ListViewType | folderType (UMLListViewItem *parent) |
bool | handleControlledUnit (PetalNode *node, const QString &name, Uml::ID::Type id, UMLPackage *parentPkg) |
bool | importView (PetalNode *root, const QString &rootName, const QString &modelsName, UMLListViewItem *lvParent) |
bool | isImmediateValue (QString s) |
bool | loadFromMDL (QIODevice &file) |
QString | loc () |
void | methodName (const QString &m) |
bool | petalTree2Uml (PetalNode *root) |
Uml::ID::Type | quid (const PetalNode *node) |
QString | quidu (const PetalNode *node) |
PetalNode * | readAttributes (QStringList initialArgs, QTextStream &stream) |
QStringList | scan (const QString &lin) |
QString | shift (QStringList &l) |
void | transferVisibility (const PetalNode *from, UMLObject *to) |
UMLObject::ObjectType | typeToCreate (const QString &name) |
bool | umbrellify (PetalNode *node, UMLPackage *parentPkg=NULL) |
bool | umbrellify (PetalNode *node, const QString &modelsName, UMLListViewItem *parent) |
Variables | |
QString | g_methodName |
uint | linum |
uint | nClosures |
Detailed Description
Rose model import.
Traverse the PetalNode tree and create corresponding Umbrello objects for the PetalNodes encountered.
Function Documentation
bool Import_Rose::checkClosing | ( | QStringList & | tokens | ) |
Check for closing of one or more scopes.
Definition at line 108 of file import_rose.cpp.
QString Import_Rose::clean | ( | const QString & | s | ) |
Return the given string without surrounding quotation marks.
Also remove a possible prefix "Logical View::", it is not modeled in Umbrello.
Definition at line 42 of file petaltree2uml.cpp.
QString Import_Rose::collectVerbatimText | ( | QTextStream & | stream | ) |
Definition at line 174 of file import_rose.cpp.
QString Import_Rose::extractImmediateValues | ( | QStringList & | l | ) |
Extract immediate values out of `l'.
Examples of immediate value lists: number list: (123, 456) string list: ("SomeText" 888) Any enclosing parentheses are removed. All extracted items are also removed from `l'. For the example given above the following is returned: "123 456" or "\"SomeText" 888"
Definition at line 148 of file import_rose.cpp.
QString Import_Rose::extractValue | ( | QStringList & | l, |
QTextStream & | stream | ||
) |
Extract the stripped down value from a (value ...) element.
Example: for the input (value Text "This is some text") the following is extracted: "This is some text" Extracted elements and syntactic sugar of the value element are removed from the input list. The stream is passed into this method because it may be necessary to read new lines - in the case of verbatim text. The format of verbatim text in petal files is as follows:
(value Text
|This is the first line of verbatim text. |This is another line of verbatim text. ) (The '|' character is supposed to be in the first column of the line) In this case the two lines are extracted without the leading '|'. The line ending '
' of each line is preserved.
Definition at line 228 of file import_rose.cpp.
UMLListViewItem::ListViewType Import_Rose::folderType | ( | UMLListViewItem * | parent | ) |
Definition at line 473 of file petaltree2uml.cpp.
bool Import_Rose::handleControlledUnit | ( | PetalNode * | node, |
const QString & | name, | ||
Uml::ID::Type | id, | ||
UMLPackage * | parentPkg | ||
) |
Handle a controlled unit.
- Parameters
-
node Pointer to the PetalNode which may contain a controlled unit name Name of the current node id QUID of the current node parentPkg Pointer to the current parent UMLPackage.
- Returns
- True if the node actually contained a controlled unit.
Definition at line 328 of file petaltree2uml.cpp.
bool Import_Rose::importView | ( | PetalNode * | root, |
const QString & | rootName, | ||
const QString & | modelsName, | ||
UMLListViewItem * | lvParent | ||
) |
Auxiliary function for UseCase/Component/Deployment view import.
Definition at line 572 of file petaltree2uml.cpp.
bool Import_Rose::isImmediateValue | ( | QString | s | ) |
Immediate values are numbers or quoted strings.
- Returns
- True if the given text is a natural or negative number or a quoted string.
Definition at line 131 of file import_rose.cpp.
bool Import_Rose::loadFromMDL | ( | QIODevice & | file | ) |
Parse a file into the PetalNode internal tree representation and then create Umbrello objects by traversing the tree.
- Returns
- True for success, false in case of error.
Definition at line 374 of file import_rose.cpp.
QString Import_Rose::loc | ( | ) |
Auxiliary function for diagnostics: Return current location.
Definition at line 51 of file import_rose.cpp.
void Import_Rose::methodName | ( | const QString & | m | ) |
Definition at line 43 of file import_rose.cpp.
bool Import_Rose::petalTree2Uml | ( | PetalNode * | root | ) |
This is really an auxiliary method for loadFromMDL() but is kept in a separate file to reflect that it is not coupled with the parser (other than by the PetalNode.)
- Parameters
-
root the root of the tree
- Returns
- true for success.
Definition at line 601 of file petaltree2uml.cpp.
Uml::ID::Type Import_Rose::quid | ( | const PetalNode * | node | ) |
Extract the quid attribute from a petal node and return it as a Uml::IDType.
Definition at line 55 of file petaltree2uml.cpp.
QString Import_Rose::quidu | ( | const PetalNode * | node | ) |
Extract the quidu attribute from a petal node.
Definition at line 67 of file petaltree2uml.cpp.
PetalNode* Import_Rose::readAttributes | ( | QStringList | initialArgs, |
QTextStream & | stream | ||
) |
Read attributes of a node.
- Parameters
-
initialArgs Tokens on the line of the opening "(" of the node but with leading whitespace and the opening "(" removed. stream The QTextStream from which to read following lines.
- Returns
- Pointer to the created PetalNode or NULL on error.
Definition at line 266 of file import_rose.cpp.
QStringList Import_Rose::scan | ( | const QString & | lin | ) |
Split a line into lexemes.
Definition at line 59 of file import_rose.cpp.
QString Import_Rose::shift | ( | QStringList & | l | ) |
Emulate perl shift().
Definition at line 98 of file import_rose.cpp.
Transfer the Rose attribute "exportControl" to the Umbrello object given.
- Parameters
-
from Pointer to PetalNode from which to read the "exportControl" attribute to Pointer to UMLObject in which to set the Uml::Visibility
Definition at line 95 of file petaltree2uml.cpp.
UMLObject::ObjectType Import_Rose::typeToCreate | ( | const QString & | name | ) |
Determine the model type corresponding to a name.
If the given name consists only of letters, digits, underscores, and scope separators, then return Uml::ot_Class, else return Uml::ot_Datatype.
Definition at line 81 of file petaltree2uml.cpp.
bool Import_Rose::umbrellify | ( | PetalNode * | node, |
UMLPackage * | parentPkg = NULL |
||
) |
Create an Umbrello object from a PetalNode of the Logical View.
- Returns
- True for success. Given a PetalNode for which the mapping to Umbrello is not yet implemented umbrellify() is a no-op but also returns true.
Definition at line 352 of file petaltree2uml.cpp.
bool Import_Rose::umbrellify | ( | PetalNode * | node, |
const QString & | modelsName, | ||
UMLListViewItem * | parent | ||
) |
Create an Umbrello object from a PetalNode of the UseCase, Component, or Deployment View.
- Returns
- True for success. Given a PetalNode for which the mapping to Umbrello is not yet implemented umbrellify() is a no-op but also returns true.
Definition at line 507 of file petaltree2uml.cpp.
Variable Documentation
QString Import_Rose::g_methodName |
Definition at line 41 of file import_rose.cpp.
uint Import_Rose::linum |
Definition at line 40 of file import_rose.cpp.
uint Import_Rose::nClosures |
Definition at line 31 of file import_rose.cpp.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.