Menu

Finding out structure members

Help
2003-03-24
2003-03-24
  • Alex Sadosvky

    Alex Sadosvky - 2003-03-24

    Hello. I'm trying to implement a persistent storage in a relation database for XmlRpcValues. If value is a structure I need to find out which members does it have. How it could be possible? Or I need to hack XmlRpcValue and add a member function which returns a list of member names?

     
    • Chris Morley

      Chris Morley - 2003-03-24

      There is no method at this point to get that info. I think the most straight forward approach would be to provide direct access to the ValueStruct along the lines of the operator BinaryData&() accessor:

      operator ValueStruct const&()    { assertStruct(); return *_value.asStruct; }

      Then you could use a const_iterator over the map to access the keys and values. This is a more general solution than returning a list of names I think. If that works out for you it can go into the next release.

      Chris

       
      • Alex Sadosvky

        Alex Sadosvky - 2003-03-24

        Yes! It works for me. Thank you.

         

Log in to post a comment.