pure-cpp 1.0.0
A C++ physics simulation benchmark comparing performance with Python implementations
CmdLine::OptionDefinition Struct Reference

A struct to hold the definition of a single command-line option. More...

#include <cmd_line_parser.hpp>

Collaboration diagram for CmdLine::OptionDefinition:
Collaboration graph

Public Attributes

std::string flags
 The flags for the option (e.g., "help,h"). More...
 
std::string help_text
 The help text for the option. More...
 
std::function< po::value_semantic *()> value_factory
 A function that returns the Boost.Program_Options value semantic. This allows us to handle different types (int, double, bool_switch) in a uniform way. More...
 

Detailed Description

A struct to hold the definition of a single command-line option.

This data-driven approach makes adding or modifying arguments much cleaner than a long chain of add_options() calls.

Definition at line 157 of file cmd_line_parser.hpp.

Member Data Documentation

◆ flags

std::string CmdLine::OptionDefinition::flags

The flags for the option (e.g., "help,h").

Definition at line 159 of file cmd_line_parser.hpp.

◆ help_text

std::string CmdLine::OptionDefinition::help_text

The help text for the option.

Definition at line 161 of file cmd_line_parser.hpp.

◆ value_factory

std::function<po::value_semantic*()> CmdLine::OptionDefinition::value_factory

A function that returns the Boost.Program_Options value semantic. This allows us to handle different types (int, double, bool_switch) in a uniform way.

Definition at line 167 of file cmd_line_parser.hpp.


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