This extension for StarUML(http://staruml.io) support to generate C++ code from UML model and to reverse C++ code to UML model. Install this extension from Extension Manager of StarUML.
⚠️ This extensions do not provide perfect reverse engineering which is a test and temporal feature. If you need a complete reverse engineering feature, please check other professional reverse engineering tools.
- converted to folder.
- converted to Cpp Class. (as a separate .hfile)
- visibilityto one of modifiers- public,- protected,- private. If visibility is not setted, consider as- protected.
- isFinalSpecializationand- isLeafproperty to- finalmodifier.
- Default constructor is generated.
- All contained types (UMLClass, UMLInterface, UMLEnumeration) are generated as inner type definition.
- TemplateParameter to Cpp Template.
- converted to Cpp Field.
- visibilityproperty to one of modifiers- public,- protected,- private. If visibility is not setted, consider as- protected.
- nameproperty to field identifier.
- typeproperty to field type.
- multiplicityproperty to vector type.
- isStaticproperty to- staticmodifier.
- isLeafproperty to- finalmodifier.
- defaultValueproperty to initial value.
- Documentation property to JavaDoc comment.
- converted to Cpp Methods.
- visibilityto one of modifiers- public,- protected,- private. If visibility is not setted, consider as- protected.
- nameproperty to method identifier.
- isAbstractproperty to- virtualmodifier. (TODO need options to create pure-virtual function or virtual function)
- isStaticproperty to- staticmodifier.
- UMLParameter to Cpp Method Parameters.
- UMLParameter's name property to parameter identifier.
- UMLParameter's type property to type of parameter.
- UMLParameter with direction=returnto return type of method. When no return parameter,voidis used.
- UMLParameter with isReadOnly=truetoconstmodifier of parameter.
- converted to Cpp Class. (as a separate .hfile)
- visibilityproperty to one of modifiers- public,- protected,- private. If visibility is not setted, consider as- protected.
- all method will treated as pure virtaul.
| Weekdays | 
|---|
| Monday | 
| Tuesday | 
| Saturday | 
converts
/* Test header @ toori67
 * This is Test
 * also test
 * also test again
 */
#ifndef (_WEEKDAYS_H)
#define _WEEKDAYS_H
enum Weekdays { Monday,Tuesday,Saturday };
#endif //_WEEKDAYS_H- converted to Cpp Enum. (as a separate .hfile)
- visibilityproperty to one of modifiers- public,- protected,- private. If visibility is not setted, consider as- protected.
- UMLEnumerationLiteral to literals of enum.
- converted to Cpp Field.
- visibilityproperty to one of modifiers- public,- protected,- private. If visibility is not setted, consider as- protected.
- nameproperty to field identifier.
- typeproperty to field type.
- If multiplicityis one of0..*,1..*,*, then collection type (std::vector<T>) is used.
- defaultValueproperty to initial value.
- converted to Cpp Inheritance (:).
- Allowed for UMLClass to UMLClass, and UMLClass to UMLInterface.
- Click the menu (Tools > C++ > Reverse Code...)
- Select a folder containing C++ source files to be converted to UML model elements.
- CppReversemodel will be created in the Project.
Belows are the rules to convert from C++ source code to UML model elements.
- converted to UMLPackage.
- converted to UMLClass.
- Class name to nameproperty.
- Type parameters to UMLTemplateParameter.
- Access modifier public,protectedandprivatetovisibilityproperty.
- abstractmodifier to- isAbstractproperty.
- Constructors to UMLOperation with stereotype <<constructor>>.
- All contained types (UMLClass, UMLInterface, UMLEnumeration) are generated as inner type definition.
- 
converted to UMLAttribute if "Use Association" is off in Preferences. 
- 
Field type to typeproperty.- Primitive Types : typeproperty has the primitive type name as string.
- T[](array) or its decendants:- typeproperty refers to- Twith multiplicity- *.
- T(User-Defined Types) :- typeproperty refers to the- Ttype.
- Otherwise : typeproperty has the type name as string.
 
- Primitive Types : 
- 
Access modifier public,protectedandprivatetovisibilityproperty.
- 
staticmodifier toisStaticproperty.
- 
Initial value to defaultValueproperty.
- 
converted to (Directed) UMLAssociation if "Use Association" is on in Preferences and there is a UML type element (UMLClass, UMLInterface, or UMLEnumeration) correspond to the field type. 
- 
Field type to end2.referenceproperty.- T[](array) or its decendants:- referenceproperty refers to- Twith multiplicity- *.
- T(User-Defined Types) :- referenceproperty refers to the- Ttype.
- Otherwise : converted to UMLAttribute, not UMLAssociation.
 
- 
Access modifier public,protectedandprivatetovisibilityproperty.
- converted to UMLOperation.
- Type parameters to UMLTemplateParameter.
- Access modifier public,protectedandprivatetovisibilityproperty.
- staticmodifier to- isStaticproperty.
- abstractmodifier to- isAbstractproperty.
- converted to UMLEnumeration.
- Enum name to nameproperty.
- Type parameters to UMLTemplateParameter.
- Access modifier public,protectedandprivatetovisibilityproperty.
Licensed under the MIT license (see LICENSE file).