Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-31656

Provide a way for IDL types to reset to default values

    • Type: Icon: Improvement Improvement
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: IDL
    • Labels:
      None
    • Fully Compatible

      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:

      IDLObject obj;
      
      obj.setFieldOne(0);
      obj.setFieldTwo(0);
      obj.setFieldThree(0);
      obj.setFieldFour(0);
      obj.setFieldFive(0);
      obj.setFieldSix(0);
      

      Perhaps something like:

      IDLObject obj;
      obj.setAllFieldsToDefaultValues();
      

            Assignee:
            backlog-server-platform DO NOT USE - Backlog - Platform Team
            Reporter:
            samantha.ritter@mongodb.com Samantha Ritter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: