Qpid
  1. Qpid
  2. QPID-3089

add method/function to get a descriptive string for VariantType enumeration

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 0.8
    • Fix Version/s: 0.9
    • Component/s: C++ Client
    • Labels:
      None

      Description

      It is useful in logging etc to record/print the type of variant. If a descriptive string is logged it makes the record more readable. There is already a method to return a string representation but it is not public.

        Activity

        Hide
        Chuck Rolke added a comment -

        How do you think this function should map to the binding clients? The Variant class has a lot of followers in the bindings that need attention, too. I'd like to see the .NET binding "do the same thing" and the fix is probably a one-liner like the cpp change.

        Show
        Chuck Rolke added a comment - How do you think this function should map to the binding clients? The Variant class has a lot of followers in the bindings that need attention, too. I'd like to see the .NET binding "do the same thing" and the fix is probably a one-liner like the cpp change.
        Hide
        Gordon Sim added a comment -

        What does the type enumeration map to? Is there any in built support for a descriptive string to be printed (e.g. some sort of toStr() for the enumeration)? That would be the nicest option, but fallback is just to expose something similar to the c++ method I guess.

        Show
        Gordon Sim added a comment - What does the type enumeration map to? Is there any in built support for a descriptive string to be printed (e.g. some sort of toStr() for the enumeration)? That would be the nicest option, but fallback is just to expose something similar to the c++ method I guess.
        Hide
        Chuck Rolke added a comment -

        The type enumeration is invisible to .NET code. cpp Variant objects get promoted to .NET objects which have .GetType() and .GetType().ToString() built in for all types. So maybe no action is necessary for this code change in cpp.

        Had this function been public to start with then its inclusion in the binding would have been considered more strongly.

        Show
        Chuck Rolke added a comment - The type enumeration is invisible to .NET code. cpp Variant objects get promoted to .NET objects which have .GetType() and .GetType().ToString() built in for all types. So maybe no action is necessary for this code change in cpp. Had this function been public to start with then its inclusion in the binding would have been considered more strongly.
        Hide
        Gordon Sim added a comment -

        If there is already a .GetType().ToString() then I'd say this change is not needed in .NET. It is essentially providing something similar to c++ users.

        Show
        Gordon Sim added a comment - If there is already a .GetType().ToString() then I'd say this change is not needed in .NET. It is essentially providing something similar to c++ users.

          People

          • Assignee:
            Gordon Sim
            Reporter:
            Gordon Sim
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development