Hi!

I'd like to realize messages which do not need to allocate memory
during runtime. All the allocation should be done
at initialization. Therefor I'd need some mechanism to define strings
with fixed length in .proto files.

I read about the option annotation in version 2.0.2.
Is it possible to change the code generation with this annotations, so
that a string is not created as new std::string
but also reserve the memory which is set in the option:
e.g.  in the proto file:

message StaticSizeMsg
{
  required string message = 1 [size = 50];
}

The generated code should like like this:
std::string message_;
message_.reserver(50);

thanks,
greets Ralph
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to