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 <[email protected]> wrote: > On Wed, Feb 2, 2011 at 10:13 AM, Henner Zeller < > [email protected]> 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 [email protected]. 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.
