You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generated interface for our mutable types allows to access component members by reference, but not for primitive types, i.e.
components:
SimpleStruct:
Members:
- int i // integerdatatypes:
SimpleDatatype:
Members:
- int j // integer
- SimpleStruct s // component
will generate to (assuming getter syntax is turned on)
classMutableSimpleDataType {
// many other things// ...intgetJ() const;
const SimpleStruct& getS() const;
// this mutable accessor only exists for non-builtin types
SimpleStruct& s();
};
This is inconsistent in two ways with the rest of the generated code:
the mutable accessors do not respect the getSyntax setting
the mutable accessors do not expose their primitive members by non-const reference
After some discussion with @paulgessinger (who actually found this), I think the easiest solution is to
deprecate the existing mutable reference accessors
introduce new mutable accessors for all members that respect the getSyntax option (i.e. effectively adding the non-const overloads for our mutable classes).
This doesn't affect const-correctness of generated EDMs and will make the Mutable handles more consistent (and a bit more useful).
The text was updated successfully, but these errors were encountered:
The generated interface for our mutable types allows to access component members by reference, but not for primitive types, i.e.
will generate to (assuming getter syntax is turned on)
This is inconsistent in two ways with the rest of the generated code:
getSyntax
settingAfter some discussion with @paulgessinger (who actually found this), I think the easiest solution is to
getSyntax
option (i.e. effectively adding the non-const overloads for our mutable classes).This doesn't affect const-correctness of generated EDMs and will make the Mutable handles more consistent (and a bit more useful).
The text was updated successfully, but these errors were encountered: