webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Classes | Namespaces | Macros | Enumerations | Functions | Variables
gflags.cc File Reference
#include "config.h"
#include "gflags.h"
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <map>
#include <string>
#include <utility>
#include <vector>
#include "mutex.h"
#include "util.h"

Classes

struct  GFLAGS_NAMESPACE::FilenameFlagnameCmp
 
class  GFLAGS_NAMESPACE::FlagSaverImpl
 

Namespaces

 GFLAGS_NAMESPACE
 

Macros

#define VALUE_AS(type)   *reinterpret_cast<type*>(value_buffer_)
 
#define OTHER_VALUE_AS(fv, type)   *reinterpret_cast<type*>(fv.value_buffer_)
 
#define SET_VALUE_AS(type, value)   VALUE_AS(type) = (value)
 
#define PFATAL(s)   do { perror(s); gflags_exitfunc(1); } while (0)
 

Enumerations

enum  GFLAGS_NAMESPACE::@16212::DieWhenReporting
 

Functions

 DEFINE_string (flagfile, "", "load flags from file")
 
 DEFINE_string (fromenv, "", "set flags from the environment" " [use 'export FLAGS_flag1=value']")
 
 DEFINE_string (tryfromenv, "", "set flags from the environment if present")
 
 DEFINE_string (undefok, "", "comma-separated list of flag names that it is okay to specify " "on the command line even if the program does not define a flag " "with that name. IMPORTANT: flags in this list that have " "arguments MUST use the flag=value format")
 
void GFLAGS_NAMESPACE::GetAllFlags (vector< CommandLineFlagInfo > *OUTPUT)
 
GFLAGS_DLL_DECL void GFLAGS_NAMESPACE::SetArgv (int argc, const char **argv)
 
GFLAGS_DLL_DECL const std::vector< std::string > & GFLAGS_NAMESPACE::GetArgvs ()
 
GFLAGS_DLL_DECL const char * GFLAGS_NAMESPACE::GetArgv ()
 
GFLAGS_DLL_DECL const char * GFLAGS_NAMESPACE::GetArgv0 ()
 
GFLAGS_DLL_DECL uint32 GFLAGS_NAMESPACE::GetArgvSum ()
 
GFLAGS_DLL_DECL const char * GFLAGS_NAMESPACE::ProgramInvocationName ()
 
GFLAGS_DLL_DECL const char * GFLAGS_NAMESPACE::ProgramInvocationShortName ()
 
void GFLAGS_NAMESPACE::SetUsageMessage (const string &usage)
 
GFLAGS_DLL_DECL const char * GFLAGS_NAMESPACE::ProgramUsage ()
 
void GFLAGS_NAMESPACE::SetVersionString (const string &version)
 
GFLAGS_DLL_DECL const char * GFLAGS_NAMESPACE::VersionString ()
 
bool GFLAGS_NAMESPACE::GetCommandLineOption (const char *name, string *value)
 
GFLAGS_DLL_DECL bool GFLAGS_NAMESPACE::GetCommandLineFlagInfo (const char *name, CommandLineFlagInfo *OUTPUT)
 
GFLAGS_DLL_DECL CommandLineFlagInfo GFLAGS_NAMESPACE::GetCommandLineFlagInfoOrDie (const char *name)
 
GFLAGS_DLL_DECL std::string GFLAGS_NAMESPACE::SetCommandLineOptionWithMode (const char *name, const char *value, FlagSettingMode set_mode)
 
GFLAGS_DLL_DECL std::string GFLAGS_NAMESPACE::SetCommandLineOption (const char *name, const char *value)
 
GFLAGS_DLL_DECL std::string GFLAGS_NAMESPACE::CommandlineFlagsIntoString ()
 
bool GFLAGS_NAMESPACE::ReadFlagsFromString (const string &flagfilecontents, const char *, bool errors_are_fatal)
 
bool GFLAGS_NAMESPACE::AppendFlagsIntoFile (const string &filename, const char *prog_name)
 
bool GFLAGS_NAMESPACE::ReadFromFlagsFile (const string &filename, const char *prog_name, bool errors_are_fatal)
 
