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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 protected: | 86 protected: |
87 const Descriptor* descriptor_; | 87 const Descriptor* descriptor_; |
88 | 88 |
89 private: | 89 private: |
90 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator); | 90 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator); |
91 }; | 91 }; |
92 | 92 |
93 class ImmutableMessageGenerator : public MessageGenerator { | 93 class ImmutableMessageGenerator : public MessageGenerator { |
94 public: | 94 public: |
95 ImmutableMessageGenerator(const Descriptor* descriptor, Context* context); | 95 explicit ImmutableMessageGenerator(const Descriptor* descriptor, |
| 96 Context* context); |
96 virtual ~ImmutableMessageGenerator(); | 97 virtual ~ImmutableMessageGenerator(); |
97 | 98 |
98 virtual void Generate(io::Printer* printer); | 99 virtual void Generate(io::Printer* printer); |
99 virtual void GenerateInterface(io::Printer* printer); | 100 virtual void GenerateInterface(io::Printer* printer); |
100 virtual void GenerateExtensionRegistrationCode(io::Printer* printer); | 101 virtual void GenerateExtensionRegistrationCode(io::Printer* printer); |
101 virtual void GenerateStaticVariables( | 102 virtual void GenerateStaticVariables( |
102 io::Printer* printer, int* bytecode_estimate); | 103 io::Printer* printer, int* bytecode_estimate); |
103 | 104 |
104 // Returns an estimate of the number of bytes the printed code will compile to | 105 // Returns an estimate of the number of bytes the printed code will compile to |
105 virtual int GenerateStaticVariableInitializers(io::Printer* printer); | 106 virtual int GenerateStaticVariableInitializers(io::Printer* printer); |
(...skipping 27 matching lines...) Expand all Loading... |
133 | 134 |
134 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ImmutableMessageGenerator); | 135 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ImmutableMessageGenerator); |
135 }; | 136 }; |
136 | 137 |
137 } // namespace java | 138 } // namespace java |
138 } // namespace compiler | 139 } // namespace compiler |
139 } // namespace protobuf | 140 } // namespace protobuf |
140 | 141 |
141 } // namespace google | 142 } // namespace google |
142 #endif // GOOGLE_PROTOBUF_COMPILER_JAVA_MESSAGE_H__ | 143 #endif // GOOGLE_PROTOBUF_COMPILER_JAVA_MESSAGE_H__ |
OLD | NEW |