Home
last modified time | relevance | path

Searched refs:type_url (Results 1 – 25 of 42) sorted by relevance

12

/third_party/protobuf/src/google/protobuf/
Dany_lite.cc56 AnyMetadata::AnyMetadata(UrlType* type_url, ValueType* value) in AnyMetadata() argument
57 : type_url_(type_url), value_(value) {} in AnyMetadata()
97 StringPiece type_url = Get(type_url_); in InternalIs() local
98 return type_url.size() >= type_name.size() + 1 && in InternalIs()
99 type_url[type_url.size() - type_name.size() - 1] == '/' && in InternalIs()
100 HasSuffixString(type_url, type_name); in InternalIs()
103 bool ParseAnyTypeUrl(const std::string& type_url, std::string* url_prefix, in ParseAnyTypeUrl() argument
105 size_t pos = type_url.find_last_of("/"); in ParseAnyTypeUrl()
106 if (pos == std::string::npos || pos + 1 == type_url.size()) { in ParseAnyTypeUrl()
110 *url_prefix = type_url.substr(0, pos + 1); in ParseAnyTypeUrl()
[all …]
Dany_test.cc92 EXPECT_EQ("type.myservice.com/protobuf_unittest.TestAny", any.type_url()); in TEST()
95 EXPECT_EQ("type.myservice.com/protobuf_unittest.TestAny", any.type_url()); in TEST()
98 EXPECT_EQ("/protobuf_unittest.TestAny", any.type_url()); in TEST()
138 const char* type_url = src.type_url().data(); in TEST() local
141 EXPECT_EQ(type_url, dst.type_url().data()); in TEST()
154 const char* type_url = src.type_url().data(); in TEST() local
158 EXPECT_EQ(type_url, dst.type_url().data()); in TEST()
Dany.h63 AnyMetadata(UrlType* type_url, ValueType* value);
127 bool ParseAnyTypeUrl(const std::string& type_url, std::string* full_type_name);
134 bool ParseAnyTypeUrl(const std::string& type_url, std::string* url_prefix,
Dany.pb.h144 static bool ParseAnyTypeUrl(const string& type_url,
220 const std::string& type_url() const;
227 void set_allocated_type_url(std::string* type_url);
278 inline const std::string& Any::type_url() const { in type_url() function
325 inline void Any::set_allocated_type_url(std::string* type_url) { in set_allocated_type_url() argument
326 if (type_url != nullptr) { in set_allocated_type_url()
331 …type_url_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), type_url, in set_allocated_type_url()
Dany.pb.cc94 bool Any::ParseAnyTypeUrl(const string& type_url, in ParseAnyTypeUrl() argument
96 return ::PROTOBUF_NAMESPACE_ID::internal::ParseAnyTypeUrl(type_url, in ParseAnyTypeUrl()
226 if (this->type_url().size() > 0) { in _InternalSerialize()
258 if (this->type_url().size() > 0) { in ByteSizeLong()
302 if (from.type_url().size() > 0) { in MergeFrom()
/third_party/protobuf/src/google/protobuf/util/
Djson_util.h122 TypeResolver* resolver, const std::string& type_url,
127 TypeResolver* resolver, const std::string& type_url, in BinaryToJsonStream() argument
130 return BinaryToJsonStream(resolver, type_url, binary_input, json_output, in BinaryToJsonStream()
135 TypeResolver* resolver, const std::string& type_url,
140 const std::string& type_url, in BinaryToJsonString() argument
143 return BinaryToJsonString(resolver, type_url, binary_input, json_output, in BinaryToJsonString()
153 TypeResolver* resolver, const std::string& type_url,
158 TypeResolver* resolver, const std::string& type_url, in JsonToBinaryStream() argument
161 return JsonToBinaryStream(resolver, type_url, json_input, binary_output, in JsonToBinaryStream()
166 TypeResolver* resolver, const std::string& type_url,
[all …]
Djson_util.cc85 const std::string& type_url, in BinaryToJsonStream() argument
91 RETURN_IF_ERROR(resolver->ResolveMessageType(type_url, &type)); in BinaryToJsonStream()
113 const std::string& type_url, in BinaryToJsonString() argument
119 return BinaryToJsonStream(resolver, type_url, &input_stream, &output_stream, in BinaryToJsonString()
176 const std::string& type_url, in JsonToBinaryStream() argument
181 RETURN_IF_ERROR(resolver->ResolveMessageType(type_url, &type)); in JsonToBinaryStream()
207 const std::string& type_url, in JsonToBinaryString() argument
213 return JsonToBinaryStream(resolver, type_url, &input_stream, &output_stream, in JsonToBinaryString()
Dtype_resolver_util.cc76 Status ResolveMessageType(const std::string& type_url, Type* type) override { in ResolveMessageType() argument
78 Status status = ParseTypeUrl(type_url, &type_name); in ResolveMessageType()
92 Status ResolveEnumType(const std::string& type_url, in ResolveEnumType() argument
95 Status status = ParseTypeUrl(type_url, &type_name); in ResolveEnumType()
308 Status ParseTypeUrl(const std::string& type_url, std::string* type_name) { in ParseTypeUrl() argument
309 if (type_url.substr(0, url_prefix_.size() + 1) != url_prefix_ + "/") { in ParseTypeUrl()
313 url_prefix_, "/<typename>', got: ", type_url)); in ParseTypeUrl()
315 *type_name = type_url.substr(url_prefix_.size() + 1); in ParseTypeUrl()
Dtype_resolver.h59 const std::string& type_url, google::protobuf::Type* message_type) = 0;
62 virtual util::Status ResolveEnumType(const std::string& type_url,
/third_party/protobuf/php/src/Google/Protobuf/
DAny.php107 private $type_url = ''; variable in Google\\Protobuf\\Any
184 return $this->type_url;
218 $this->type_url = $var;
263 if (substr($this->type_url, 0, $url_prifix_len) !=
269 substr($this->type_url, $url_prifix_len);
306 $this->type_url = GPBUtil::TYPE_URL_PREFIX . $fully_qualifed_name;
319 $type_url = GPBUtil::TYPE_URL_PREFIX . $fully_qualifed_name;
320 return $this->type_url === $type_url;
DField.php48 private $type_url = ''; variable in Google\\Protobuf\\Field
229 return $this->type_url;
243 $this->type_url = $var;
/third_party/skia/third_party/externals/abseil-cpp/absl/status/
Dstatus.cc78 absl::string_view type_url) { in FindPayloadIndexByUrl() argument
82 if ((*payloads)[i].type_url == type_url) return i; in FindPayloadIndexByUrl()
117 absl::string_view type_url) const { in GetPayload()
119 int index = status_internal::FindPayloadIndexByUrl(payloads, type_url); in GetPayload()
125 void Status::SetPayload(absl::string_view type_url, absl::Cord payload) { in SetPayload() argument
136 status_internal::FindPayloadIndexByUrl(rep->payloads.get(), type_url); in SetPayload()
142 rep->payloads->push_back({std::string(type_url), std::move(payload)}); in SetPayload()
145 bool Status::ErasePayload(absl::string_view type_url) { in ErasePayload() argument
146 int index = status_internal::FindPayloadIndexByUrl(GetPayloads(), type_url); in ErasePayload()
175 visitor(elem.type_url, elem.payload); in ForEachPayload()
[all …]
Dstatus.h566 absl::optional<absl::Cord> GetPayload(absl::string_view type_url) const;
574 void SetPayload(absl::string_view type_url, absl::Cord payload);
580 bool ErasePayload(absl::string_view type_url);
/third_party/protobuf/src/google/protobuf/util/internal/
Dtype_info_test_helper.cc89 io::CodedInputStream* coded_input, const std::string& type_url) { in NewProtoSource() argument
90 const google::protobuf::Type* type = typeinfo_->GetTypeByTypeUrl(type_url); in NewProtoSource()
102 const std::string& type_url, strings::ByteSink* output, in NewProtoWriter() argument
104 const google::protobuf::Type* type = typeinfo_->GetTypeByTypeUrl(type_url); in NewProtoWriter()
116 const std::string& type_url, ObjectWriter* writer) { in NewDefaultValueWriter() argument
117 const google::protobuf::Type* type = typeinfo_->GetTypeByTypeUrl(type_url); in NewDefaultValueWriter()
Dtype_info.cc62 StringPiece type_url) const override { in ResolveTypeUrl()
64 cached_types_.find(type_url); in ResolveTypeUrl()
71 *string_storage_.insert(std::string(type_url)).first; in ResolveTypeUrl()
82 StringPiece type_url) const override { in GetTypeByTypeUrl()
83 StatusOrType result = ResolveTypeUrl(type_url); in GetTypeByTypeUrl()
88 StringPiece type_url) const override { in GetEnumByTypeUrl()
90 cached_enums_.find(type_url); in GetEnumByTypeUrl()
97 *string_storage_.insert(std::string(type_url)).first; in GetEnumByTypeUrl()
Dutility.cc127 const StringPiece GetTypeWithoutUrl(StringPiece type_url) { in GetTypeWithoutUrl() argument
128 if (type_url.size() > kTypeUrlSize && type_url[kTypeUrlSize] == '/') { in GetTypeWithoutUrl()
129 return type_url.substr(kTypeUrlSize + 1); in GetTypeWithoutUrl()
131 size_t idx = type_url.rfind('/'); in GetTypeWithoutUrl()
132 if (idx != type_url.npos) { in GetTypeWithoutUrl()
133 type_url.remove_prefix(idx + 1); in GetTypeWithoutUrl()
135 return type_url; in GetTypeWithoutUrl()
Dprotostream_objectwriter.cc1146 field->type_url() != kStructNullValueTypeUrl) { in RenderDataPiece()
1157 const TypeRenderer* type_renderer = FindTypeRenderer(field->type_url()); in RenderDataPiece()
1166 InvalidValue(field->type_url(), in RenderDataPiece()
1176 field->type_url() != kStructNullValueTypeUrl) { in RenderDataPiece()
1191 const TypeRenderer* type_renderer = FindTypeRenderer(field->type_url()); in RenderDataPiece()
1196 field->type_url() == kStructValueTypeUrl) { in RenderDataPiece()
1200 InvalidValue(field->type_url(), in RenderDataPiece()
1211 field->type_url() != kStructNullValueTypeUrl) { in RenderDataPiece()
1281 ProtoStreamObjectWriter::FindTypeRenderer(const std::string& type_url) { in FindTypeRenderer() argument
1284 return FindOrNull(*renderers_, type_url); in FindTypeRenderer()
[all …]
Dtype_info.h61 StringPiece type_url) const = 0;
68 StringPiece type_url) const = 0;
75 StringPiece type_url) const = 0;
Dtype_info_test_helper.h75 const std::string& type_url);
78 const std::string& type_url, strings::ByteSink* output,
81 DefaultValueObjectWriter* NewDefaultValueWriter(const std::string& type_url,
Dprotostream_objectsource.cc280 typeinfo_->GetTypeByTypeUrl(field->type_url()); in RenderMap()
602 std::string type_url; in RenderAny() local
618 os->stream_->ReadString(&type_url, type_url_size); in RenderAny()
631 if (!type_url.empty()) { in RenderAny()
632 ow->RenderString("@type", type_url); in RenderAny()
639 if (type_url.empty()) { in RenderAny()
646 os->typeinfo_->ResolveTypeUrl(type_url); in RenderAny()
672 ow->RenderString("@type", type_url); in RenderAny()
760 ProtoStreamObjectSource::FindTypeRenderer(const std::string& type_url) { in FindTypeRenderer() argument
763 return FindOrNull(*renderers_, type_url); in FindTypeRenderer()
[all …]
Ddefault_value_objectwriter.cc289 typeinfo->ResolveTypeUrl(sub_field.type_url()); in GetMapValueType()
291 GOOGLE_LOG(WARNING) << "Cannot resolve type '" << sub_field.type_url() << "'."; in GetMapValueType()
352 typeinfo->ResolveTypeUrl(field.type_url()); in PopulateChildren()
355 GOOGLE_LOG(WARNING) << "Cannot resolve type '" << field.type_url() << "'."; in PopulateChildren()
420 typeinfo->GetEnumByTypeUrl(field.type_url()); in FindEnumDefault()
422 GOOGLE_LOG(WARNING) << "Could not find enum with type '" << field.type_url() in FindEnumDefault()
Dproto_writer.cc480 field->type_url())); in StartObject()
523 field->type_url())); in StartList()
554 field->type_url())); in RenderDataPiece()
632 InvalidValue(field.type_url().empty() in RenderPrimitiveField()
634 : field.type_url(), in RenderPrimitiveField()
703 field.number(), data, typeinfo_->GetEnumByTypeUrl(field.type_url()), in RenderPrimitiveField()
778 ? typeinfo_->GetTypeByTypeUrl(field->type_url()) in LookupType()
/third_party/protobuf/python/google/protobuf/
Djson_format.py329 type_url = message.type_url
330 js['@type'] = type_url
331 sub_message = _CreateMessageFromTypeUrl(type_url, self.descriptor_pool)
397 def _CreateMessageFromTypeUrl(type_url, descriptor_pool): argument
401 type_name = type_url.split('/')[-1]
406 'Can not find message descriptor by type_url: {0}.'.format(type_url))
605 type_url = value['@type']
609 sub_message = _CreateMessageFromTypeUrl(type_url, self.descriptor_pool)
620 value['@type'] = type_url
623 message.type_url = type_url
/third_party/protobuf/conformance/
Dconformance_cpp.cc71 string* type_url; variable
128 Status status = JsonToBinaryString(type_resolver, *type_url, in DoTest()
182 Status status = BinaryToJsonString(type_resolver, *type_url, proto_binary, in DoTest()
255 type_url = new string(GetTypeUrl(TestAllTypesProto3::descriptor())); in main()
/third_party/protobuf/python/google/protobuf/internal/
Dwell_known_types.py76 self.type_url = '%s/%s' % (type_url_prefix, msg.DESCRIPTOR.full_name)
78 self.type_url = '%s%s' % (type_url_prefix, msg.DESCRIPTOR.full_name)
92 return self.type_url.split('/')[-1]
96 return '/' in self.type_url and self.TypeName() == descriptor.full_name

12