umbrello/umbrello
Functions | |
void | addEnumLiteral (UMLEnum *enumType, const QString &literal, const QString &comment) |
void | addIncludePath (const QString &path) |
UMLAttribute * | addMethodParameter (UMLOperation *method, const QString &type, const QString &name) |
void | assignUniqueIdOnCreation (bool yesno) |
void | createGeneralization (UMLClassifier *child, UMLClassifier *parent) |
void | createGeneralization (UMLClassifier *child, const QString &parentName) |
UMLObject * | createUMLObject (UMLObject::ObjectType type, const QString &inName, UMLPackage *parentPkg, const QString &comment, const QString &stereotype) |
QString | formatComment (const QString &comment) |
QStringList | includePathList () |
UMLObject * | insertAttribute (UMLClassifier *owner, Uml::Visibility::Enum scope, const QString &name, UMLClassifier *attrType, const QString &comment, bool isStatic) |
UMLObject * | insertAttribute (UMLClassifier *owner, Uml::Visibility::Enum scope, const QString &name, const QString &type, const QString &comment, bool isStatic) |
void | insertMethod (UMLClassifier *klass, UMLOperation *&op, Uml::Visibility::Enum scope, const QString &type, bool isStatic, bool isAbstract, bool isFriend, bool isConstructor, const QString &comment) |
bool | isDatatype (const QString &name, UMLPackage *parentPkg) |
UMLOperation * | makeOperation (UMLClassifier *parent, const QString &name) |
bool | newUMLObjectWasCreated () |
void | putAtGlobalScope (bool yesno) |
void | setRelatedClassifier (UMLClassifier *c) |
Variables | |
bool | bNewUMLObjectWasCreated = false |
bool | bPutAtGlobalScope = false |
UMLClassifier * | gRelatedClassifier = NULL |
QStringList | incPathList |
Detailed Description
Utilities for code import.
Function Documentation
void Import_Utils::addEnumLiteral | ( | UMLEnum * | enumType, |
const QString & | literal, | ||
const QString & | comment | ||
) |
Add an enum literal to an UMLEnum.
Definition at line 528 of file import_utils.cpp.
void Import_Utils::addIncludePath | ( | const QString & | path | ) |
Add a path to the include path list.
Definition at line 587 of file import_utils.cpp.
UMLAttribute * Import_Utils::addMethodParameter | ( | UMLOperation * | method, |
const QString & | type, | ||
const QString & | name | ||
) |
Add an argument to a UMLOperation.
The parentPkg arg is only used for resolving possible scope prefixes in the `type'.
Definition at line 507 of file import_utils.cpp.
void Import_Utils::assignUniqueIdOnCreation | ( | bool | yesno | ) |
Control whether the creation methods solicit a new unique ID for the created object.
By default, unique ID generation is turned on.
- Parameters
-
yesno False turns UID generation off, true turns it on.
Definition at line 103 of file import_utils.cpp.
void Import_Utils::createGeneralization | ( | UMLClassifier * | child, |
UMLClassifier * | parent | ||
) |
Create a generalization from the given child classifier to the given parent classifier.
Definition at line 538 of file import_utils.cpp.
void Import_Utils::createGeneralization | ( | UMLClassifier * | child, |
const QString & | parentName | ||
) |
Create a generalization from the existing child UMLObject to the given parent class name.
Definition at line 561 of file import_utils.cpp.
UMLObject * Import_Utils::createUMLObject | ( | UMLObject::ObjectType | type, |
const QString & | inName, | ||
UMLPackage * | parentPkg, | ||
const QString & | comment, | ||
const QString & | stereotype | ||
) |
Find or create a document object.
Definition at line 169 of file import_utils.cpp.
QString Import_Utils::formatComment | ( | const QString & | comment | ) |
Strip comment lines of leading whitespace and stars.
Definition at line 120 of file import_utils.cpp.
QStringList Import_Utils::includePathList | ( | ) |
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 574 of file import_utils.cpp.
UMLObject * Import_Utils::insertAttribute | ( | UMLClassifier * | owner, |
Uml::Visibility::Enum | scope, | ||
const QString & | name, | ||
UMLClassifier * | attrType, | ||
const QString & | comment, | ||
bool | isStatic | ||
) |
Create a UMLAttribute and insert it into the document.
Use the specified existing attrType.
Definition at line 364 of file import_utils.cpp.
UMLObject * Import_Utils::insertAttribute | ( | UMLClassifier * | owner, |
Uml::Visibility::Enum | scope, | ||
const QString & | name, | ||
const QString & | type, | ||
const QString & | comment, | ||
bool | isStatic | ||
) |
Create a UMLAttribute and insert it into the document.
Definition at line 398 of file import_utils.cpp.
void Import_Utils::insertMethod | ( | UMLClassifier * | klass, |
UMLOperation *& | op, | ||
Uml::Visibility::Enum | scope, | ||
const QString & | type, | ||
bool | isStatic, | ||
bool | isAbstract, | ||
bool | isFriend, | ||
bool | isConstructor, | ||
const QString & | comment | ||
) |
Insert the UMLOperation into the given classifier.
- Parameters
-
klass The classifier into which the operation shall be added. op Reference to pointer to the temporary UMLOperation for insertion. The caller relinquishes ownership of the object pointed to. If an UMLOperation of same signature already exists at the classifier then the incoming UMLOperation is deleted and the pointer is set to the existing UMLOperation. scope The Uml::Visibility of the method type The return type isStatic boolean switch to decide if method is static isAbstract boolean switch to decide if method is abstract isFriend true boolean switch to decide if methods is a friend function isConstructor boolean switch to decide if methods is a constructor comment The Documentation for this method
Definition at line 435 of file import_utils.cpp.
bool Import_Utils::isDatatype | ( | const QString & | name, |
UMLPackage * | parentPkg | ||
) |
Returns true if a type is an actual Datatype.
Definition at line 596 of file import_utils.cpp.
UMLOperation * Import_Utils::makeOperation | ( | UMLClassifier * | parent, |
const QString & | name | ||
) |
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 354 of file import_utils.cpp.
bool Import_Utils::newUMLObjectWasCreated | ( | ) |
Returns whether the last createUMLObject() actually created a new object or just returned an existing one.
Definition at line 112 of file import_utils.cpp.
void Import_Utils::putAtGlobalScope | ( | bool | yesno | ) |
Control whether an object which is newly created by createUMLObject() is put at the global scope.
- Parameters
-
yesno When set to false, the object is created at the scope given by the parentPkg argument of createUMLObject().
Definition at line 82 of file import_utils.cpp.
void Import_Utils::setRelatedClassifier | ( | UMLClassifier * | c | ) |
Set a related classifier for creation of dependencies on template parameters in createUMLObject().
Definition at line 91 of file import_utils.cpp.
Variable Documentation
bool Import_Utils::bNewUMLObjectWasCreated = false |
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 52 of file import_utils.cpp.
bool Import_Utils::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.
I.e. before calling createUMLObject() we set this flag to true.
Definition at line 68 of file import_utils.cpp.
UMLClassifier* Import_Utils::gRelatedClassifier = NULL |
Related classifier for creation of dependencies on template parameters in createUMLObject().
Definition at line 58 of file import_utils.cpp.
QStringList Import_Utils::incPathList |
The include path list (see addIncludePath() and includePathList())
Definition at line 73 of file import_utils.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.