| Index: third_party/protobuf/src/google/protobuf/compiler/javanano/javanano_extension.h
|
| diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_extension.h b/third_party/protobuf/src/google/protobuf/compiler/javanano/javanano_extension.h
|
| similarity index 73%
|
| copy from third_party/protobuf/src/google/protobuf/compiler/java/java_extension.h
|
| copy to third_party/protobuf/src/google/protobuf/compiler/javanano/javanano_extension.h
|
| index 009ed9ffacaf207d4fb6322dca43697499b32991..4843e29622a6c97e1e71db6cb7226c88a94bcf5d 100644
|
| --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_extension.h
|
| +++ b/third_party/protobuf/src/google/protobuf/compiler/javanano/javanano_extension.h
|
| @@ -28,20 +28,20 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -// Author: kenton@google.com (Kenton Varda)
|
| +// Author: bduff@google.com (Brian Duff)
|
| // Based on original Protocol Buffers design by
|
| // Sanjay Ghemawat, Jeff Dean, and others.
|
|
|
| -#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_EXTENSION_H__
|
| -#define GOOGLE_PROTOBUF_COMPILER_JAVA_EXTENSION_H__
|
| -
|
| -#include <string>
|
| +#ifndef GOOGLE_PROTOBUF_COMPILER_JAVANANO_EXTENSION_H_
|
| +#define GOOGLE_PROTOBUF_COMPILER_JAVANANO_EXTENSION_H_
|
|
|
| #include <google/protobuf/stubs/common.h>
|
| +#include <google/protobuf/compiler/javanano/javanano_params.h>
|
| +#include <google/protobuf/descriptor.pb.h>
|
| +
|
|
|
| namespace google {
|
| namespace protobuf {
|
| - class FieldDescriptor; // descriptor.h
|
| namespace io {
|
| class Printer; // printer.h
|
| }
|
| @@ -49,29 +49,26 @@ namespace protobuf {
|
|
|
| namespace protobuf {
|
| namespace compiler {
|
| -namespace java {
|
| +namespace javanano {
|
|
|
| -// Generates code for an extension, which may be within the scope of some
|
| -// message or may be at file scope. This is much simpler than FieldGenerator
|
| -// since extensions are just simple identifiers with interesting types.
|
| class ExtensionGenerator {
|
| public:
|
| - explicit ExtensionGenerator(const FieldDescriptor* descriptor);
|
| + explicit ExtensionGenerator(const FieldDescriptor* descriptor, const Params& params);
|
| ~ExtensionGenerator();
|
|
|
| - void Generate(io::Printer* printer);
|
| - void GenerateNonNestedInitializationCode(io::Printer* printer);
|
| - void GenerateRegistrationCode(io::Printer* printer);
|
| + void Generate(io::Printer* printer) const;
|
|
|
| private:
|
| + const Params& params_;
|
| const FieldDescriptor* descriptor_;
|
| - string scope_;
|
| + map<string, string> variables_;
|
| +
|
| GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ExtensionGenerator);
|
| };
|
|
|
| -} // namespace java
|
| +} // namespace javanano
|
| } // namespace compiler
|
| } // namespace protobuf
|
| -
|
| } // namespace google
|
| -#endif // GOOGLE_PROTOBUF_COMPILER_JAVA_MESSAGE_H__
|
| +
|
| +#endif // GOOGLE_PROTOBUF_COMPILER_JAVANANO_EXTENSION_H_
|
|
|