CPP-AP 2.2.6
Command-line argument parser for C++20
Loading...
Searching...
No Matches
ap::detail::argument_token Struct Reference

Structure representing a single command-line argument token. More...

#include <argument_token.hpp>

Public Types

enum class  token_type : bool { t_flag , t_value }
 The token type discriminator. More...
 

Public Member Functions

 argument_token (const argument_token &)=default
 
 argument_token (argument_token &&)=default
 
argument_tokenoperator= (const argument_token &)=default
 
argument_tokenoperator= (argument_token &&)=default
 
 argument_token (const token_type type, const std::string &value)
 Constructor of a command-line argument.
 
bool operator== (const argument_token &other) const noexcept
 Equality operator for comparing argument_token instances.
 

Public Attributes

token_type type
 
std::string value
 

Detailed Description

Structure representing a single command-line argument token.

Definition at line 14 of file argument_token.hpp.

Member Enumeration Documentation

◆ token_type

enum class ap::detail::argument_token::token_type : bool
strong

The token type discriminator.

Definition at line 16 of file argument_token.hpp.

Constructor & Destructor Documentation

◆ argument_token()

ap::detail::argument_token::argument_token ( const token_type  type,
const std::string &  value 
)
inline

Constructor of a command-line argument.

Parameters
typeType type of the token (flag or value).
valueThe value of the argument.

Definition at line 32 of file argument_token.hpp.

Member Function Documentation

◆ operator==()

bool ap::detail::argument_token::operator== ( const argument_token other) const
inlinenoexcept

Equality operator for comparing argument_token instances.

Parameters
otherAn argument_token instance to compare with.
Returns
Boolean statement of equality comparison.

Definition at line 41 of file argument_token.hpp.

Member Data Documentation

◆ type

token_type ap::detail::argument_token::type

Definition at line 45 of file argument_token.hpp.

◆ value

std::string ap::detail::argument_token::value

Definition at line 46 of file argument_token.hpp.


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