GFLAGS_DLL_DECL bool GFLAGS_NAMESPACE::BoolFromEnv (const char *varname, bool defval)
 
GFLAGS_DLL_DECL int32 GFLAGS_NAMESPACE::Int32FromEnv (const char *varname, int32 defval)
 
GFLAGS_DLL_DECL int64 GFLAGS_NAMESPACE::Int64FromEnv (const char *varname, int64 defval)
 
GFLAGS_DLL_DECL uint64 GFLAGS_NAMESPACE::Uint64FromEnv (const char *varname, uint64 defval)
 
GFLAGS_DLL_DECL double GFLAGS_NAMESPACE::DoubleFromEnv (const char *varname, double defval)
 
GFLAGS_DLL_DECL const char * GFLAGS_NAMESPACE::StringFromEnv (const char *varname, const char *defval)
 
GFLAGS_DLL_DECL bool GFLAGS_NAMESPACE::RegisterFlagValidator (const bool *flag, bool(*validate_fn)(const char *, bool))
 
GFLAGS_DLL_DECL bool GFLAGS_NAMESPACE::RegisterFlagValidator (const int32 *flag, bool(*validate_fn)(const char *, int32))
 
GFLAGS_DLL_DECL bool GFLAGS_NAMESPACE::RegisterFlagValidator (const int64 *flag, bool(*validate_fn)(const char *, int64))
 
GFLAGS_DLL_DECL bool GFLAGS_NAMESPACE::RegisterFlagValidator (const uint64 *flag, bool(*validate_fn)(const char *, uint64))
 
GFLAGS_DLL_DECL bool GFLAGS_NAMESPACE::RegisterFlagValidator (const double *flag, bool(*validate_fn)(const char *, double))
 
bool GFLAGS_NAMESPACE::RegisterFlagValidator (const string *flag, bool(*validate_fn)(const char *, const string &))
 
GFLAGS_DLL_DECL uint32 GFLAGS_NAMESPACE::ParseCommandLineFlags (int *argc, char ***argv, bool remove_flags)
 
GFLAGS_DLL_DECL uint32 GFLAGS_NAMESPACE::ParseCommandLineNonHelpFlags (int *argc, char ***argv, bool remove_flags)
 
GFLAGS_DLL_DECL void GFLAGS_NAMESPACE::AllowCommandLineReparsing ()
 
GFLAGS_DLL_DECL void GFLAGS_NAMESPACE::ReparseCommandLineNonHelpFlags ()
 
GFLAGS_DLL_DECL void GFLAGS_NAMESPACE::ShutDownCommandLineFlags ()
 

Variables

void GFLAGS_DLL_DECL(* GFLAGS_NAMESPACE::gflags_exitfunc )(int) = &exit
 

Macro Definition Documentation

◆ OTHER_VALUE_AS

#define OTHER_VALUE_AS (   fv,
  type 
)    *reinterpret_cast<type*>(fv.value_buffer_)

◆ PFATAL

#define PFATAL (   s)    do { perror(s); gflags_exitfunc(1); } while (0)

◆ SET_VALUE_AS

#define SET_VALUE_AS (   type,
  value 
)    VALUE_AS(type) = (value)

◆ VALUE_AS

#define VALUE_AS (   type)    *reinterpret_cast<type*>(value_buffer_)

Enumeration Type Documentation

◆ DieWhenReporting

enum GFLAGS_NAMESPACE::@16212::DieWhenReporting

Function Documentation

◆ DEFINE_string() [1/4]

DEFINE_string ( flagfile  ,
""  ,
"load flags from file  
)

◆ DEFINE_string() [2/4]

DEFINE_string ( fromenv  ,
""  ,
"set flags from the environment" " "  [use 'export FLAGS_flag1=value'] 
)

◆ DEFINE_string() [3/4]

DEFINE_string ( tryfromenv  ,
""  ,
"set flags from the environment if present"   
)

◆ DEFINE_string() [4/4]

DEFINE_string ( undefok  ,
""   
)