bmv2
Designing your own switch target with bmv2
|
Public Member Functions | |
int | parse (const std::vector< std::string > &more_options, std::ostream *errstream) override |
![]() | |
TargetParserBasic () | |
Constructor. More... | |
void | help_msg (std::ostream *outstream) const override |
See bm::TargetParserIface::help_msg. More... | |
ReturnCode | add_string_option (const std::string &name, const std::string &help_str) |
ReturnCode | add_int_option (const std::string &name, const std::string &help_str) |
ReturnCode | add_uint_option (const std::string &name, const std::string &help_str) |
ReturnCode | add_flag_option (const std::string &name, const std::string &help_str) |
ReturnCode | get_string_option (const std::string &name, std::string *v) const |
ReturnCode | get_int_option (const std::string &name, int *v) const |
ReturnCode | get_uint_option (const std::string &name, unsigned int *v) const |
ReturnCode | get_flag_option (const std::string &name, bool *v) const |
Static Private Attributes | |
static constexpr char | load_modules_option [] = "load-modules" |
Name of the option. More... | |
Additional Inherited Members | |
![]() | |
enum | ReturnCode { ReturnCode::SUCCESS = 0, ReturnCode::DUPLICATE_OPTION, ReturnCode::INVALID_OPTION_NAME, ReturnCode::OPTION_NOT_PROVIDED, ReturnCode::INVALID_OPTION_TYPE } |
Return codes for this class. More... | |
Same as TargetParserBasic but supports the '–load-modules' command-line option by default. This option is used to load shared objects dynamically at runtime. Often, these objects / modules contain new primtive action or extern definitions. If you plan on using '–load-modules' in your target, and you plan on providing primitive / extern definitions dynamically, you will need to link your executable with -rdynamic.
|
overridevirtual |
See bm::TargetParserIface::parse. Make sure all possible options have been registered using add_string_option(), add_int_option(), add_uint_option() or add_flag_option().
Reimplemented from bm::TargetParserBasic.
|
staticconstexprprivate |
Name of the option.