/src/LPM/external.protobuf/include/google/protobuf/internal_visibility.h
Line | Count | Source |
1 | | // Protocol Buffers - Google's data interchange format |
2 | | // Copyright 2023 Google Inc. All rights reserved. |
3 | | // |
4 | | // Use of this source code is governed by a BSD-style |
5 | | // license that can be found in the LICENSE file or at |
6 | | // https://developers.google.com/open-source/licenses/bsd |
7 | | #ifndef GOOGLE_PROTOBUF_INTERNAL_VISIBILITY_H__ |
8 | | #define GOOGLE_PROTOBUF_INTERNAL_VISIBILITY_H__ |
9 | | |
10 | | namespace google { |
11 | | namespace protobuf { |
12 | | |
13 | | class Arena; |
14 | | class Message; |
15 | | class MessageLite; |
16 | | |
17 | | namespace internal { |
18 | | |
19 | | class InternalVisibilityForTesting; |
20 | | |
21 | | // Empty class to use as a mandatory 'internal token' for functions that have to |
22 | | // be public, such as arena constructors, but that are for internal use only. |
23 | | class InternalVisibility { |
24 | | private: |
25 | | // Note: we don't use `InternalVisibility() = default` here, but default the |
26 | | // ctor outside of the class to force a private ctor instance. |
27 | | explicit constexpr InternalVisibility(); |
28 | | |
29 | | friend class ::google::protobuf::Arena; |
30 | | friend class ::google::protobuf::Message; |
31 | | friend class ::google::protobuf::MessageLite; |
32 | | |
33 | | friend class InternalVisibilityForTesting; |
34 | | }; |
35 | | |
36 | 1.57M | inline constexpr InternalVisibility::InternalVisibility() = default; |
37 | | |
38 | | } // namespace internal |
39 | | } // namespace protobuf |
40 | | } // namespace google |
41 | | |
42 | | #endif // GOOGLE_PROTOBUF_INTERNAL_VISIBILITY_H__ |