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