Model_Utils Namespace Reference
General purpose model utilities. More...
Classes | |
| struct | NameAndType |
| Data structure filled by parseAttribute(). More... | |
| struct | OpDescriptor |
| Data structure filled by parseOperation(). More... | |
Typedefs | |
| typedef QValueList< NameAndType > | NameAndType_List |
| Auxiliary type for OpDescriptor. | |
|
typedef QValueListIterator< NameAndType > | NameAndType_ListIt |
Enumerations | |
| enum | Parse_Status { PS_OK, PS_Empty, PS_Malformed_Arg, PS_Unknown_ArgType, PS_Illegal_MethodName, PS_Unknown_ReturnType, PS_Unspecified_Error } |
| Return type of parseOperation(). More... | |
Functions | |
| bool | isCloneable (Uml::Widget_Type type) |
| Determines whether the given widget type is cloneable. | |
| UMLObject * | findObjectInList (Uml::IDType id, const UMLObjectList &inList) |
| Seek the given id in the given list of objects. | |
| UMLObject * | findUMLObject (const UMLObjectList &inList, const QString &inName, Uml::Object_Type type, UMLObject *currentObj) |
| Find the UML object of the given type and name in the passed-in list. | |
| QString | uniqObjectName (Uml::Object_Type type, UMLPackage *parentPkg, QString prefix) |
| Returns a name for the new object, appended with a number if the default name is taken e.g. | |
| bool | isCommonXMIAttribute (const QString &tag) |
| Return true if the given tag is a one of the common XMI attributes, such as: "name" | "visibility" | "isRoot" | "isLeaf" | "isAbstract" | "isActive" | "ownerScope". | |
| bool | isCommonDataType (QString type) |
| Return true if the given type is common among the majority of programming languages, such as "bool" or "boolean". | |
| bool | isClassifierListitem (Uml::Object_Type type) |
| Return true if the given object type is a classifier list item type. | |
| Uml::Model_Type | guessContainer (UMLObject *o) |
| Try to guess the correct container folder type of an UMLObject. | |
| int | stringToDirection (QString input, Uml::Parameter_Direction &result) |
| Parse a direction string into the Uml::Parameter_Direction. | |
| Parse_Status | parseTemplate (QString t, NameAndType &nmTp, UMLClassifier *owningScope) |
| Parses a template parameter given in UML syntax. | |
| Parse_Status | parseAttribute (QString a, NameAndType &nmTp, UMLClassifier *owningScope, Uml::Visibility *vis) |
| Parses an attribute given in UML syntax. | |
| Parse_Status | parseOperation (QString m, OpDescriptor &desc, UMLClassifier *owningScope) |
| Parses an operation given in UML syntax. | |
| QString | psText (Parse_Status value) |
| Returns the Parse_Status as a text. | |
| QString | progLangToString (Uml::Programming_Language pl) |
| Return string corresponding to the given Uml::Programming_Language. | |
| Uml::Programming_Language | stringToProgLang (QString str) |
| Return Uml::Programming_Language corresponding to the given string. | |
| bool | typeIsRootView (Uml::ListView_Type type) |
| Return true if the listview type is one of the predefined root views (root, logical, usecase, component, deployment, datatype, or entity- relationship view.). | |
| bool | typeIsCanvasWidget (Uml::ListView_Type type) |
| Return true if the listview type also has a widget representation in diagrams. | |
| bool | typeIsFolder (Uml::ListView_Type type) |
| Return true if the listview type is a logical, usecase or component folder. | |
| bool | typeIsContainer (Uml::ListView_Type type) |
| Return true if the listview type may act as a container for other objects, i.e. | |
| bool | typeIsClassifierList (Uml::ListView_Type type) |
| Return true if the listview type is an attribute, operation, or template. | |
| bool | typeIsDiagram (Uml::ListView_Type type) |
| Return true if the listview type is a diagram. | |
| Uml::Model_Type | convert_DT_MT (Uml::Diagram_Type dt) |
| Return the Model_Type which corresponds to the given Diagram_Type. | |
| Uml::ListView_Type | convert_MT_LVT (Uml::Model_Type mt) |
| Return the ListView_Type which corresponds to the given Model_Type. | |
| Uml::Model_Type | convert_LVT_MT (Uml::ListView_Type lvt) |
| Return the Model_Type which corresponds to the given ListView_Type. | |
| Uml::ListView_Type | convert_DT_LVT (Uml::Diagram_Type dt) |
| Convert a diagram type enum to the equivalent list view type. | |
| Uml::ListView_Type | convert_OT_LVT (UMLObject *o) |
| Convert an object's type to the equivalent list view type. | |
| Uml::Object_Type | convert_LVT_OT (Uml::ListView_Type lvt) |
| Converts a list view type enum to the equivalent object type. | |
| Uml::Icon_Type | convert_LVT_IT (Uml::ListView_Type lvt) |
| Return the Icon_Type which corresponds to the given listview type. | |
| Uml::Diagram_Type | convert_LVT_DT (Uml::ListView_Type lvt) |
| Return the Diagram_Type which corresponds to the given listview type. | |
| Uml::Model_Type | convert_OT_MT (Uml::Object_Type ot) |
| Return the Model_Type which corresponds to the given Object_Type. | |
Detailed Description
General purpose model utilities.
- Author:
- Oliver Kellogg Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
Typedef Documentation
|
|
Auxiliary type for OpDescriptor.
Definition at line 265 of file model_utils.h. |
Enumeration Type Documentation
|
|
Return type of parseOperation().
Definition at line 239 of file model_utils.h. |
Function Documentation
|
|
Determines whether the given widget type is cloneable.
Definition at line 41 of file model_utils.cpp. |
|
||||||||||||
|
Seek the given id in the given list of objects. Each list element may itself contain other objects and the search is done recursively.
Definition at line 59 of file model_utils.cpp. References UMLObject::getBaseType(), UMLObject::getID(), and UMLAssociation::getUMLRole(). Referenced by UMLPackage::findObjectById(). |
|
||||||||||||||||||||
|
Find the UML object of the given type and name in the passed-in list.
Definition at line 103 of file model_utils.cpp. References UMLApp::activeLanguageIsCaseSensitive(), UMLPackage::containedObjects(), UMLObject::getBaseType(), UMLObject::getName(), and UMLObject::getUMLPackage(). Referenced by UMLDoc::createDatatype(), and UMLDoc::findUMLObject(). |
|
||||||||||||||||
|
Returns a name for the new object, appended with a number if the default name is taken e.g. new_actor, new_actor_1 etc.
Definition at line 238 of file model_utils.cpp. References UMLApp::getDocument(), and UMLDoc::isUnique(). Referenced by UMLListView::addNewItem(), UMLObject::copyInto(), and UMLDrag::decodeClip1(). |
|
|
Return true if the given tag is a one of the common XMI attributes, such as: "name" | "visibility" | "isRoot" | "isLeaf" | "isAbstract" | "isActive" | "ownerScope".
Definition at line 280 of file model_utils.cpp. References Uml::tagEq(). |
|
|
Return true if the given type is common among the majority of programming languages, such as "bool" or "boolean". TODO: Make this depend on the active programming language. Definition at line 298 of file model_utils.cpp. References UMLApp::activeLanguageIsCaseSensitive(), CodeGenerator::defaultDatatypes(), and UMLApp::getGenerator(). |
|
|
Return true if the given object type is a classifier list item type.
Definition at line 316 of file model_utils.cpp. |
|
|
Try to guess the correct container folder type of an UMLObject. Object types that can't be guessed are mapped to Uml::mt_Logical. NOTE: This function exists mainly for handling pre-1.5.5 files and should not be used for new code. Definition at line 328 of file model_utils.cpp. References UMLApp::getDocument(), UMLAssociation::getObject(), UMLObject::getUMLPackage(), and UMLDoc::rootFolderType(). Referenced by UMLListView::determineParentItem(), and UMLDoc::loadUMLObjectsFromXMI(). |
|
||||||||||||
|
Parse a direction string into the Uml::Parameter_Direction.
Definition at line 391 of file model_utils.cpp. |
|
||||||||||||||||
|
Parses a template parameter given in UML syntax.
Definition at line 409 of file model_utils.cpp. References UMLDoc::findUMLObject(), and UMLApp::getDocument(). Referenced by UMLListView::createChildUMLObject(), and UMLListViewItem::okRename(). |
|
||||||||||||||||||||
|
Parses an attribute given in UML syntax.
Definition at line 432 of file model_utils.cpp. References UMLDoc::findUMLObject(), and UMLApp::getDocument(). Referenced by UMLListView::createChildUMLObject(), UMLListViewItem::okRename(), and parseOperation(). |
|
||||||||||||||||
|
Parses an operation given in UML syntax. The search pattern includes everything up to the opening parenthesis because UML also permits non programming-language oriented designs using narrative names, for example "check water temperature". Definition at line 496 of file model_utils.cpp. References UMLDoc::findUMLObject(), UMLApp::getDocument(), and parseAttribute(). Referenced by UMLListView::createChildUMLObject(), UMLListViewItem::okRename(), and FloatingTextWidget::showOpDlg(). |
|
|
Returns the Parse_Status as a text.
Definition at line 556 of file model_utils.cpp. Referenced by UMLListView::createChildUMLObject(), and UMLListViewItem::okRename(). |
|
|
Return string corresponding to the given Uml::Programming_Language.
Definition at line 565 of file model_utils.cpp. Referenced by CodeGenerator::loadFromXMI(), CodeGenerator::saveToXMI(), and UMLApp::updateLangSelectMenu(). |
|
|
Return Uml::Programming_Language corresponding to the given string.
Definition at line 607 of file model_utils.cpp. Referenced by UMLApp::getDefaultLanguage(), UMLDoc::loadExtensionsFromXMI(), and UMLApp::slotApplyPrefs(). |
|
|
Return true if the listview type is one of the predefined root views (root, logical, usecase, component, deployment, datatype, or entity- relationship view.).
Definition at line 643 of file model_utils.cpp. Referenced by UMLListView::findFolderForDiagram(), and typeIsFolder(). |
|
|
Return true if the listview type also has a widget representation in diagrams.
Definition at line 659 of file model_utils.cpp. |
|
|
Return true if the listview type is a logical, usecase or component folder.
Definition at line 686 of file model_utils.cpp. References typeIsRootView(). Referenced by convert_LVT_OT(), and typeIsContainer(). |
|
|
Return true if the listview type may act as a container for other objects, i.e. if it is a folder, package, subsystem, or component. Definition at line 700 of file model_utils.cpp. References typeIsFolder(). |
|
|
Return true if the listview type is an attribute, operation, or template.
Definition at line 708 of file model_utils.cpp. Referenced by UMLListViewItem::compare(). |
|
|
Return true if the listview type is a diagram.
Definition at line 720 of file model_utils.cpp. Referenced by UMLListView::popupMenuSel(). |
|
|
Return the Model_Type which corresponds to the given Diagram_Type.
Definition at line 736 of file model_utils.cpp. Referenced by UMLDoc::findView(), UMLDoc::loadDiagramsFromXMI(), and UMLDoc::newDocument(). |
|
|
Return the ListView_Type which corresponds to the given Model_Type.
Definition at line 766 of file model_utils.cpp. Referenced by UMLListView::init(). |
|
|
Return the Model_Type which corresponds to the given ListView_Type. Returns Uml::N_MODELTYPES if the list view type given does not map to a Model_Type. Definition at line 790 of file model_utils.cpp. |
|
|
Convert a diagram type enum to the equivalent list view type.
Definition at line 814 of file model_utils.cpp. Referenced by UMLListView::createDiagramItem(), UMLListView::createItem(), UMLListView::findView(), and UMLListView::slotDiagramCreated(). |
|
|
Convert an object's type to the equivalent list view type.
Definition at line 859 of file model_utils.cpp. References UMLObject::getBaseType(), UMLApp::getDocument(), UMLDoc::getName(), UMLObject::getUMLPackage(), and UMLDoc::rootFolderType(). Referenced by UMLListView::childObjectAdded(), UMLView::removeAssocInViewAndDoc(), and UMLListView::slotObjectCreated(). |
|
|
Converts a list view type enum to the equivalent object type.
Definition at line 967 of file model_utils.cpp. References typeIsFolder(). Referenced by UMLListView::addNewItem(), and UMLListView::itemRenamed(). |
|
|
Return the Icon_Type which corresponds to the given listview type.
Definition at line 1043 of file model_utils.cpp. Referenced by UMLListView::addNewItem(), UMLListView::slotObjectCreated(), UMLListViewItem::updateFolder(), and UMLListViewItem::updateObject(). |
|
|
Return the Diagram_Type which corresponds to the given listview type.
Definition at line 1156 of file model_utils.cpp. Referenced by UMLListView::addNewItem(). |
|
|
Return the Model_Type which corresponds to the given Object_Type.
Definition at line 1192 of file model_utils.cpp. Referenced by UMLAssociation::load(). |
