2011-12-18 68 views

回答

2

这是可能的。有关更多信息,请参阅this thread。 我喜欢在单独的.proto文件中定义枚举的建议。像

enums.proto

enum A 
{ 
    FIRST = 1; 
    SECOND = 2; 
} 

enum B { ... } 

other.proto

import "enums.proto"; 

message SOMEMESSAGE 
{ 
    required A myenum = 1; 
}