Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-1288

c++ provide access to message maps as proton::value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • proton-0.14.0, proton-0.15.0
    • proton-c-0.18.0
    • cpp-binding
    • None

    Description

      We need to provide access to the message property maps as a proton::value.

      Given

          std::map<string, scalar> my_map;
          proton::message m;
      

      Here are some options:

      1. Add new message accessor: proton::value& properties_value()
      proton::get(m.properties_value(), my_map)

      2. Add value() accessor to cached_map
      proton::get(m.properties().value(), my_map)

      3. Make cached_map : public proton::value()
      proton::get(m.properties(), my_map)

      3 is neatest, 1 provides a clearer separation between the case where you want a convenient cached map vs. you want to decode to your own C++ map, work on it, and possibly re-encode it later. I lean towards 3. but open to persuasion.

      Attachments

        Issue Links

          Activity

            People

              aconway Alan Conway
              aconway Alan Conway
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: