ZXFoundation™ 26h2
Loading...
Searching...
No Matches
zxfoundation.base.cmdline.core Module Reference

Data Structures

struct  zxfoundation::base::cmdline::param
 Descriptor for a single cmdline parameter. More...

Enumerations

enum class  value_type : u8 {
  flag , str , u64 , boolean ,
  callback
}
 How a parameter's value is interpreted.

Typedefs

using zxfoundation::base::cmdline::handler_fn = auto (*)(std::string_view value) noexcept -> bool
 Signature for value_type::callback handlers.

Functions

auto zxfoundation::base::cmdline::add (const param &p) noexcept -> bool
 Register a cmdline parameter.
auto zxfoundation::base::cmdline::find (std::string_view name) noexcept -> param *
 Look up a registered parameter by name.
auto zxfoundation::base::cmdline::parse (std::string_view cmdline) noexcept -> void
 Parse a complete command line against registered parameters.

Variables

handler_fn handler {nullptr}
 null = use default dispatch for type.
std::string_view help {}
 Human-readable description.
constexpr usize zxfoundation::base::cmdline::MAX_PARAMS = 64
std::string_view name {}
void * storage {nullptr}
 Pointer to the target variable.
usize storage_size {0}
 For str: capacity in bytes.
value_type type

Files

file  zxfoundation/base/cmdline.zcomponent/core.cxxm
file  zxfoundation/base/cmdline.zcomponent/core.cxx