How to sort the repeated element?

2009-07-28 Thread
example: ==.proto file message Class{ message Student{ required string name = 1; required int32 score = 2; } repeated Student student = 1; } = I want to sort students of the class by score,how can i do?

Re: How to sort the repeated element?

2009-07-30 Thread
(),               StudentOrdering());   } On Tue, Jul 28, 2009 at 8:03 PM, 李海波 lihaibo2...@gmail.com wrote: example: ==.proto file message Class{    message Student{        required string name = 1;        required int32 score  = 2;    }    repeated Student student = 1

How to add unmanage point to message instance?

2009-08-06 Thread
example: *.proto = message Element{ } message Path{ repeated Element element; } *.cpp = Path path; Element* ele = new Element(); if( condition ){ delete ele; }else{ //add ele to path,how can I do? }

Re: How to add unmanage point to message instance?

2009-08-06 Thread
.:   path.add_element()-CopyFrom(ele);   delete ele; On Thu, Aug 6, 2009 at 3:21 AM, 李海波 lihaibo2...@gmail.com wrote: Path path; Element* ele = new Element(); if( condition ){    delete ele; }else{    //add ele to path,how can I do? } If your code really looks like this, you should probably