shiyilei / protobuf-c

Automatically exported from code.google.com/p/protobuf-c
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

C++: add a sub-element to a repeated element #98

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

1. Given my proto file 
package ProtoModel;
message subElement
{
    required string label=1;
    required double val=2;
}
message mainElement
{
    repeated int32 listId=1;
    repeated subElement listSubElem=2;
}

In the ProtoModel.pb.h I get "correct" functions to set listId and add element 
to listId:
  inline void set_listid(int index, ::google::protobuf::int32 value);
  inline void add_listid(::google::protobuf::int32 value);

However i do not get any fucntion to set listSubElem or to add a subElement to 
it. I only have
 inline ::ProtoModel::subElement* add_listsubelem();

Is there any solution to modifiy or append my listSubElem ?

Original issue reported on code.google.com by ade...@gmail.com on 19 Jun 2013 at 10:15