Namespaces | Macros | Functions
flag.h File Reference
#include "absl/base/attributes.h"
#include "absl/base/casts.h"
#include "absl/flags/config.h"
#include "absl/flags/declare.h"
#include "absl/flags/internal/commandlineflag.h"
#include "absl/flags/internal/flag.h"
#include "absl/flags/marshalling.h"
Include dependency graph for flag.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 absl
 

Macros

#define ABSL_FLAG(Type, name, default_value, help)   ABSL_FLAG_IMPL(Type, name, default_value, help)
 
#define ABSL_FLAG_IMPL(Type, name, default_value, help)
 
#define ABSL_FLAG_IMPL_DECLARE_DEF_VAL_WRAPPER(name, Type, default_value)
 
#define ABSL_FLAG_IMPL_DECLARE_HELP_WRAPPER(name, txt)
 
#define ABSL_FLAG_IMPL_FILENAME()   __FILE__
 
#define ABSL_FLAG_IMPL_FLAGHELP(txt)   txt
 
#define ABSL_FLAG_IMPL_FLAGNAME(txt)   txt
 
#define ABSL_FLAG_IMPL_REGISTRAR(T, flag)   absl::flags_internal::FlagRegistrar<T, true>(&flag)
 
#define ABSL_FLAGS_INTERNAL_LOCK_FREE_EXPORT(T)   extern T GetFlag(const absl::Flag<T>& flag);
 
#define ABSL_FLAGS_INTERNAL_LOCK_FREE_VALIDATE(BIT)
 
#define ABSL_RETIRED_FLAG(type, flagname, default_value, explanation)
 

Functions

template<typename T >
absl::GetFlag (const absl::Flag< T > &flag)
 
template<typename T >
void absl::SetFlag (absl::Flag< T > *flag, const T &v)
 
template<typename T , typename V >
void absl::SetFlag (absl::Flag< T > *flag, const V &v)
 

Macro Definition Documentation

◆ ABSL_FLAG

#define ABSL_FLAG (   Type,
  name,
  default_value,
  help 
)    ABSL_FLAG_IMPL(Type, name, default_value, help)

Definition at line 177 of file flag.h.

◆ ABSL_FLAG_IMPL

#define ABSL_FLAG_IMPL (   Type,
  name,
  default_value,
  help 
)
Value:
namespace absl {} \
ABSL_FLAG_IMPL_DECLARE_DEF_VAL_WRAPPER(name, Type, default_value) \
ABSL_FLAG_IMPL_DECLARE_HELP_WRAPPER(name, help) \
absl::Flag<Type> FLAGS_##name( \
&AbslFlagsWrapHelp##name, \
&absl::flags_internal::FlagMarshallingOps<Type>, \
&AbslFlagsInitFlag##name); \
extern bool FLAGS_no##name; \
bool FLAGS_no##name = ABSL_FLAG_IMPL_REGISTRAR(Type, FLAGS_##name)
Definition: algorithm.h:29
#define ABSL_FLAG_IMPL_REGISTRAR(T, flag)
Definition: flag.h:215
#define ABSL_FLAG_IMPL_FILENAME()
Definition: flag.h:214
#define ABSL_FLAG_IMPL_FLAGNAME(txt)
Definition: flag.h:213
char name[1]
Definition: mutex.cc:296

Definition at line 242 of file flag.h.

◆ ABSL_FLAG_IMPL_DECLARE_DEF_VAL_WRAPPER

#define ABSL_FLAG_IMPL_DECLARE_DEF_VAL_WRAPPER (   name,
  Type,
  default_value 
)
Value:
static void* AbslFlagsInitFlag##name() { \
return absl::flags_internal::MakeFromDefaultValue<Type>(default_value); \
}
char name[1]
Definition: mutex.cc:296

Definition at line 232 of file flag.h.

◆ ABSL_FLAG_IMPL_DECLARE_HELP_WRAPPER

#define ABSL_FLAG_IMPL_DECLARE_HELP_WRAPPER (   name,
  txt 
)
Value:
static std::string AbslFlagsWrapHelp##name() { \
return ABSL_FLAG_IMPL_FLAGHELP(txt); \
}
char name[1]
Definition: mutex.cc:296
#define ABSL_FLAG_IMPL_FLAGHELP(txt)
Definition: flag.h:224

Definition at line 227 of file flag.h.

◆ ABSL_FLAG_IMPL_FILENAME

#define ABSL_FLAG_IMPL_FILENAME ( )    __FILE__

Definition at line 214 of file flag.h.

◆ ABSL_FLAG_IMPL_FLAGHELP

#define ABSL_FLAG_IMPL_FLAGHELP (   txt)    txt

Definition at line 224 of file flag.h.

◆ ABSL_FLAG_IMPL_FLAGNAME

#define ABSL_FLAG_IMPL_FLAGNAME (   txt)    txt

Definition at line 213 of file flag.h.

◆ ABSL_FLAG_IMPL_REGISTRAR

#define ABSL_FLAG_IMPL_REGISTRAR (   T,
  flag 
)    absl::flags_internal::FlagRegistrar<T, true>(&flag)

Definition at line 215 of file flag.h.

◆ ABSL_FLAGS_INTERNAL_LOCK_FREE_EXPORT

#define ABSL_FLAGS_INTERNAL_LOCK_FREE_EXPORT (   T)    extern T GetFlag(const absl::Flag<T>& flag);

Definition at line 121 of file flag.h.

◆ ABSL_FLAGS_INTERNAL_LOCK_FREE_VALIDATE

#define ABSL_FLAGS_INTERNAL_LOCK_FREE_VALIDATE (   BIT)
Value:
static_assert( \
"Do not specify explicit template parameters to absl::GetFlag");
size_t value

◆ ABSL_RETIRED_FLAG

#define ABSL_RETIRED_FLAG (   type,
  flagname,
  default_value,
  explanation 
)
Value:
ABSL_ATTRIBUTE_UNUSED static const bool ignored_##flagname = \
([] { return type(default_value); }, \
absl::flags_internal::RetiredFlag<type>(#flagname))
#define ABSL_ATTRIBUTE_UNUSED
Definition: attributes.h:549

Definition at line 276 of file flag.h.



abseil_cpp
Author(s):
autogenerated on Mon Feb 28 2022 21:31:22