Back to home page

EIC code displayed by LXR

 
 

    


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

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 
0021 // Empty class to use as a mandatory 'internal token' for functions that have to
0022 // be public, such as arena constructors, but that are for internal use only.
0023 class InternalVisibility {
0024  private:
0025   // Note: we don't use `InternalVisibility() = default` here, but default the
0026   // ctor outside of the class to force a private ctor instance.
0027   explicit constexpr InternalVisibility();
0028 
0029   friend class ::google::protobuf::Arena;
0030   friend class ::google::protobuf::Message;
0031   friend class ::google::protobuf::MessageLite;
0032 
0033   friend class InternalVisibilityForTesting;
0034 };
0035 
0036 inline constexpr InternalVisibility::InternalVisibility() = default;
0037 
0038 }  // namespace internal
0039 }  // namespace protobuf
0040 }  // namespace google
0041 
0042 #endif  // GOOGLE_PROTOBUF_INTERNAL_VISIBILITY_H__