Automatic guessing on association ends happens when C++ Designer is generating the code for an association end and when the automatic generation flag is set.
Association ends point to classes, therefore the automatic guessing algorithm will favor pointer declaration of objects and will avoid passing any object by value for performance reasons.
For an association end, the relevant information is as follows:
The following list shows the generated declaration for an association end named “assoc”.
Association end type: MyClass
MyClass* assoc;
MyClass* assoc;
std::vector<MyClass*> assoc;
std::vector<MyClass*> assoc;
std::vector<MyClass*> assoc;
Association end type: MyDatatype isPrimitive=false
MyDatatype* assoc;
MyDatatype* assoc;
std::vector<MyDatatype*> assoc;
std::vector<MyDatatype*> assoc;
std::vector<MyDatatype*> assoc;
Note 1: As an association end is made to associate two complex classes, even primitive types are treated as complex.
Note 2: The std::vector is replaced by: