[OSM-dev] PBF: add a "package" keyword to the .proto for CPP namespace
cbro at semperpax.com
Tue Nov 16 16:52:10 GMT 2010
Would it be possible to add a "package zzz;" to the .proto files, as in
In CPP, that will generate a namespace named zzz, which would avoid class
name clashing (mind you, I happen to already have Node, Way and Relation
classes in Merkaartor).
I'm not really sure if there would be much repercussions to this but if I
understand google's doc, "option java_package" would take precedence for
java classes, anyway...
> The .proto file starts with a package declaration, which helps to prevent
> naming conflicts between different projects. In Java, the package name is
> used as the Java package unless you have explicitly specified a
> java_package, as we have here. Even if you do provide a java_package, you
> should still define a normal package as well to avoid name collisions in the
> Protocol Buffers name space as well as in non-Java languages.
- Chris -
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dev