OLD | NEW |
1 // Generated by the protocol buffer compiler. DO NOT EDIT! | 1 // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 // source: google/protobuf/source_context.proto | 2 // source: google/protobuf/source_context.proto |
3 | 3 |
4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION | 4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION |
5 #include <google/protobuf/source_context.pb.h> | 5 #include <google/protobuf/source_context.pb.h> |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include <google/protobuf/stubs/common.h> | 9 #include <google/protobuf/stubs/common.h> |
10 #include <google/protobuf/stubs/port.h> | 10 #include <google/protobuf/stubs/port.h> |
11 #include <google/protobuf/stubs/once.h> | 11 #include <google/protobuf/stubs/once.h> |
12 #include <google/protobuf/io/coded_stream.h> | 12 #include <google/protobuf/io/coded_stream.h> |
13 #include <google/protobuf/wire_format_lite_inl.h> | 13 #include <google/protobuf/wire_format_lite_inl.h> |
14 #include <google/protobuf/descriptor.h> | 14 #include <google/protobuf/descriptor.h> |
15 #include <google/protobuf/generated_message_reflection.h> | 15 #include <google/protobuf/generated_message_reflection.h> |
16 #include <google/protobuf/reflection_ops.h> | 16 #include <google/protobuf/reflection_ops.h> |
17 #include <google/protobuf/wire_format.h> | 17 #include <google/protobuf/wire_format.h> |
18 // @@protoc_insertion_point(includes) | 18 // @@protoc_insertion_point(includes) |
19 | 19 |
20 namespace google { | 20 namespace google { |
21 namespace protobuf { | 21 namespace protobuf { |
| 22 class SourceContextDefaultTypeInternal : public ::google::protobuf::internal::Ex
plicitlyConstructed<SourceContext> {}; |
| 23 SourceContextDefaultTypeInternal _SourceContext_default_instance_; |
22 | 24 |
23 namespace { | 25 namespace { |
24 | 26 |
25 const ::google::protobuf::Descriptor* SourceContext_descriptor_ = NULL; | 27 ::google::protobuf::Metadata file_level_metadata[1]; |
26 const ::google::protobuf::internal::GeneratedMessageReflection* | |
27 SourceContext_reflection_ = NULL; | |
28 | 28 |
29 } // namespace | 29 } // namespace |
30 | 30 |
31 | 31 |
32 void protobuf_AssignDesc_google_2fprotobuf_2fsource_5fcontext_2eproto() { | 32 const ::google::protobuf::uint32* protobuf_Offsets_google_2fprotobuf_2fsource_5f
context_2eproto() GOOGLE_ATTRIBUTE_COLD; |
33 protobuf_AddDesc_google_2fprotobuf_2fsource_5fcontext_2eproto(); | 33 const ::google::protobuf::uint32* protobuf_Offsets_google_2fprotobuf_2fsource_5f
context_2eproto() { |
34 const ::google::protobuf::FileDescriptor* file = | 34 static const ::google::protobuf::uint32 offsets[] = { |
35 ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( | 35 ~0u, // no _has_bits_ |
36 "google/protobuf/source_context.proto"); | 36 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceContext, _internal_meta
data_), |
37 GOOGLE_CHECK(file != NULL); | 37 ~0u, // no _extensions_ |
38 SourceContext_descriptor_ = file->message_type(0); | 38 ~0u, // no _oneof_case_ |
39 static const int SourceContext_offsets_[1] = { | |
40 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceContext, file_name_), | 39 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceContext, file_name_), |
41 }; | 40 }; |
42 SourceContext_reflection_ = | 41 return offsets; |
43 ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessag
eReflection( | |
44 SourceContext_descriptor_, | |
45 SourceContext::default_instance_, | |
46 SourceContext_offsets_, | |
47 -1, | |
48 -1, | |
49 -1, | |
50 sizeof(SourceContext), | |
51 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceContext, _internal_me
tadata_), | |
52 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SourceContext, _is_default_
instance_)); | |
53 } | 42 } |
54 | 43 |
| 44 static const ::google::protobuf::internal::MigrationSchema schemas[] = { |
| 45 { 0, -1, sizeof(SourceContext)}, |
| 46 }; |
| 47 |
| 48 static const ::google::protobuf::internal::DefaultInstanceData file_default_inst
ances[] = { |
| 49 {reinterpret_cast<const ::google::protobuf::Message*>(&_SourceContext_default_
instance_), NULL}, |
| 50 }; |
| 51 |
55 namespace { | 52 namespace { |
56 | 53 |
57 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); | 54 void protobuf_AssignDescriptors() { |
58 inline void protobuf_AssignDescriptorsOnce() { | 55 protobuf_AddDesc_google_2fprotobuf_2fsource_5fcontext_2eproto(); |
59 ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, | 56 ::google::protobuf::MessageFactory* factory = NULL; |
60 &protobuf_AssignDesc_google_2fprotobuf_2fsource_5fcontext_2epro
to); | 57 AssignDescriptors( |
| 58 "google/protobuf/source_context.proto", schemas, file_default_instances, p
rotobuf_Offsets_google_2fprotobuf_2fsource_5fcontext_2eproto(), factory, |
| 59 file_level_metadata, NULL, NULL); |
61 } | 60 } |
62 | 61 |
| 62 void protobuf_AssignDescriptorsOnce() { |
| 63 static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
| 64 ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); |
| 65 } |
| 66 |
| 67 void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; |
63 void protobuf_RegisterTypes(const ::std::string&) { | 68 void protobuf_RegisterTypes(const ::std::string&) { |
64 protobuf_AssignDescriptorsOnce(); | 69 protobuf_AssignDescriptorsOnce(); |
65 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( | 70 ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); |
66 SourceContext_descriptor_, &SourceContext::default_instance()); | |
67 } | 71 } |
68 | 72 |
69 } // namespace | 73 } // namespace |
70 | 74 |
71 void protobuf_ShutdownFile_google_2fprotobuf_2fsource_5fcontext_2eproto() { | 75 void protobuf_ShutdownFile_google_2fprotobuf_2fsource_5fcontext_2eproto() { |
72 delete SourceContext::default_instance_; | 76 _SourceContext_default_instance_.Shutdown(); |
73 delete SourceContext_reflection_; | 77 delete file_level_metadata[0].reflection; |
74 } | 78 } |
75 | 79 |
76 void protobuf_AddDesc_google_2fprotobuf_2fsource_5fcontext_2eproto() { | 80 void protobuf_InitDefaults_google_2fprotobuf_2fsource_5fcontext_2eproto_impl() { |
77 static bool already_here = false; | |
78 if (already_here) return; | |
79 already_here = true; | |
80 GOOGLE_PROTOBUF_VERIFY_VERSION; | 81 GOOGLE_PROTOBUF_VERIFY_VERSION; |
81 | 82 |
| 83 ::google::protobuf::internal::InitProtobufDefaults(); |
| 84 _SourceContext_default_instance_.DefaultConstruct(); |
| 85 } |
| 86 |
| 87 void protobuf_InitDefaults_google_2fprotobuf_2fsource_5fcontext_2eproto() { |
| 88 static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
| 89 ::google::protobuf::GoogleOnceInit(&once, &protobuf_InitDefaults_google_2fprot
obuf_2fsource_5fcontext_2eproto_impl); |
| 90 } |
| 91 void protobuf_AddDesc_google_2fprotobuf_2fsource_5fcontext_2eproto_impl() { |
| 92 protobuf_InitDefaults_google_2fprotobuf_2fsource_5fcontext_2eproto(); |
| 93 static const char descriptor[] = { |
| 94 "\n$google/protobuf/source_context.proto\022\017" |
| 95 "google.protobuf\"\"\n\rSourceContext\022\021\n\tfile" |
| 96 "_name\030\001 \001(\tB\225\001\n\023com.google.protobufB\022Sou" |
| 97 "rceContextProtoP\001ZAgoogle.golang.org/gen" |
| 98 "proto/protobuf/source_context;source_con" |
| 99 "text\242\002\003GPB\252\002\036Google.Protobuf.WellKnownTy" |
| 100 "pesb\006proto3" |
| 101 }; |
82 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( | 102 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( |
83 "\n$google/protobuf/source_context.proto\022\017" | 103 descriptor, 251); |
84 "google.protobuf\"\"\n\rSourceContext\022\021\n\tfile" | |
85 "_name\030\001 \001(\tBU\n\023com.google.protobufB\022Sour" | |
86 "ceContextProtoP\001\240\001\001\242\002\003GPB\252\002\036Google.Proto" | |
87 "buf.WellKnownTypesb\006proto3", 186); | |
88 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( | 104 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( |
89 "google/protobuf/source_context.proto", &protobuf_RegisterTypes); | 105 "google/protobuf/source_context.proto", &protobuf_RegisterTypes); |
90 SourceContext::default_instance_ = new SourceContext(); | |
91 SourceContext::default_instance_->InitAsDefaultInstance(); | |
92 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fproto
buf_2fsource_5fcontext_2eproto); | 106 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fproto
buf_2fsource_5fcontext_2eproto); |
93 } | 107 } |
94 | 108 |
| 109 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_google_2fprotobuf_2fsource_5fconte
xt_2eproto_once_); |
| 110 void protobuf_AddDesc_google_2fprotobuf_2fsource_5fcontext_2eproto() { |
| 111 ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_google_2fprotobuf_2fsourc
e_5fcontext_2eproto_once_, |
| 112 &protobuf_AddDesc_google_2fprotobuf_2fsource_5fcontext_2eproto_
impl); |
| 113 } |
95 // Force AddDescriptors() to be called at static initialization time. | 114 // Force AddDescriptors() to be called at static initialization time. |
96 struct StaticDescriptorInitializer_google_2fprotobuf_2fsource_5fcontext_2eproto
{ | 115 struct StaticDescriptorInitializer_google_2fprotobuf_2fsource_5fcontext_2eproto
{ |
97 StaticDescriptorInitializer_google_2fprotobuf_2fsource_5fcontext_2eproto() { | 116 StaticDescriptorInitializer_google_2fprotobuf_2fsource_5fcontext_2eproto() { |
98 protobuf_AddDesc_google_2fprotobuf_2fsource_5fcontext_2eproto(); | 117 protobuf_AddDesc_google_2fprotobuf_2fsource_5fcontext_2eproto(); |
99 } | 118 } |
100 } static_descriptor_initializer_google_2fprotobuf_2fsource_5fcontext_2eproto_; | 119 } static_descriptor_initializer_google_2fprotobuf_2fsource_5fcontext_2eproto_; |
101 | 120 |
102 namespace { | |
103 | |
104 static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD; | |
105 static void MergeFromFail(int line) { | |
106 GOOGLE_CHECK(false) << __FILE__ << ":" << line; | |
107 } | |
108 | |
109 } // namespace | |
110 | |
111 | |
112 // =================================================================== | 121 // =================================================================== |
113 | 122 |
114 #if !defined(_MSC_VER) || _MSC_VER >= 1900 | 123 #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
115 const int SourceContext::kFileNameFieldNumber; | 124 const int SourceContext::kFileNameFieldNumber; |
116 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 | 125 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
117 | 126 |
118 SourceContext::SourceContext() | 127 SourceContext::SourceContext() |
119 : ::google::protobuf::Message(), _internal_metadata_(NULL) { | 128 : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
| 129 if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { |
| 130 protobuf_InitDefaults_google_2fprotobuf_2fsource_5fcontext_2eproto(); |
| 131 } |
120 SharedCtor(); | 132 SharedCtor(); |
121 // @@protoc_insertion_point(constructor:google.protobuf.SourceContext) | 133 // @@protoc_insertion_point(constructor:google.protobuf.SourceContext) |
122 } | 134 } |
123 | |
124 void SourceContext::InitAsDefaultInstance() { | |
125 _is_default_instance_ = true; | |
126 } | |
127 | |
128 SourceContext::SourceContext(const SourceContext& from) | 135 SourceContext::SourceContext(const SourceContext& from) |
129 : ::google::protobuf::Message(), | 136 : ::google::protobuf::Message(), |
130 _internal_metadata_(NULL) { | 137 _internal_metadata_(NULL), |
131 SharedCtor(); | 138 _cached_size_(0) { |
132 MergeFrom(from); | 139 _internal_metadata_.MergeFrom(from._internal_metadata_); |
| 140 file_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlrea
dyInited()); |
| 141 if (from.file_name().size() > 0) { |
| 142 file_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAl
readyInited(), from.file_name_); |
| 143 } |
133 // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceContext) | 144 // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceContext) |
134 } | 145 } |
135 | 146 |
136 void SourceContext::SharedCtor() { | 147 void SourceContext::SharedCtor() { |
137 _is_default_instance_ = false; | 148 file_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlrea
dyInited()); |
138 ::google::protobuf::internal::GetEmptyString(); | |
139 _cached_size_ = 0; | 149 _cached_size_ = 0; |
140 file_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlrea
dyInited()); | |
141 } | 150 } |
142 | 151 |
143 SourceContext::~SourceContext() { | 152 SourceContext::~SourceContext() { |
144 // @@protoc_insertion_point(destructor:google.protobuf.SourceContext) | 153 // @@protoc_insertion_point(destructor:google.protobuf.SourceContext) |
145 SharedDtor(); | 154 SharedDtor(); |
146 } | 155 } |
147 | 156 |
148 void SourceContext::SharedDtor() { | 157 void SourceContext::SharedDtor() { |
149 file_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlready
Inited()); | 158 file_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlready
Inited()); |
150 if (this != default_instance_) { | |
151 } | |
152 } | 159 } |
153 | 160 |
154 void SourceContext::SetCachedSize(int size) const { | 161 void SourceContext::SetCachedSize(int size) const { |
155 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); | 162 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
156 _cached_size_ = size; | 163 _cached_size_ = size; |
157 GOOGLE_SAFE_CONCURRENT_WRITES_END(); | 164 GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
158 } | 165 } |
159 const ::google::protobuf::Descriptor* SourceContext::descriptor() { | 166 const ::google::protobuf::Descriptor* SourceContext::descriptor() { |
160 protobuf_AssignDescriptorsOnce(); | 167 protobuf_AssignDescriptorsOnce(); |
161 return SourceContext_descriptor_; | 168 return file_level_metadata[0].descriptor; |
162 } | 169 } |
163 | 170 |
164 const SourceContext& SourceContext::default_instance() { | 171 const SourceContext& SourceContext::default_instance() { |
165 if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fsource_5fc
ontext_2eproto(); | 172 protobuf_InitDefaults_google_2fprotobuf_2fsource_5fcontext_2eproto(); |
166 return *default_instance_; | 173 return *internal_default_instance(); |
167 } | 174 } |
168 | 175 |
169 SourceContext* SourceContext::default_instance_ = NULL; | |
170 | |
171 SourceContext* SourceContext::New(::google::protobuf::Arena* arena) const { | 176 SourceContext* SourceContext::New(::google::protobuf::Arena* arena) const { |
172 SourceContext* n = new SourceContext; | 177 SourceContext* n = new SourceContext; |
173 if (arena != NULL) { | 178 if (arena != NULL) { |
174 arena->Own(n); | 179 arena->Own(n); |
175 } | 180 } |
176 return n; | 181 return n; |
177 } | 182 } |
178 | 183 |
179 void SourceContext::Clear() { | 184 void SourceContext::Clear() { |
180 // @@protoc_insertion_point(message_clear_start:google.protobuf.SourceContext) | 185 // @@protoc_insertion_point(message_clear_start:google.protobuf.SourceContext) |
181 file_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAl
readyInited()); | 186 file_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAl
readyInited()); |
182 } | 187 } |
183 | 188 |
184 bool SourceContext::MergePartialFromCodedStream( | 189 bool SourceContext::MergePartialFromCodedStream( |
185 ::google::protobuf::io::CodedInputStream* input) { | 190 ::google::protobuf::io::CodedInputStream* input) { |
186 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure | 191 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
187 ::google::protobuf::uint32 tag; | 192 ::google::protobuf::uint32 tag; |
188 // @@protoc_insertion_point(parse_start:google.protobuf.SourceContext) | 193 // @@protoc_insertion_point(parse_start:google.protobuf.SourceContext) |
189 for (;;) { | 194 for (;;) { |
190 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(
127); | 195 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffN
oLastTag(127u); |
191 tag = p.first; | 196 tag = p.first; |
192 if (!p.second) goto handle_unusual; | 197 if (!p.second) goto handle_unusual; |
193 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)
) { | 198 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)
) { |
194 // optional string file_name = 1; | 199 // string file_name = 1; |
195 case 1: { | 200 case 1: { |
196 if (tag == 10) { | 201 if (tag == 10u) { |
197 DO_(::google::protobuf::internal::WireFormatLite::ReadString( | 202 DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
198 input, this->mutable_file_name())); | 203 input, this->mutable_file_name())); |
199 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 204 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
200 this->file_name().data(), this->file_name().length(), | 205 this->file_name().data(), this->file_name().length(), |
201 ::google::protobuf::internal::WireFormatLite::PARSE, | 206 ::google::protobuf::internal::WireFormatLite::PARSE, |
202 "google.protobuf.SourceContext.file_name")); | 207 "google.protobuf.SourceContext.file_name")); |
203 } else { | 208 } else { |
204 goto handle_unusual; | 209 goto handle_unusual; |
205 } | 210 } |
206 if (input->ExpectAtEnd()) goto success; | |
207 break; | 211 break; |
208 } | 212 } |
209 | 213 |
210 default: { | 214 default: { |
211 handle_unusual: | 215 handle_unusual: |
212 if (tag == 0 || | 216 if (tag == 0 || |
213 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == | 217 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
214 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { | 218 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
215 goto success; | 219 goto success; |
216 } | 220 } |
217 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag))
; | 221 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag))
; |
218 break; | 222 break; |
219 } | 223 } |
220 } | 224 } |
221 } | 225 } |
222 success: | 226 success: |
223 // @@protoc_insertion_point(parse_success:google.protobuf.SourceContext) | 227 // @@protoc_insertion_point(parse_success:google.protobuf.SourceContext) |
224 return true; | 228 return true; |
225 failure: | 229 failure: |
226 // @@protoc_insertion_point(parse_failure:google.protobuf.SourceContext) | 230 // @@protoc_insertion_point(parse_failure:google.protobuf.SourceContext) |
227 return false; | 231 return false; |
228 #undef DO_ | 232 #undef DO_ |
229 } | 233 } |
230 | 234 |
231 void SourceContext::SerializeWithCachedSizes( | 235 void SourceContext::SerializeWithCachedSizes( |
232 ::google::protobuf::io::CodedOutputStream* output) const { | 236 ::google::protobuf::io::CodedOutputStream* output) const { |
233 // @@protoc_insertion_point(serialize_start:google.protobuf.SourceContext) | 237 // @@protoc_insertion_point(serialize_start:google.protobuf.SourceContext) |
234 // optional string file_name = 1; | 238 // string file_name = 1; |
235 if (this->file_name().size() > 0) { | 239 if (this->file_name().size() > 0) { |
236 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 240 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
237 this->file_name().data(), this->file_name().length(), | 241 this->file_name().data(), this->file_name().length(), |
238 ::google::protobuf::internal::WireFormatLite::SERIALIZE, | 242 ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
239 "google.protobuf.SourceContext.file_name"); | 243 "google.protobuf.SourceContext.file_name"); |
240 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( | 244 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( |
241 1, this->file_name(), output); | 245 1, this->file_name(), output); |
242 } | 246 } |
243 | 247 |
244 // @@protoc_insertion_point(serialize_end:google.protobuf.SourceContext) | 248 // @@protoc_insertion_point(serialize_end:google.protobuf.SourceContext) |
245 } | 249 } |
246 | 250 |
247 ::google::protobuf::uint8* SourceContext::SerializeWithCachedSizesToArray( | 251 ::google::protobuf::uint8* SourceContext::InternalSerializeWithCachedSizesToArra
y( |
248 ::google::protobuf::uint8* target) const { | 252 bool deterministic, ::google::protobuf::uint8* target) const { |
| 253 (void)deterministic; // Unused |
249 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCon
text) | 254 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.SourceCon
text) |
250 // optional string file_name = 1; | 255 // string file_name = 1; |
251 if (this->file_name().size() > 0) { | 256 if (this->file_name().size() > 0) { |
252 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( | 257 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
253 this->file_name().data(), this->file_name().length(), | 258 this->file_name().data(), this->file_name().length(), |
254 ::google::protobuf::internal::WireFormatLite::SERIALIZE, | 259 ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
255 "google.protobuf.SourceContext.file_name"); | 260 "google.protobuf.SourceContext.file_name"); |
256 target = | 261 target = |
257 ::google::protobuf::internal::WireFormatLite::WriteStringToArray( | 262 ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
258 1, this->file_name(), target); | 263 1, this->file_name(), target); |
259 } | 264 } |
260 | 265 |
261 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceConte
xt) | 266 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.SourceConte
xt) |
262 return target; | 267 return target; |
263 } | 268 } |
264 | 269 |
265 int SourceContext::ByteSize() const { | 270 size_t SourceContext::ByteSizeLong() const { |
266 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.SourceContex
t) | 271 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.SourceContex
t) |
267 int total_size = 0; | 272 size_t total_size = 0; |
268 | 273 |
269 // optional string file_name = 1; | 274 // string file_name = 1; |
270 if (this->file_name().size() > 0) { | 275 if (this->file_name().size() > 0) { |
271 total_size += 1 + | 276 total_size += 1 + |
272 ::google::protobuf::internal::WireFormatLite::StringSize( | 277 ::google::protobuf::internal::WireFormatLite::StringSize( |
273 this->file_name()); | 278 this->file_name()); |
274 } | 279 } |
275 | 280 |
| 281 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
276 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); | 282 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
277 _cached_size_ = total_size; | 283 _cached_size_ = cached_size; |
278 GOOGLE_SAFE_CONCURRENT_WRITES_END(); | 284 GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
279 return total_size; | 285 return total_size; |
280 } | 286 } |
281 | 287 |
282 void SourceContext::MergeFrom(const ::google::protobuf::Message& from) { | 288 void SourceContext::MergeFrom(const ::google::protobuf::Message& from) { |
283 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.SourceC
ontext) | 289 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.SourceC
ontext) |
284 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); | 290 GOOGLE_DCHECK_NE(&from, this); |
285 const SourceContext* source = | 291 const SourceContext* source = |
286 ::google::protobuf::internal::DynamicCastToGenerated<const SourceContext>( | 292 ::google::protobuf::internal::DynamicCastToGenerated<const SourceContext>( |
287 &from); | 293 &from); |
288 if (source == NULL) { | 294 if (source == NULL) { |
289 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.S
ourceContext) | 295 // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.S
ourceContext) |
290 ::google::protobuf::internal::ReflectionOps::Merge(from, this); | 296 ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
291 } else { | 297 } else { |
292 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobu
f.SourceContext) | 298 // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobu
f.SourceContext) |
293 MergeFrom(*source); | 299 MergeFrom(*source); |
294 } | 300 } |
295 } | 301 } |
296 | 302 |
297 void SourceContext::MergeFrom(const SourceContext& from) { | 303 void SourceContext::MergeFrom(const SourceContext& from) { |
298 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Sour
ceContext) | 304 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Sour
ceContext) |
299 if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); | 305 GOOGLE_DCHECK_NE(&from, this); |
| 306 _internal_metadata_.MergeFrom(from._internal_metadata_); |
300 if (from.file_name().size() > 0) { | 307 if (from.file_name().size() > 0) { |
301 | 308 |
302 file_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAl
readyInited(), from.file_name_); | 309 file_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAl
readyInited(), from.file_name_); |
303 } | 310 } |
304 } | 311 } |
305 | 312 |
306 void SourceContext::CopyFrom(const ::google::protobuf::Message& from) { | 313 void SourceContext::CopyFrom(const ::google::protobuf::Message& from) { |
307 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.SourceCo
ntext) | 314 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.SourceCo
ntext) |
308 if (&from == this) return; | 315 if (&from == this) return; |
309 Clear(); | 316 Clear(); |
310 MergeFrom(from); | 317 MergeFrom(from); |
311 } | 318 } |
312 | 319 |
313 void SourceContext::CopyFrom(const SourceContext& from) { | 320 void SourceContext::CopyFrom(const SourceContext& from) { |
314 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Sourc
eContext) | 321 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Sourc
eContext) |
315 if (&from == this) return; | 322 if (&from == this) return; |
316 Clear(); | 323 Clear(); |
317 MergeFrom(from); | 324 MergeFrom(from); |
318 } | 325 } |
319 | 326 |
320 bool SourceContext::IsInitialized() const { | 327 bool SourceContext::IsInitialized() const { |
321 | |
322 return true; | 328 return true; |
323 } | 329 } |
324 | 330 |
325 void SourceContext::Swap(SourceContext* other) { | 331 void SourceContext::Swap(SourceContext* other) { |
326 if (other == this) return; | 332 if (other == this) return; |
327 InternalSwap(other); | 333 InternalSwap(other); |
328 } | 334 } |
329 void SourceContext::InternalSwap(SourceContext* other) { | 335 void SourceContext::InternalSwap(SourceContext* other) { |
330 file_name_.Swap(&other->file_name_); | 336 file_name_.Swap(&other->file_name_); |
331 _internal_metadata_.Swap(&other->_internal_metadata_); | |
332 std::swap(_cached_size_, other->_cached_size_); | 337 std::swap(_cached_size_, other->_cached_size_); |
333 } | 338 } |
334 | 339 |
335 ::google::protobuf::Metadata SourceContext::GetMetadata() const { | 340 ::google::protobuf::Metadata SourceContext::GetMetadata() const { |
336 protobuf_AssignDescriptorsOnce(); | 341 protobuf_AssignDescriptorsOnce(); |
337 ::google::protobuf::Metadata metadata; | 342 return file_level_metadata[0]; |
338 metadata.descriptor = SourceContext_descriptor_; | |
339 metadata.reflection = SourceContext_reflection_; | |
340 return metadata; | |
341 } | 343 } |
342 | 344 |
343 #if PROTOBUF_INLINE_NOT_IN_HEADERS | 345 #if PROTOBUF_INLINE_NOT_IN_HEADERS |
344 // SourceContext | 346 // SourceContext |
345 | 347 |
346 // optional string file_name = 1; | 348 // string file_name = 1; |
347 void SourceContext::clear_file_name() { | 349 void SourceContext::clear_file_name() { |
348 file_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAl
readyInited()); | 350 file_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAl
readyInited()); |
349 } | 351 } |
350 const ::std::string& SourceContext::file_name() const { | 352 const ::std::string& SourceContext::file_name() const { |
351 // @@protoc_insertion_point(field_get:google.protobuf.SourceContext.file_name) | 353 // @@protoc_insertion_point(field_get:google.protobuf.SourceContext.file_name) |
352 return file_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlre
adyInited()); | 354 return file_name_.GetNoArena(); |
353 } | 355 } |
354 void SourceContext::set_file_name(const ::std::string& value) { | 356 void SourceContext::set_file_name(const ::std::string& value) { |
355 | 357 |
356 file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInit
ed(), value); | 358 file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInit
ed(), value); |
357 // @@protoc_insertion_point(field_set:google.protobuf.SourceContext.file_name) | 359 // @@protoc_insertion_point(field_set:google.protobuf.SourceContext.file_name) |
358 } | 360 } |
359 void SourceContext::set_file_name(const char* value) { | 361 void SourceContext::set_file_name(const char* value) { |
360 | 362 |
361 file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInit
ed(), ::std::string(value)); | 363 file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInit
ed(), ::std::string(value)); |
362 // @@protoc_insertion_point(field_set_char:google.protobuf.SourceContext.file_
name) | 364 // @@protoc_insertion_point(field_set_char:google.protobuf.SourceContext.file_
name) |
363 } | 365 } |
364 void SourceContext::set_file_name(const char* value, size_t size) { | 366 void SourceContext::set_file_name(const char* value, size_t size) { |
365 | 367 |
366 file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInit
ed(), | 368 file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInit
ed(), |
367 ::std::string(reinterpret_cast<const char*>(value), size)); | 369 ::std::string(reinterpret_cast<const char*>(value), size)); |
368 // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceContext.fi
le_name) | 370 // @@protoc_insertion_point(field_set_pointer:google.protobuf.SourceContext.fi
le_name) |
369 } | 371 } |
370 ::std::string* SourceContext::mutable_file_name() { | 372 ::std::string* SourceContext::mutable_file_name() { |
371 | 373 |
372 // @@protoc_insertion_point(field_mutable:google.protobuf.SourceContext.file_n
ame) | 374 // @@protoc_insertion_point(field_mutable:google.protobuf.SourceContext.file_n
ame) |
373 return file_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyString
AlreadyInited()); | 375 return file_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyString
AlreadyInited()); |
374 } | 376 } |
375 ::std::string* SourceContext::release_file_name() { | 377 ::std::string* SourceContext::release_file_name() { |
376 // @@protoc_insertion_point(field_release:google.protobuf.SourceContext.file_n
ame) | 378 // @@protoc_insertion_point(field_release:google.protobuf.SourceContext.file_n
ame) |
377 | 379 |
378 return file_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyString
AlreadyInited()); | 380 return file_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyString
AlreadyInited()); |
379 } | 381 } |
380 void SourceContext::set_allocated_file_name(::std::string* file_name) { | 382 void SourceContext::set_allocated_file_name(::std::string* file_name) { |
381 if (file_name != NULL) { | 383 if (file_name != NULL) { |
382 | 384 |
383 } else { | 385 } else { |
384 | 386 |
385 } | 387 } |
386 file_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAl
readyInited(), file_name); | 388 file_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAl
readyInited(), file_name); |
387 // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceContext.
file_name) | 389 // @@protoc_insertion_point(field_set_allocated:google.protobuf.SourceContext.
file_name) |
388 } | 390 } |
389 | 391 |
390 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS | 392 #endif // PROTOBUF_INLINE_NOT_IN_HEADERS |
391 | 393 |
392 // @@protoc_insertion_point(namespace_scope) | 394 // @@protoc_insertion_point(namespace_scope) |
393 | 395 |
394 } // namespace protobuf | 396 } // namespace protobuf |
395 } // namespace google | 397 } // namespace google |
396 | 398 |
397 // @@protoc_insertion_point(global_scope) | 399 // @@protoc_insertion_point(global_scope) |
OLD | NEW |