FlagRegistry::GlobalRegistry()->RegisterFlag(flag); // default registry
}
-// TODO(csilvers): remove
-FlagRegisterer::FlagRegisterer(const char* name, const char* type,
- const char* help, const char* filename,
- void* current_storage, void* defvalue_storage,
- const fL::OptionalDefineArgs& optional_args) {
- if (help == NULL)
- help = "";
- // FlagValue expects the type-name to not include any namespace
- // components, so we get rid of those, if any.
- if (strchr(type, ':'))
- type = strrchr(type, ':') + 1;
- FlagValue* current = new FlagValue(current_storage, type, false);
- FlagValue* defvalue = new FlagValue(defvalue_storage, type, false);
- // Importantly, flag_ will never be deleted, so storage is always good.
- CommandLineFlag* flag = new CommandLineFlag(name, help, filename,
- current, defvalue);
- FlagRegistry::GlobalRegistry()->RegisterFlag(flag); // default registry
-}
-
// --------------------------------------------------------------------
// GetAllFlags()
// The main way the FlagRegistry class exposes its data. This
#include <gflags/gflags_declare.h> // IWYU pragma: export
@ac_google_start_namespace@
-namespace fL { struct OptionalDefineArgs { }; } // TODO(csilvers): remove
-
//
// NOTE: all functions below MUST have an explicit 'extern' before
// them. Our automated opensourcing tools use this as a signal to do
FlagRegisterer(const char* name, const char* type,
const char* help, const char* filename,
void* current_storage, void* defvalue_storage);
- // TODO(csilvers): remove this once
- FlagRegisterer(const char* name, const char* type,
- const char* help, const char* filename,
- void* current_storage, void* defvalue_storage,
- const fL::OptionalDefineArgs& optional_args);
};
// If your application #defines STRIP_FLAG_HELP to a non-zero value
#include <gflags/gflags_declare.h> // IWYU pragma: export
namespace google {
-namespace fL { struct OptionalDefineArgs { }; } // TODO(csilvers): remove
-
//
// NOTE: all functions below MUST have an explicit 'extern' before
// them. Our automated opensourcing tools use this as a signal to do
FlagRegisterer(const char* name, const char* type,
const char* help, const char* filename,
void* current_storage, void* defvalue_storage);
- // TODO(csilvers): remove this once
- FlagRegisterer(const char* name, const char* type,
- const char* help, const char* filename,
- void* current_storage, void* defvalue_storage,
- const fL::OptionalDefineArgs& optional_args);
};
// If your application #defines STRIP_FLAG_HELP to a non-zero value