Import_Utils Namespace Reference
Utilities for code import. More...
Functions | |
| void | putAtGlobalScope (bool yesno) |
| Control whether an object which is newly created by createUMLObject() is put at the global scope. | |
| void | setRelatedClassifier (UMLClassifier *c) |
| Set a related classifier for creation of dependencies on template parameters in createUMLObject(). | |
| void | assignUniqueIdOnCreation (bool yesno) |
| Control whether the creation methods solicit a new unique ID for the created object. | |
| bool | newUMLObjectWasCreated () |
| Returns whether the last createUMLObject() actually created a new object or just returned an existing one. | |
| QString | formatComment (const QString &comment) |
| Strip comment lines of leading whitespace and stars. | |
| UMLObject * | createUMLObject (Uml::Object_Type type, const QString &inName, UMLPackage *parentPkg, const QString &comment, const QString &stereotype) |
| Find or create a document object. | |
| UMLOperation * | makeOperation (UMLClassifier *parent, const QString &name) |
| Create a UMLOperation. | |
| UMLObject * | insertAttribute (UMLClassifier *owner, Uml::Visibility scope, const QString &name, UMLClassifier *attrType, const QString &comment, bool isStatic) |
| Create a UMLAttribute and insert it into the document. | |
| UMLObject * | insertAttribute (UMLClassifier *owner, Uml::Visibility scope, const QString &name, const QString &type, const QString &comment, bool isStatic) |
| Create a UMLAttribute and insert it into the document. | |
| void | insertMethod (UMLClassifier *klass, UMLOperation *&op, Uml::Visibility scope, const QString &type, bool isStatic, bool isAbstract, bool isFriend, bool isConstructor, const QString &comment) |
| Insert the UMLOperation into the given classifier. | |
| UMLAttribute * | addMethodParameter (UMLOperation *method, const QString &type, const QString &name) |
| Add an argument to a UMLOperation. | |
| void | addEnumLiteral (UMLEnum *enumType, const QString &literal, const QString &comment) |
| Add an enum literal to an UMLEnum. | |
| void | createGeneralization (UMLClassifier *child, UMLClassifier *parent) |
| Create a generalization from the given child classifier to the given parent classifier. | |
| void | createGeneralization (UMLClassifier *child, const QString &parentName) |
| Create a generalization from the existing child UMLObject to the given parent class name. | |
| QStringList | includePathList () |
| Return the list of paths set by previous calls to addIncludePath() and the environment variable UMBRELLO_INCPATH. | |
| void | addIncludePath (const QString &path) |
| Add a path to the include path list. | |
| bool | isDatatype (const QString &name, UMLPackage *parentPkg) |
| Returns true if a type is an actual Datatype. | |
Variables | |
| bool | bNewUMLObjectWasCreated = false |
| Flag manipulated by createUMLObject(). | |
| UMLClassifier * | gRelatedClassifier = NULL |
| Related classifier for creation of dependencies on template parameters in createUMLObject(). | |
| bool | bPutAtGlobalScope = false |
| On encountering a scoped typename string where the scopes have not yet been seen, we synthesize UML objects for the unknown scopes (using a question dialog to the user to decide whether to treat a scope as a class or as a package.) However, such an unknown scope is put at the global level. | |
| QStringList | incPathList |
| The include path list (see addIncludePath() and includePathList()). | |
Detailed Description
Utilities for code import.
- Author:
- Oliver Kellogg Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
Function Documentation
|
|
Control whether an object which is newly created by createUMLObject() is put at the global scope.
Definition at line 69 of file import_utils.cpp. References bPutAtGlobalScope. |
|
|
Set a related classifier for creation of dependencies on template parameters in createUMLObject().
Definition at line 73 of file import_utils.cpp. References gRelatedClassifier. Referenced by UMLAttributeDialog::apply(). |
|
|
Control whether the creation methods solicit a new unique ID for the created object. By default, unique ID generation is turned on.
Definition at line 77 of file import_utils.cpp. Referenced by Import_Rose::petalTree2Uml(). |
|
|
Returns whether the last createUMLObject() actually created a new object or just returned an existing one.
Definition at line 81 of file import_utils.cpp. References bNewUMLObjectWasCreated. |
|
|
Strip comment lines of leading whitespace and stars.
Definition at line 85 of file import_utils.cpp. Referenced by createUMLObject(), insertAttribute(), and insertMethod(). |
|
||||||||||||||||||||||||
|
||||||||||||
|
Create a UMLOperation. The reason for this method is to not generate any Qt signals. Instead, these are generated by insertMethod(). (If we generated a creation signal prematurely, i.e. without the method parameters being known yet, then that would lead to a conflict with a pre-existing parameterless method of the same name.) Definition at line 277 of file import_utils.cpp. Referenced by PythonImport::parseStmt(), PascalImport::parseStmt(), JavaImport::parseStmt(), IDLImport::parseStmt(), and AdaImport::parseStmt(). |
|
||||||||||||||||||||||||||||
|
Create a UMLAttribute and insert it into the document. Use the specified existing attrType. Definition at line 282 of file import_utils.cpp. References formatComment(), UMLApp::getActiveLanguage(), UMLObject::getBaseType(), UMLApp::getDocument(), UMLObject::setDoc(), UMLDoc::setModified(), and UMLObject::setStatic(). Referenced by insertAttribute(), PascalImport::parseStmt(), JavaImport::parseStmt(), IDLImport::parseStmt(), and AdaImport::parseStmt(). |
|
||||||||||||||||||||||||||||
|
Create a UMLAttribute and insert it into the document.
Definition at line 311 of file import_utils.cpp. References bPutAtGlobalScope, createUMLObject(), gRelatedClassifier, and insertAttribute(). |
|
||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||
|
Add an argument to a UMLOperation. The parentPkg arg is only used for resolving possible scope prefixes in the `type'. Definition at line 396 of file import_utils.cpp. References bPutAtGlobalScope, createUMLObject(), UMLClassifier::findTemplate(), and gRelatedClassifier. Referenced by PythonImport::parseStmt(), PascalImport::parseStmt(), JavaImport::parseStmt(), IDLImport::parseStmt(), and AdaImport::parseStmt(). |
|
||||||||||||||||
|
Add an enum literal to an UMLEnum.
Definition at line 413 of file import_utils.cpp. References UMLObject::setDoc(). Referenced by PascalImport::parseStmt(), JavaImport::parseStmt(), IDLImport::parseStmt(), and AdaImport::parseStmt(). |
|
||||||||||||
|
Create a generalization from the given child classifier to the given parent classifier.
Definition at line 418 of file import_utils.cpp. References UMLDoc::addAssociation(), UMLApp::getDocument(), UMLDoc::getRootFolder(), UMLObject::setBaseType(), and UMLObject::setUMLPackage(). Referenced by createGeneralization(), PythonImport::parseStmt(), PascalImport::parseStmt(), JavaImport::parseStmt(), IDLImport::parseStmt(), and AdaImport::parseStmt(). |
|
||||||||||||
|
Create a generalization from the existing child UMLObject to the given parent class name.
Definition at line 436 of file import_utils.cpp. References createGeneralization(), and createUMLObject(). |
|
|
Return the list of paths set by previous calls to addIncludePath() and the environment variable UMBRELLO_INCPATH. This list can be used for finding #included (or Ada with'ed or...) files. Definition at line 442 of file import_utils.cpp. References includePathList(), and incPathList. Referenced by includePathList(), CppImport::initialize(), NativeImportBase::parseFile(), and IDLImport::parseFile(). |
|
|
Add a path to the include path list.
Definition at line 451 of file import_utils.cpp. References incPathList. Referenced by NativeImportBase::parseFile(), and IDLImport::parseFile(). |
|
||||||||||||
|
Returns true if a type is an actual Datatype.
Definition at line 457 of file import_utils.cpp. References UMLDoc::findUMLObject(), and UMLApp::getDocument(). |
Variable Documentation
|
|
Flag manipulated by createUMLObject(). Global state is generally bad, I know. It would be cleaner to make this into a return value from createUMLObject(). Definition at line 46 of file import_utils.cpp. Referenced by createUMLObject(), and newUMLObjectWasCreated(). |
|
|
Related classifier for creation of dependencies on template parameters in createUMLObject().
Definition at line 52 of file import_utils.cpp. Referenced by addMethodParameter(), createUMLObject(), insertAttribute(), insertMethod(), and setRelatedClassifier(). |
|
|
On encountering a scoped typename string where the scopes have not yet been seen, we synthesize UML objects for the unknown scopes (using a question dialog to the user to decide whether to treat a scope as a class or as a package.) However, such an unknown scope is put at the global level. I.e. before calling createUMLObject() we set this flag to true. Definition at line 62 of file import_utils.cpp. Referenced by addMethodParameter(), createUMLObject(), insertAttribute(), insertMethod(), and putAtGlobalScope(). |
|
|
The include path list (see addIncludePath() and includePathList()).
Definition at line 67 of file import_utils.cpp. Referenced by addIncludePath(), and includePathList(). |
