qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: Need Help!: Example of the use of Variant Type
Date Fri, 01 Apr 2016 15:13:53 GMT
On 01/04/16 15:45, Flores, Paul A. wrote:
> Thanks for the example.  I was hoping for something a whole lot simpler.  It appears
to be a royal pain!
>
> Hopefully there is a simplistic example I can implement for my client!  Anyone else?

https://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/Variant.cpp?view=markup#l699 


It doesn't explicitly use find but that would be something like (I 
haven't tried to compile this!):

     Variant v = ...;//egt map from somewhere
     Variant::Map::const_iterator i = value.asMap().find("foo");
     if (i != value.asMap().end()) {
         std::string value = i->second;
     }	



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message