Book a Demo

Author Topic: Synchronize collection of pointers to objects C++  (Read 3666 times)

Dave J.

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Synchronize collection of pointers to objects C++
« 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?
« Last Edit: May 27, 2015, 01:28:20 am by DaveJoynson »

MilanH

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Synchronize collection of pointers to objects C++
« Reply #1 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>.