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 // http://code.google.com/p/protobuf/ | 3 // http://code.google.com/p/protobuf/ |
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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 template <typename DescriptorT> | 131 template <typename DescriptorT> |
132 string ModuleLevelDescriptorName(const DescriptorT& descriptor) const; | 132 string ModuleLevelDescriptorName(const DescriptorT& descriptor) const; |
133 string ModuleLevelMessageName(const Descriptor& descriptor) const; | 133 string ModuleLevelMessageName(const Descriptor& descriptor) const; |
134 string ModuleLevelServiceDescriptorName( | 134 string ModuleLevelServiceDescriptorName( |
135 const ServiceDescriptor& descriptor) const; | 135 const ServiceDescriptor& descriptor) const; |
136 | 136 |
137 template <typename DescriptorT, typename DescriptorProtoT> | 137 template <typename DescriptorT, typename DescriptorProtoT> |
138 void PrintSerializedPbInterval( | 138 void PrintSerializedPbInterval( |
139 const DescriptorT& descriptor, DescriptorProtoT& proto) const; | 139 const DescriptorT& descriptor, DescriptorProtoT& proto) const; |
140 | 140 |
| 141 void FixAllDescriptorOptions() const; |
| 142 void FixOptionsForField(const FieldDescriptor& field) const; |
| 143 void FixOptionsForEnum(const EnumDescriptor& descriptor) const; |
| 144 void FixOptionsForMessage(const Descriptor& descriptor) const; |
| 145 |
141 // Very coarse-grained lock to ensure that Generate() is reentrant. | 146 // Very coarse-grained lock to ensure that Generate() is reentrant. |
142 // Guards file_, printer_ and file_descriptor_serialized_. | 147 // Guards file_, printer_ and file_descriptor_serialized_. |
143 mutable Mutex mutex_; | 148 mutable Mutex mutex_; |
144 mutable const FileDescriptor* file_; // Set in Generate(). Under mutex_. | 149 mutable const FileDescriptor* file_; // Set in Generate(). Under mutex_. |
145 mutable string file_descriptor_serialized_; | 150 mutable string file_descriptor_serialized_; |
146 mutable io::Printer* printer_; // Set in Generate(). Under mutex_. | 151 mutable io::Printer* printer_; // Set in Generate(). Under mutex_. |
147 | 152 |
148 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Generator); | 153 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Generator); |
149 }; | 154 }; |
150 | 155 |
151 } // namespace python | 156 } // namespace python |
152 } // namespace compiler | 157 } // namespace compiler |
153 } // namespace protobuf | 158 } // namespace protobuf |
154 | 159 |
155 } // namespace google | 160 } // namespace google |
156 #endif // GOOGLE_PROTOBUF_COMPILER_PYTHON_GENERATOR_H__ | 161 #endif // GOOGLE_PROTOBUF_COMPILER_PYTHON_GENERATOR_H__ |
OLD | NEW |