MXVK Vulkan Framework 0.24.0
C++20 Vulkan rendering framework for practical 2D and 3D application development with SDL3.
Loading...
Searching...
No Matches
Argument< String > Struct Template Reference

Describes a single parsed argument entry returned by Argz::proc(). More...

#include <mxvk/include/mxvk/argz.hpp>

Public Member Functions

 Argument ()
 Argument (const Argument &a)
auto operator<=> (const Argument< String > &a) const
Argumentoperator= (const Argument< String > &a)
bool operator== (const Argument< String > &a) const
 ~Argument ()=default

Public Attributes

int arg_letter
 Short option code (e.g. 'o') or unique integer for long-only options.
String arg_name
 Long option name (e.g. "output").
ArgType arg_type
 Which ArgType variant this argument represents.
String arg_value
 Value string supplied after the option, if any.
String desc
 Human-readable description used in help output.

Detailed Description

template<StringType String>
struct Argument< String >

Describes a single parsed argument entry returned by Argz::proc().

Template Parameters
StringString type satisfying StringType.

After a successful call to Argz::proc() the member arg_letter holds the matched code (or '-' for bare positional arguments) and arg_value holds any associated value string.

Definition at line 120 of file argz.hpp.

Constructor & Destructor Documentation

◆ ~Argument()

template<StringType String>
Argument< String >::~Argument ( )
default

◆ Argument() [1/2]

template<StringType String>
Argument< String >::Argument ( )
inline

Definition at line 127 of file argz.hpp.

127: arg_name{}, arg_letter{}, arg_value{}, arg_type{}, desc{} {}
int arg_letter
Short option code (e.g. 'o') or unique integer for long-only options.
Definition argz.hpp:122
ArgType arg_type
Which ArgType variant this argument represents.
Definition argz.hpp:124
String arg_name
Long option name (e.g. "output").
Definition argz.hpp:121
String arg_value
Value string supplied after the option, if any.
Definition argz.hpp:123
String desc
Human-readable description used in help output.
Definition argz.hpp:125

◆ Argument() [2/2]

template<StringType String>
Argument< String >::Argument ( const Argument< String > & a)
inline

Definition at line 128 of file argz.hpp.

Describes a single parsed argument entry returned by Argz::proc().
Definition argz.hpp:120

Member Function Documentation

◆ operator<=>()

template<StringType String>
auto Argument< String >::operator<=> ( const Argument< String > & a) const
inline

Definition at line 137 of file argz.hpp.

137=>(const Argument<String> &a) const { return (arg_letter <=> a.arg_letter); }
Argument()
Definition argz.hpp:127

◆ operator=()

template<StringType String>
Argument & Argument< String >::operator= ( const Argument< String > & a)
inline

Definition at line 129 of file argz.hpp.

129 {
134 desc = a.desc;
135 return *this;
136 }

◆ operator==()

template<StringType String>
bool Argument< String >::operator== ( const Argument< String > & a) const
inline

Definition at line 138 of file argz.hpp.

138{ return arg_letter == a.arg_letter; }

Member Data Documentation

◆ arg_letter

template<StringType String>
int Argument< String >::arg_letter

Short option code (e.g. 'o') or unique integer for long-only options.

Definition at line 122 of file argz.hpp.

◆ arg_name

template<StringType String>
String Argument< String >::arg_name

Long option name (e.g. "output").

Definition at line 121 of file argz.hpp.

◆ arg_type

template<StringType String>
ArgType Argument< String >::arg_type

Which ArgType variant this argument represents.

Definition at line 124 of file argz.hpp.

◆ arg_value

template<StringType String>
String Argument< String >::arg_value

Value string supplied after the option, if any.

Definition at line 123 of file argz.hpp.

◆ desc

template<StringType String>
String Argument< String >::desc

Human-readable description used in help output.

Definition at line 125 of file argz.hpp.


The documentation for this struct was generated from the following file: