Sparx Systems Forum
Enterprise Architect => Uml Process => Topic started by: m4l490n on November 20, 2012, 05:01:44 am
-
Hi
Since a single component could be manifested by multiple artifacts, I'd like to know how a component's multiple artifacts are represented in a component diagram. Or in other words if I have a component which is comprised by several files where the code of the whole component is implemented how can I draw the component diagram to make it clear the different files that comprise it?
Regards.
-
May be as nested sub-components?
Regards,
Günther
-
May be as nested sub-components?
Regards,
Günther
I don't think that would be correct because components represent a block of software that performs some behavior and as this blocks of software can be comprised of several files of different kinds and that'll be confusing I think.
I'm trying to represent blocks of software in C and as you know in C you have .c and .h files. What I'm trying to do is layout all the possible files that one block, or component, may have. For example I have a component called "math" and this component has the functionality of performing math calculations. Let's say that the block provides the interface "add" and requires the interface "numbers". This can be represented easily with a component diagram. But what if my "math" component is comprised of the files "add.c, mul.c, div.c, sub.c, types.h and api.h". In this case I don't know how to draw the diagram to make it clear that the "math" component is comprised by these files. I don't think that representing the files as nested components inside the "math" component would be correct because the files are files and not components.
If I understand correct, the files are "artifacts", but I can't find a way to put artifacts inside a component and neither if this would be correct.
Any ideas?
-
You can provide class models representing C code as well as any other language, the associated artifacts usually would be auto generated/synchronized from/with the UML model.
Classes that are used to make up (realize) a component would be represented as component parts.
Regards,
Günther
-
You can use Manifestation relationships from the Artifacts to the Component.