Unfortunately, the Google C++ Style Guide prescribes inconsistency. Only simple inline methods can use lowercase-with-underscores naming; everything else is supposed to use capitalized camelcase.
On Sat, Feb 5, 2011 at 8:40 AM, Frank Chu <f...@google.com> wrote: > Can the naming be > > visit_bar() > visit_baz() > > then? It's good to have some consistency. > > Frank > > > On Sat, Feb 5, 2011 at 08:06, Kenton Varda <ken...@google.com> wrote: > >> On Wed, Feb 2, 2011 at 10:13 AM, Henner Zeller < >> henner.zel...@googlemail.com> wrote: >> >>> I guess the naming is confusing in the example. The Visit is per >>> field-name; but since the typed is named the same as the field in this >>> example, it is confusing. >>> >> >> Yes, sorry. Better example: >> >> message MyStream { >> option generate_visitors = true; >> repeated Foo bar = 1; >> repeated Foo baz = 2; >> } >> >> creates: >> >> class MyStream::Visitor { >> public: >> virtual ~Visitor(); >> >> virtual void VisitBar(const Foo& value); >> virtual void VisitBaz(const Foo& value); >> }; >> >> > -- 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 protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.