|
Re: Creating Classes with Templates In Class Diagrams [message #1295917 is a reply to message #1295833] |
Mon, 14 April 2014 17:38 |
|
Hi,
The latest nightly builds of the up-coming Luna release should have
improvements in this dialog.
Note that the set of elements you can choose from depends on the kind
of template parameter (ClassifierTemplateParameter,
ConnectableElementTemplateParameter, etc.) Each kind of parameter will
constrain the kinds of parametered elements that you can choose in the
dialog. For example, if you need to expose a an attribute of the
templated class as a parameter, then you need to create a
ConnectableElementTemplateParameter.
I think there may be a problem with the treatment of the plain
TemplateParameter metaclass, however. I would expect it to allow
selection of any kind of ParameterableElement, but the dialog seems to
allow selection only of elements that are not covered by the
special-case parameters: things like ValueSpecifications that are not
Classifiers nor Operations nor ConnectableElements.
HTH,
Christian
On 2014-04-14 16:15:27 +0000, Ali Ghorashi said:
> Hello All,
> I'm trying to create a templatized class (e.g. vector<T>, map<K,E>,
> etc) in my class diagram but I'm running into a problem.
>
> I have created the class on the diagram and added a
> RedefinableTemplateSignature to it. When I try to add a
> TemplateParameter, I get the TemplateParameterConfiguration dialogbox
> (attached picture). After clicking the red button, I get to pick from
> an empty list of "Elements".
>
> I'm not sure where to go from there. How do I get Elements on the list?
> <image>
|
|
|
|
Re: Creating Classes with Templates In Class Diagrams [message #1297296 is a reply to message #1296225] |
Tue, 15 April 2014 15:13 |
|
Hi,
Did you create a ClassifierTemplateParameter to expose your class
parameter? Or did you create a simple TemplateParameter?
Cheers,
Christian
On 2014-04-14 22:35:23 +0000, Ali Ghorashi said:
> It appears that Papyrus (0.10.2.v201402191554) cannot handle Templates
> parameters of type 'Class' which is what map, list, and vector
> libraries use. It insists on setting the template type to an integer.
|
|
|
Powered by
FUDForum. Page generated in 0.03729 seconds