24#ifndef TCLAP_CMD_LINE_OUTPUT_H
25#define TCLAP_CMD_LINE_OUTPUT_H
80 return std::ranges::any_of(argSets, [arg](
const ArgGroup *group) {
81 return std::ranges::find(*group, arg) != group->
end();
86 const std::list<ArgGroup *> &argSets) {
87 std::erase_if(argList, [&argSets](
const Arg *arg) {
92inline std::string
removeSuffix(std::string s,
const std::string &suffix) {
93 std::ptrdiff_t start = s.length() - suffix.length();
94 if (start >= 0 && s.substr(start) == suffix) {
95 return s.substr(0, start);
103 if (p != std::string::npos) {
A simple class that defines and argument exception.
ArgGroup is the base class for implementing groups of arguments that are mutually exclusive (it repla...
A virtual base class that defines the essential data for all arguments.
The base class that manages the command line definition and passes along the parsing to the appropria...
The interface that any output object must implement.
virtual ~CmdLineOutput()=default
Virtual destructor.
virtual void usage(CmdLineInterface &c)=0
Generates some sort of output for the USAGE.
virtual void failure(CmdLineInterface &c, ArgException &e)=0
Generates some sort of output for a failure.
virtual void version(CmdLineInterface &c)=0
Generates some sort of output for the version.
bool isInArgGroup(const Arg *arg, const std::list< ArgGroup * > &argSets)
void removeArgsInArgGroups(std::list< Arg * > &argList, const std::list< ArgGroup * > &argSets)
const char PATH_SEPARATOR
std::string basename(std::string s)
std::string removeSuffix(std::string s, const std::string &suffix)