Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: Dave J. on May 27, 2015, 01:23:18 am

Title: Synchronize collection of pointers to objects C++
Post by: Dave J. on May 27, 2015, 01:23:18 am
I am using EA 11.1.1112.

If I add std::vector<#TYPE#> to "Additional Collection Classes" for the C++ language I can synchronise a class containing an attribute like std::vector<Class1> mClass1; and get a directed association with multiplicity 0..*.

Unfortunately, if I synchronise a class containing an attribute like std::vector<Class1*> mClass1; the association is not created. (Note that it is a vector of object pointers.)

I have tried adding std::vector<#TYPE#*> to the "Additional Collection Classes" but still no joy.

Any suggestions?
Title: Re: Synchronize collection of pointers to objects C++
Post by: MilanH on June 26, 2017, 08:55:32 pm
Seems order of items in Additional Collection Classes (ribbon Configure/Model/Options/Source Code Engineering/C++) is important.

When I have std::set<#TYPE#*>;std::set<#TYPE#> , it works for both std::set<MyClass*> and std::set<MyClass>.