Hello,
Dan wrote:I've had BOUML for a few weeks and I believe that only a package with a class view / diagram / class can generate (or round trip) code. The project package and sub package options for headers and source directories and name space are very useful and seem to work as expected.
Q: Are there any other diagrams / views etc that are able to generate code ?
In the model a file (or a couple header/source files for C++) is supported by an artifact, so the generation/roundtrip works on the artifacts. When you start the code generation/roundtrip from an upper level they go down searching for artifacts. The diagrams are out of the code generation/roundtrip.
By definition an artifact is about deployment, so you can put artifacts only in deployment views, and to start code generation/roundtrip in an other kind of view as no sense, except that to help I also allow to start from a class or a class view but in that case the work is done for artifacts associated to the classes, this is a shortcut if I can say.
Dan wrote:I want to use BOUML to assist me in designing some features of a small project (it's a simple game using my own game engine) and I would like to use the component views / diagrams in my design /code.
But I do not really understand BOUML component / component diagrams as although one can set required class, provided class and realising class (from a list of existing classes) - I can see no way to use this is in a design as there appears to be no generated code or class 'interfaces' or anything at all.
In UML 2.x the components are not part of the deployment, so they cannot participate to the generation/roundtrip, nor a use case for instance.
In the old versions of UML there was no artifact and the tools used components for the code generation (including BoUML before the release 2.0) , but since the artifacts was introduced the roles was changed and clarified.
Anyway even the components are at a conceptual level this doesn't mean they are useless, I encourage you to use them. In the past I found a very interesting paper about the components, unfortunately I lost its reference and cannot find it again with a quick search.
Dan wrote:Also I cannot drag components onto any other diagram, so they cannot be used to explore part of a design.
No, you can also drop a component into a deployment diagram, or use the associated button in a deployment diagram to choose one to insert into the diagram.
Dan wrote:Q: Are BOUML components only a visual elements?
No, the model is not only the diagrams, a component exists by itself, even it is not drawn into a diagram.
Dan wrote:Q: Does adding a 'provided interface' to a component have any code generation effects?
The components are out of the code generation, so no effect.