aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/util/internal/type_info.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/util/internal/type_info.h')
-rw-r--r--src/google/protobuf/util/internal/type_info.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/google/protobuf/util/internal/type_info.h b/src/google/protobuf/util/internal/type_info.h
index 67403fff..d8133176 100644
--- a/src/google/protobuf/util/internal/type_info.h
+++ b/src/google/protobuf/util/internal/type_info.h
@@ -55,24 +55,29 @@ class LIBPROTOBUF_EXPORT TypeInfo {
//
// This TypeInfo class retains the ownership of the returned pointer.
virtual util::StatusOr<const google::protobuf::Type*> ResolveTypeUrl(
- StringPiece type_url) = 0;
+ StringPiece type_url) const = 0;
// Resolves a type url into a Type. Like ResolveTypeUrl() but returns
// NULL if the type url is invalid or the type cannot be found.
//
// This TypeInfo class retains the ownership of the returned pointer.
- virtual const google::protobuf::Type* GetType(StringPiece type_url) = 0;
+ virtual const google::protobuf::Type* GetTypeByTypeUrl(
+ StringPiece type_url) const = 0;
// Resolves a type url for an enum. Returns NULL if the type url is
// invalid or the type cannot be found.
//
// This TypeInfo class retains the ownership of the returned pointer.
- virtual const google::protobuf::Enum* GetEnum(StringPiece type_url) = 0;
+ virtual const google::protobuf::Enum* GetEnumByTypeUrl(
+ StringPiece type_url) const = 0;
// Looks up a field in the specified type given a CamelCase name.
virtual const google::protobuf::Field* FindField(
- const google::protobuf::Type* type, StringPiece camel_case_name) = 0;
+ const google::protobuf::Type* type,
+ StringPiece camel_case_name) const = 0;
+ // Creates a TypeInfo object that looks up type information from a
+ // TypeResolver. Caller takes ownership of the returned pointer.
static TypeInfo* NewTypeInfo(TypeResolver* type_resolver);
private: