File indexing completed on 2025-01-30 09:31:43
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef ABSL_FLAGS_INTERNAL_PRIVATE_HANDLE_ACCESSOR_H_
0017 #define ABSL_FLAGS_INTERNAL_PRIVATE_HANDLE_ACCESSOR_H_
0018
0019 #include <memory>
0020 #include <string>
0021
0022 #include "absl/base/config.h"
0023 #include "absl/flags/commandlineflag.h"
0024 #include "absl/flags/internal/commandlineflag.h"
0025 #include "absl/strings/string_view.h"
0026
0027 namespace absl {
0028 ABSL_NAMESPACE_BEGIN
0029 namespace flags_internal {
0030
0031
0032
0033
0034 class PrivateHandleAccessor {
0035 public:
0036
0037 static FlagFastTypeId TypeId(const CommandLineFlag& flag);
0038
0039
0040 static std::unique_ptr<FlagStateInterface> SaveState(CommandLineFlag& flag);
0041
0042
0043 static bool IsSpecifiedOnCommandLine(const CommandLineFlag& flag);
0044
0045
0046 static bool ValidateInputValue(const CommandLineFlag& flag,
0047 absl::string_view value);
0048
0049
0050 static void CheckDefaultValueParsingRoundtrip(const CommandLineFlag& flag);
0051
0052 static bool ParseFrom(CommandLineFlag& flag, absl::string_view value,
0053 flags_internal::FlagSettingMode set_mode,
0054 flags_internal::ValueSource source, std::string& error);
0055 };
0056
0057 }
0058 ABSL_NAMESPACE_END
0059 }
0060
0061 #endif