-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Server Programmability
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
-
None
IDL compiler can generate class definitions with getter methods for the member fields.
The instances of the generated classes may be used in various places in the code and we could avoid copying values of their member fields if there was a way of moving field values.
This is not as simple as one could think as generated classes maintain a `_hasXField` boolean flag that indicates if the given field contains a value. This flag would need to be checked and set to false on value being moved.
One proposal discussed with billy.donahue@mongodb.com is to generate:
const Foo& getFoo() const; void setFoo(Foo); Foo takeFoo();