Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/google/protobuf/internal_visibility.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Protocol Buffers - Google's data interchange format
0002 // Copyright 2023 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 #ifndef GOOGLE_PROTOBUF_INTERNAL_VISIBILITY_H__
0008 #define GOOGLE_PROTOBUF_INTERNAL_VISIBILITY_H__
0009 
0010 namespace google {
0011 namespace protobuf {
0012 
0013 class Arena;
0014 class Message;
0015 class MessageLite;
0016 
0017 namespace internal {
0018 
0019 class InternalVisibilityForTesting;
0020 class InternalMetadata;
0021 
0022 // Empty class to use as a mandatory 'internal token' for functions that have to
0023 // be public, such as arena constructors, but that are for internal use only.
0024 class InternalVisibility {
0025  private:
0026   // Note: we don't use `InternalVisibility() = default` here, but default the
0027   // ctor outside of the class to force a private ctor instance.
0028   explicit constexpr InternalVisibility();
0029 
0030   friend class ::google::protobuf::Arena;
0031   friend class ::google::protobuf::Message;
0032   friend class ::google::protobuf::MessageLite;
0033   friend class ::google::protobuf::internal::InternalMetadata;
0034 
0035   friend class InternalVisibilityForTesting;
0036 };
0037 
0038 inline constexpr InternalVisibility::InternalVisibility() = default;
0039 
0040 }  // namespace internal
0041 }  // namespace protobuf
0042 }  // namespace google
0043 
0044 #endif  // GOOGLE_PROTOBUF_INTERNAL_VISIBILITY_H__