Hey Henrique, That is exactly what I wanted to know. Thanks !
-- Aditya Sarawgi On Wed, Nov 20, 2013 at 3:19 PM, Henrique Mendonça <[email protected]>wrote: > Hi Aditya, > > That's how the cpp lib works with optionals. You either need to use the > setter or do __isset.msgs = true yourself. > Unfortunately this is not in the tutorial yet... > I hope it helped. > > Best, > Henrique > > > On 20 November 2013 23:08, Aditya Sarawgi <[email protected] > >wrote: > > > The language is cpp. > > > > > > On Wed, Nov 20, 2013 at 12:53 AM, Aditya Sarawgi < > > [email protected] > > > wrote: > > > > > Hi Everyone, > > > > > > I have some questions about the way I am using thrift optional types or > > > rather I am not sure if this is the right way to use it. The thrift > file > > > looks something like this > > > > > > namespace something > > > > > > struct Response { > > > 1: Status status, > > > 2: optional list<string> msgs > > > > > > } > > > > > > service Something { > > > Respone getMessages(1: i16 id) > > > } > > > > > > Now first of all I am confused by the following > > > > > > 1) Should optional be ever used in a response > > > 2) If doesn't return the msgs until I do a > > > _return.__set_msgs(vector_of_msgs) which looks hacky to me. > > > > > > Any guidance on this is much appreciated, the documentation is really > > > sparse. > > > > > > Thanks > > > Aditya Sarawgi > > > > > >
