Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-1196

Improve mongocxx::instance documentation

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.2.0-rc0
    • Affects Version/s: None
    • Component/s: Documentation
    • None

      mongocxx::instance is under-documented and difficult to use correctly. We should make the following improvements to our documentation of mongocxx::instance:

      • The mongocxx "Quick Start" page under "Tutorial for mongocxx" does not mention mongocxx::instance. We should add a section which explains what mongocxx::instance is, and also makes a recommendation to users on how to manage this object.
      • All mongocxx examples should contain a code comment indicating that creating a mongocxx::instance object is necessary to initialize the driver.
      • The class comment for instance.hpp should be expanded. In particular, it should:
        • Indicate explicitly that the mongocxx::instance constructor initializes the driver and that mongocxx::instance destructor shuts down the driver.
        • Explain that instantiating mongocxx::instance more than once in the same program is an error (even if the objects have non-overlapping lifetimes).
        • Contain a short example of basic correct usage of mongocxx::instance.
        • Contain an example of common incorrect usage of mongocxx::instance.
        • Refer users to the "instance_management" example for advanced mongocxx::instance usage.

            Assignee:
            sam.rossi@mongodb.com Samuel Rossi (Inactive)
            Reporter:
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: