C++ Utilities  4.9.1
Common C++ classes and routines used by my applications such as argument parser, IO and conversion utilities
Public Member Functions | Public Attributes | List of all members
ApplicationUtilities::ArgumentOccurrence Struct Reference

The ArgumentOccurrence struct holds argument values for an occurrence of an argument. More...

#include <argumentparser.h>

Collaboration diagram for ApplicationUtilities::ArgumentOccurrence:
[legend]

Public Member Functions

 ArgumentOccurrence (std::size_t index)
 Constructs an argument occurrence for the specified index. More...
 
 ArgumentOccurrence (std::size_t index, const std::vector< Argument *> parentPath, Argument *parent)
 Constructs an argument occurrence. More...
 

Public Attributes

std::size_t index
 The index of the occurrence. More...
 
std::vector< const char * > values
 The parameter values which have been specified after the occurrence of the argument. More...
 
std::vector< Argument * > path
 The "path" of the occurrence (the parent elements which have been specified before). More...
 

Detailed Description

The ArgumentOccurrence struct holds argument values for an occurrence of an argument.

Definition at line 97 of file argumentparser.h.

Constructor & Destructor Documentation

◆ ArgumentOccurrence() [1/2]

ApplicationUtilities::ArgumentOccurrence::ArgumentOccurrence ( std::size_t  index)
inline

Constructs an argument occurrence for the specified index.

Definition at line 121 of file argumentparser.h.

◆ ArgumentOccurrence() [2/2]

ApplicationUtilities::ArgumentOccurrence::ArgumentOccurrence ( std::size_t  index,
const std::vector< Argument *>  parentPath,
Argument parent 
)
inline

Constructs an argument occurrence.

Parameters
indexSpecifies the index.
parentPathSpecifies the path of parent.
parentSpecifies the parent which might be nullptr for top-level occurrences.

The path of the new occurrence is built from the specified parentPath and parent.

Definition at line 134 of file argumentparser.h.

Member Data Documentation

◆ index

std::size_t ApplicationUtilities::ArgumentOccurrence::index

The index of the occurrence.

This is not necessarily the index in the argv array.

Definition at line 104 of file argumentparser.h.

◆ path

std::vector<Argument *> ApplicationUtilities::ArgumentOccurrence::path

The "path" of the occurrence (the parent elements which have been specified before).

Remarks
Empty for top-level occurrences.

Definition at line 115 of file argumentparser.h.

◆ values

std::vector<const char *> ApplicationUtilities::ArgumentOccurrence::values

The parameter values which have been specified after the occurrence of the argument.

Definition at line 109 of file argumentparser.h.


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