StarUML的C ++扩展
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.
.h
file)visibility
to one of modifiers public
, protected
, private
. If visibility is not setted, consider as protected
.isFinalSpecialization
and isLeaf
property to final
modifier.visibility
property to one of modifiers public
, protected
, private
. If visibility is not setted, consider as protected
.name
property to field identifier.type
property to field type.multiplicity
property to vector type.isStatic
property to static
modifier.isLeaf
property to final
modifier.defaultValue
property to initial value.visibility
to one of modifiers public
, protected
, private
. If visibility is not setted, consider as protected
.name
property to method identifier.isAbstract
property to virtual
modifier. (TODO need options to create pure-virtual function or virtual function)isStatic
property to static
modifier.direction
= return
to return type of method. When no return parameter, void
is used.isReadOnly
= true
to const
modifier of parameter..h
file)visibility
property to one of modifiers public
, protected
, private
. If visibility is not setted, consider as protected
.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
.h
file)visibility
property to one of modifiers public
, protected
, private
. If visibility is not setted, consider as protected
.visibility
property to one of modifiers public
, protected
, private
. If visibility is not setted, consider as protected
.name
property to field identifier.type
property to field type.multiplicity
is one of 0..*
, 1..*
, *
, then collection type (std::vector<T>
) is used.defaultValue
property to initial value.:
).Tools > C++ > Reverse Code...
)CppReverse
model will be created in the Project.Belows are the rules to convert from C++ source code to UML model elements.
name
property.public
, protected
and private
to visibility
property.abstract
modifier to isAbstract
property.<<constructor>>
.Field type to type
property.
type
property has the primitive type name as string.T[]
(array) or its decendants: type
property refers to T
with multiplicity *
.T
(User-Defined Types) : type
property refers to the T
type.type
property has the type name as string.Access modifier public
, protected
and private
to visibility
property.
static
modifier to isStatic
property.defaultValue
property.Field type to end2.reference
property.
T[]
(array) or its decendants: reference
property refers to T
with multiplicity *
.T
(User-Defined Types) : reference
property refers to the T
type.Access modifier public
, protected
and private
to visibility
property.
public
, protected
and private
to visibility
property.static
modifier to isStatic
property.abstract
modifier to isAbstract
property.name
property.public
, protected
and private
to visibility
property.Licensed under the MIT license (see LICENSE file).