Go to the source code of this file.
◆ DEFINE_BOOL_OPTION
#define DEFINE_BOOL_OPTION |
( |
|
name, |
|
|
|
variable |
|
) |
| |
Value: class OptionProcessor_##
name :
public OptionProcessor { \
public: \
virtual bool Process(const char* option, CommandLineOptions* vm_options) { \
const
char*
value = OptionProcessor::ProcessOption(option,
"--" #
name); \
if (
value ==
nullptr) { \
return false; \
} \
Syslog::PrintErr(
"Non-empty value for option " #
name "\n"); \
return false; \
} \
return false; \
} \
variable = true; \
return true; \
} \
}; \
static OptionProcessor_##
name option_##
name;
DEF_SWITCHES_START aot vmservice shared library name
Definition at line 123 of file options.h.
◆ DEFINE_BOOL_OPTION_CB
Value: class OptionProcessor_##
name :
public OptionProcessor { \
public: \
virtual bool Process(const char* option, CommandLineOptions* vm_options) { \
const
char*
value = OptionProcessor::ProcessOption(option,
"--" #
name); \
if (
value ==
nullptr) { \
return false; \
} \
Syslog::PrintErr(
"Non-empty value for option " #
name "\n"); \
return false; \
} \
return false; \
} \
callback(vm_options); \
return true; \
} \
}; \
static OptionProcessor_##
name option_##
name;
Definition at line 102 of file options.h.
◆ DEFINE_BOOL_OPTION_SHORT
#define DEFINE_BOOL_OPTION_SHORT |
( |
|
short_name, |
|
|
|
long_name, |
|
|
|
variable |
|
) |
| |
Value: class OptionProcessor_##long_name : public OptionProcessor { \
public: \
virtual bool Process(const char* option, CommandLineOptions* vm_options) { \
OptionProcessor::ProcessOption(option, "-" #short_name); \
if (
value ==
nullptr) { \
value = OptionProcessor::ProcessOption(option, "--" #long_name); \
} \
if (
value ==
nullptr) { \
return false; \
} \
Syslog::PrintErr("Non-empty value for option " #long_name "\n"); \
return false; \
} \
return false; \
} \
variable = true; \
return true; \
} \
}; \
static OptionProcessor_##long_name option_##long_name;
Definition at line 144 of file options.h.
◆ DEFINE_CB_OPTION
◆ DEFINE_ENUM_OPTION
#define DEFINE_ENUM_OPTION |
( |
|
name, |
|
|
|
enum_name, |
|
|
|
variable |
|
) |
| |
Value:
const
char*
const* kNames = k##
enum_name##Names; \
for (intptr_t
i = 0; kNames[
i] !=
nullptr;
i++) { \
if (strcmp(
value, kNames[
i]) == 0) { \
return true; \
} \
} \
Syslog::PrintErr( \
"Unrecognized value for " #
name ": '%s'\nValid values are: ",
value); \
for (intptr_t
i = 0; kNames[
i] !=
nullptr;
i++) { \
Syslog::PrintErr(
"%s%s",
i > 0 ?
", " :
"", kNames[
i]); \
} \
Syslog::PrintErr("\n"); \
})
const char *const enum_name
#define DEFINE_STRING_OPTION_CB(name, callback)
Definition at line 85 of file options.h.
◆ DEFINE_STRING_OPTION
◆ DEFINE_STRING_OPTION_CB
Value: class OptionProcessor_##
name :
public OptionProcessor { \
public: \
virtual bool Process(const char* option, CommandLineOptions* vm_options) { \
OptionProcessor::ProcessOption(option,
"--" #
name "="); \
if (
value ==
nullptr) { \
return false; \
} \
Syslog::PrintErr(
"Empty value for option " #
name "\n"); \
return false; \
} \
callback; \
return true; \
} \
}; \
static OptionProcessor_##
name option_##
name;
Definition at line 63 of file options.h.