about summary refs log tree commit diff
path: root/absl/flags/internal/commandlineflag.h
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2020-05-07T17·42-0700
committervslashg <gfalcon@google.com>2020-05-07T19·26-0400
commita35ef8a62ce7cded2f131ccbd2b5c4a81d622507 (patch)
tree2b4a4451d714d8ebee30db71f7a0ee8430e9789e /absl/flags/internal/commandlineflag.h
parentbd317cae3bc2630d1b12c5f1d77036e937d1d725 (diff)
Export of internal Abseil changes
--
034c30a00c64d93b9fcbc9d99a0a33801544d741 by Gennadiy Rozental <rogeeff@google.com>:

Split private handle interfaces accessor into a separate target with private visibility.

PiperOrigin-RevId: 310391488

--
6f6ca869309b17900b90849e08488ce7f7b0193a by Derek Mauro <dmauro@google.com>:

Remove __CLANG_SUPPORT_DYN_ANNOTATION__, which is a symbol defined by us
to be true in all builds

PiperOrigin-RevId: 310385325

--
ed5c1880c86973c000e826a3006b38e53ab3ed52 by Samuel Benzaquen <sbenza@google.com>:

Add tests to exercise extreme width and precision, and fix the overflows from
it.

PiperOrigin-RevId: 310224957
GitOrigin-RevId: 034c30a00c64d93b9fcbc9d99a0a33801544d741
Change-Id: I6c89a3c89ae92fa617c696044148ce9a79bcdda8
Diffstat (limited to 'absl/flags/internal/commandlineflag.h')
-rw-r--r--absl/flags/internal/commandlineflag.h31
1 files changed, 1 insertions, 30 deletions
diff --git a/absl/flags/internal/commandlineflag.h b/absl/flags/internal/commandlineflag.h
index af5e05d59984..2d3b794dbd0f 100644
--- a/absl/flags/internal/commandlineflag.h
+++ b/absl/flags/internal/commandlineflag.h
@@ -16,18 +16,12 @@
 #ifndef ABSL_FLAGS_INTERNAL_COMMANDLINEFLAG_H_
 #define ABSL_FLAGS_INTERNAL_COMMANDLINEFLAG_H_
 
-#include <stddef.h>
-#include <stdint.h>
-
 #include <memory>
 #include <string>
-#include <typeinfo>
 
 #include "absl/base/config.h"
 #include "absl/base/internal/fast_type_id.h"
 #include "absl/base/macros.h"
-#include "absl/flags/config.h"
-#include "absl/flags/marshalling.h"
 #include "absl/strings/string_view.h"
 #include "absl/types/optional.h"
 
@@ -147,7 +141,7 @@ class CommandLineFlag {
   ~CommandLineFlag() = default;
 
  private:
-  friend class PrivateHandleInterface;
+  friend class PrivateHandleAccessor;
 
   // Sets the value of the flag based on specified string `value`. If the flag
   // was successfully set to new value, it returns true. Otherwise, sets `error`
@@ -181,29 +175,6 @@ class CommandLineFlag {
   virtual void CheckDefaultValueParsingRoundtrip() const = 0;
 };
 
-// This class serves as a trampoline to access private methods of
-// CommandLineFlag. This class is intended for use exclusively internally inside
-// of the Abseil Flags implementation
-class PrivateHandleInterface {
- public:
-  // Access to CommandLineFlag::TypeId.
-  static FlagFastTypeId TypeId(const CommandLineFlag& flag);
-
-  // Access to CommandLineFlag::SaveState.
-  static std::unique_ptr<FlagStateInterface> SaveState(CommandLineFlag* flag);
-
-  // Access to CommandLineFlag::ValidateInputValue.
-  static bool ValidateInputValue(const CommandLineFlag& flag,
-                                 absl::string_view value);
-
-  // Access to CommandLineFlag::CheckDefaultValueParsingRoundtrip.
-  static void CheckDefaultValueParsingRoundtrip(const CommandLineFlag& flag);
-
-  static bool ParseFrom(CommandLineFlag* flag, absl::string_view value,
-                        flags_internal::FlagSettingMode set_mode,
-                        flags_internal::ValueSource source, std::string* error);
-};
-
 // This macro is the "source of truth" for the list of supported flag built-in
 // types.
 #define ABSL_FLAGS_INTERNAL_BUILTIN_TYPES(A) \