MXVK Vulkan Framework 0.35.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
Argument & operator= (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 113 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 120 of file argz.hpp.

120: 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:115
ArgType arg_type
Which ArgType variant this argument represents.
Definition argz.hpp:117
String arg_name
Long option name (e.g. "output").
Definition argz.hpp:114
String arg_value
Value string supplied after the option, if any.
Definition argz.hpp:116
String desc
Human-readable description used in help output.
Definition argz.hpp:118

◆ Argument() [2/2]

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

Definition at line 121 of file argz.hpp.

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

Member Function Documentation

◆ operator<=>()

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

Definition at line 130 of file argz.hpp.

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

◆ operator=()

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

Definition at line 122 of file argz.hpp.

122 {
127 desc = a.desc;
128 return *this;
129 }

◆ operator==()

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

Definition at line 131 of file argz.hpp.

131{ 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 115 of file argz.hpp.

◆ arg_name

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

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

Definition at line 114 of file argz.hpp.

◆ arg_type

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

Which ArgType variant this argument represents.

Definition at line 117 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 116 of file argz.hpp.

◆ desc

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

Human-readable description used in help output.

Definition at line 118 of file argz.hpp.


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