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

Provide a way for IDL types to reset to default values

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Gone away
    • Icon: Major - P3 Major - P3
    • None
    • None
    • IDL
    • None
    • Fully Compatible

    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:

      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();
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: