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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 struct PrototypeMap; | 129 struct PrototypeMap; |
130 google::protobuf::scoped_ptr<PrototypeMap> prototypes_; | 130 google::protobuf::scoped_ptr<PrototypeMap> prototypes_; |
131 mutable Mutex prototypes_mutex_; | 131 mutable Mutex prototypes_mutex_; |
132 | 132 |
133 friend class DynamicMessage; | 133 friend class DynamicMessage; |
134 const Message* GetPrototypeNoLock(const Descriptor* type); | 134 const Message* GetPrototypeNoLock(const Descriptor* type); |
135 | 135 |
136 // Construct default oneof instance for reflection usage if oneof | 136 // Construct default oneof instance for reflection usage if oneof |
137 // is defined. | 137 // is defined. |
138 static void ConstructDefaultOneofInstance(const Descriptor* type, | 138 static void ConstructDefaultOneofInstance(const Descriptor* type, |
139 const uint32 offsets[], | 139 const int offsets[], |
140 void* default_oneof_instance); | 140 void* default_oneof_instance); |
141 // Delete default oneof instance. Called by ~DynamicMessageFactory. | 141 // Delete default oneof instance. Called by ~DynamicMessageFactory. |
142 static void DeleteDefaultOneofInstance(const Descriptor* type, | 142 static void DeleteDefaultOneofInstance(const Descriptor* type, |
143 const uint32 offsets[], | 143 const int offsets[], |
144 void* default_oneof_instance); | 144 void* default_oneof_instance); |
145 | 145 |
146 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(DynamicMessageFactory); | 146 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(DynamicMessageFactory); |
147 }; | 147 }; |
148 | 148 |
149 } // namespace protobuf | 149 } // namespace protobuf |
150 | 150 |
151 } // namespace google | 151 } // namespace google |
152 #endif // GOOGLE_PROTOBUF_DYNAMIC_MESSAGE_H__ | 152 #endif // GOOGLE_PROTOBUF_DYNAMIC_MESSAGE_H__ |
OLD | NEW |