summaryrefslogtreecommitdiff
path: root/absl/flags/reflection.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/flags/reflection.h')
-rw-r--r--absl/flags/reflection.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/absl/flags/reflection.h b/absl/flags/reflection.h
index 045f9784..4ce0ab6c 100644
--- a/absl/flags/reflection.h
+++ b/absl/flags/reflection.h
@@ -26,6 +26,7 @@
#include <string>
#include "absl/base/config.h"
+#include "absl/container/flat_hash_map.h"
#include "absl/flags/commandlineflag.h"
#include "absl/flags/internal/commandlineflag.h"
@@ -40,7 +41,11 @@ class FlagSaverImpl;
// Returns the reflection handle of an Abseil flag of the specified name, or
// `nullptr` if not found. This function will emit a warning if the name of a
// 'retired' flag is specified.
-CommandLineFlag* FindCommandLineFlag(absl::string_view name);
+absl::CommandLineFlag* FindCommandLineFlag(absl::string_view name);
+
+// Returns current state of the Flags registry in a form of mapping from flag
+// name to a flag reflection handle.
+absl::flat_hash_map<absl::string_view, absl::CommandLineFlag*> GetAllFlags();
//------------------------------------------------------------------------------
// FlagSaver