OLD | NEW |
1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 Google Inc. All rights reserved. |
3 // https://developers.google.com/protocol-buffers/ | 3 // https://developers.google.com/protocol-buffers/ |
4 // | 4 // |
5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
7 // met: | 7 // met: |
8 // | 8 // |
9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 virtual int GenerateNonNestedInitializationCode(io::Printer* printer) = 0; | 72 virtual int GenerateNonNestedInitializationCode(io::Printer* printer) = 0; |
73 | 73 |
74 // Returns an estimate of the number of bytes the printed code will compile to | 74 // Returns an estimate of the number of bytes the printed code will compile to |
75 virtual int GenerateRegistrationCode(io::Printer* printer) = 0; | 75 virtual int GenerateRegistrationCode(io::Printer* printer) = 0; |
76 | 76 |
77 protected: | 77 protected: |
78 static void InitTemplateVars(const FieldDescriptor* descriptor, | 78 static void InitTemplateVars(const FieldDescriptor* descriptor, |
79 const string& scope, | 79 const string& scope, |
80 bool immutable, | 80 bool immutable, |
81 ClassNameResolver* name_resolver, | 81 ClassNameResolver* name_resolver, |
82 std::map<string, string>* vars_pointer); | 82 map<string, string>* vars_pointer); |
83 | 83 |
84 private: | 84 private: |
85 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ExtensionGenerator); | 85 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ExtensionGenerator); |
86 }; | 86 }; |
87 | 87 |
88 class ImmutableExtensionGenerator : public ExtensionGenerator { | 88 class ImmutableExtensionGenerator : public ExtensionGenerator { |
89 public: | 89 public: |
90 explicit ImmutableExtensionGenerator(const FieldDescriptor* descriptor, | 90 explicit ImmutableExtensionGenerator(const FieldDescriptor* descriptor, |
91 Context* context); | 91 Context* context); |
92 virtual ~ImmutableExtensionGenerator(); | 92 virtual ~ImmutableExtensionGenerator(); |
(...skipping 11 matching lines...) Expand all Loading... |
104 private: | 104 private: |
105 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ImmutableExtensionGenerator); | 105 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ImmutableExtensionGenerator); |
106 }; | 106 }; |
107 | 107 |
108 } // namespace java | 108 } // namespace java |
109 } // namespace compiler | 109 } // namespace compiler |
110 } // namespace protobuf | 110 } // namespace protobuf |
111 | 111 |
112 } // namespace google | 112 } // namespace google |
113 #endif // GOOGLE_PROTOBUF_COMPILER_JAVA_EXTENSION_H__ | 113 #endif // GOOGLE_PROTOBUF_COMPILER_JAVA_EXTENSION_H__ |
OLD | NEW |