Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-31 10:12:04

0001 // Protocol Buffers - Google's data interchange format
0002 // Copyright 2008 Google Inc.  All rights reserved.
0003 //
0004 // Use of this source code is governed by a BSD-style
0005 // license that can be found in the LICENSE file or at
0006 // https://developers.google.com/open-source/licenses/bsd
0007 
0008 // Defines a TypeResolver for the Any message.
0009 
0010 #ifndef GOOGLE_PROTOBUF_UTIL_TYPE_RESOLVER_H__
0011 #define GOOGLE_PROTOBUF_UTIL_TYPE_RESOLVER_H__
0012 
0013 #include <string>
0014 
0015 #include "google/protobuf/type.pb.h"
0016 #include "absl/status/status.h"
0017 #include "google/protobuf/port.h"
0018 
0019 
0020 // Must be included last.
0021 #include "google/protobuf/port_def.inc"
0022 
0023 namespace google {
0024 namespace protobuf {
0025 class DescriptorPool;
0026 namespace util {
0027 
0028 // Abstract interface for a type resolver.
0029 //
0030 // Implementations of this interface must be thread-safe.
0031 class PROTOBUF_EXPORT TypeResolver {
0032  public:
0033   TypeResolver() {}
0034   TypeResolver(const TypeResolver&) = delete;
0035   TypeResolver& operator=(const TypeResolver&) = delete;
0036   virtual ~TypeResolver() {}
0037 
0038   // Resolves a type url for a message type.
0039   virtual absl::Status ResolveMessageType(
0040       const std::string& type_url, google::protobuf::Type* message_type) = 0;
0041 
0042   // Resolves a type url for an enum type.
0043   virtual absl::Status ResolveEnumType(const std::string& type_url,
0044                                        google::protobuf::Enum* enum_type) = 0;
0045 };
0046 
0047 }  // namespace util
0048 }  // namespace protobuf
0049 }  // namespace google
0050 
0051 #include "google/protobuf/port_undef.inc"
0052 
0053 #endif  // GOOGLE_PROTOBUF_UTIL_TYPE_RESOLVER_H__