What steps will reproduce the problem?
1.Creating the proto-file:
message OneKeyControl {
enum Type{
LOCK = 0;
UNLOCK = 1;
}
required Type type = 1;
required string new_password = 2;
}
2.Generate the staff interface:
staff_codegen -tinterface -pprotobuf -drootns=test ProtoCalc.proto
3.The interface file ProtoCale.h as follow:
struct OneKeyControl
{
enum Type
{
LOCK = _0,
UNLOCK = _1
};
Type type;
std::string new_password;
};
What is the expected output? What do you see instead?
The result of compile is wrong, becanse it define the enum type is wrong. The
right define is "LOCK = 0".
What version of the product are you using? On what operating system?
staff_codegen version 1.99.1-r686 ; windows xp ;
Please provide any additional information below.
Original issue reported on code.google.com by bingqing...@gmail.com on 10 Aug 2012 at 2:06
Original issue reported on code.google.com by
bingqing...@gmail.com
on 10 Aug 2012 at 2:06