[SERVER-31656] Provide a way for IDL types to reset to default values Created: 20/Oct/17 Updated: 27/Oct/23 Resolved: 19/Jan/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | IDL |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Samantha Ritter (Inactive) | Assignee: | DO NOT USE - Backlog - Platform Team |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Participants: |
| Description |
|
If I have an IDL type with many integer fields (perhaps that are counters, for example) it would be nice to be able to reset them without having to do the following:
Perhaps something like:
|
| Comments |
| Comment by Mark Benvenuto [ 19/Jan/18 ] | |||||||||||||||
|
It is unclear what the use case for this given the the constructor of the IDL generated class initializes members with default values to their values. | |||||||||||||||
| Comment by Mark Benvenuto [ 20/Oct/17 ] | |||||||||||||||
|
Fields with default values are initialized to their default values. For instance, in this test
It generates a class with members initialized:
|