Go to the documentation of this file. 21 #if !FOLLY_HAVE_LIBGFLAGS 27 #define DECLARE_VARIABLE() \ 28 static_assert(false, "You shouldn't be using GFlags internals."); 30 #define FOLLY_DECLARE_FLAG(_type, _shortType, _name) \ 31 namespace fL##_shortType { \ 32 extern _type FLAGS_##_name; \ 34 using fL##_shortType::FLAGS_##_name 36 #define DECLARE_bool(_name) FOLLY_DECLARE_FLAG(bool, B, _name) 37 #define DECLARE_double(_name) FOLLY_DECLARE_FLAG(double, D, _name) 38 #define DECLARE_int32(_name) FOLLY_DECLARE_FLAG(int, I, _name) 39 #define DECLARE_int64(_name) FOLLY_DECLARE_FLAG(long long, I64, _name) 40 #define DECLARE_uint32(_name) FOLLY_DECLARE_FLAG(unsigned long, U32, _name) 41 #define DECLARE_uint64(_name) FOLLY_DECLARE_FLAG(unsigned long long, U64, _name) 42 #define DECLARE_string(_name) FOLLY_DECLARE_FLAG(std::string, S, _name) 44 #define FOLLY_DEFINE_FLAG(_type, _shortType, _name, _default) \ 45 namespace fL##_shortType { \ 46 _type FLAGS_##_name = _default; \ 48 using fL##_shortType::FLAGS_##_name 50 #define DEFINE_bool(_name, _default, _description) \ 51 FOLLY_DEFINE_FLAG(bool, B, _name, _default) 52 #define DEFINE_double(_name, _default, _description) \ 53 FOLLY_DEFINE_FLAG(double, D, _name, _default) 54 #define DEFINE_int32(_name, _default, _description) \ 55 FOLLY_DEFINE_FLAG(int, I, _name, _default) 56 #define DEFINE_int64(_name, _default, _description) \ 57 FOLLY_DEFINE_FLAG(long long, I64, _name, _default) 58 #define DEFINE_uint32(_name, _default, _description) \ 59 FOLLY_DEFINE_FLAG(unsigned long, U32, _name, _default) 60 #define DEFINE_uint64(_name, _default, _description) \ 61 FOLLY_DEFINE_FLAG(unsigned long long, U64, _name, _default) 62 #define DEFINE_string(_name, _default, _description) \ 63 FOLLY_DEFINE_FLAG(std::string, S, _name, _default) 70 #include <gflags/gflags.h>