Scarab  v3.4.1
Project 8 C++ Utility Library
Public Types | Public Member Functions | List of all members
IsMember Class Reference

Verify items are in a set. More...

#include <CLI11.hpp>

Inheritance diagram for IsMember:
Inheritance graph

Public Types

using filter_fn_t = std::function< std::string(std::string)>
 

Public Member Functions

template<typename T , typename... Args>
 IsMember (std::initializer_list< T > values, Args &&... args)
 This allows in-place construction using an initializer list. More...
 
template<typename T >
 IsMember (T &&set)
 This checks to see if an item is in a set (empty function) More...
 
template<typename T , typename F >
 IsMember (T set, F filter_function)
 
template<typename T , typename... Args>
 IsMember (T &&set, filter_fn_t filter_fn_1, filter_fn_t filter_fn_2, Args &&... other)
 You can pass in as many filter functions as you like, they nest (string only currently) More...
 
- Public Member Functions inherited from Validator
 Validator ()=default
 
 Validator (std::string validator_desc)
 Construct a Validator with just the description string. More...
 
 Validator (std::function< std::string(std::string &)> op, std::string validator_desc, std::string validator_name="")
 
Validatoroperation (std::function< std::string(std::string &)> op)
 Set the Validator operation function. More...
 
std::string operator() (std::string &str) const
 
std::string operator() (const std::string &str) const
 
Validatordescription (std::string validator_desc)
 Specify the type string. More...
 
std::string get_description () const
 Generate type description information for the Validator. More...
 
Validatorname (std::string validator_name)
 Specify the type string. More...
 
const std::string & get_name () const
 Get the name of the Validator. More...
 
Validatoractive (bool active_val=true)
 Specify whether the Validator is active or not. More...
 
Validatornon_modifying (bool no_modify=true)
 Specify whether the Validator can be modifying or not. More...
 
bool get_active () const
 Get a boolean if the validator is active. More...
 
bool get_modifying () const
 Get a boolean if the validator is allowed to modify the input returns true if it can modify the input. More...
 
Validator operator & (const Validator &other) const
 
Validator operator| (const Validator &other) const
 
Validator operator! () const
 Create a validator that fails when a given validator succeeds. More...
 

Additional Inherited Members

- Protected Attributes inherited from Validator
std::function< std::string()> desc_function_ {[]() { return std::string{}; }}
 This is the description function, if empty the description_ will be used. More...
 
std::function< std::string(std::string &)> func_ {[](std::string &) { return std::string{}; }}
 
std::string name_
 The name for search purposes of the Validator. More...
 
bool active_ {true}
 Enable for Validator to allow it to be disabled if need be. More...
 
bool non_modifying_ {false}
 specify that a validator should not modify the input More...
 

Detailed Description

Verify items are in a set.

Definition at line 2055 of file CLI11.hpp.

Member Typedef Documentation

◆ filter_fn_t

using filter_fn_t = std::function<std::string(std::string)>

Definition at line 2057 of file CLI11.hpp.

Constructor & Destructor Documentation

◆ IsMember() [1/4]

IsMember ( std::initializer_list< T >  values,
Args &&...  args 
)
inlineexplicit

This allows in-place construction using an initializer list.

Definition at line 2061 of file CLI11.hpp.

◆ IsMember() [2/4]

IsMember ( T &&  set)
inlineexplicit

This checks to see if an item is in a set (empty function)

Definition at line 2065 of file CLI11.hpp.

◆ IsMember() [3/4]

IsMember ( set,
filter_function 
)
inlineexplicit

This checks to see if an item is in a set: pointer or copy version. You can pass in a function that will filter both sides of the comparison before computing the comparison.

Definition at line 2069 of file CLI11.hpp.

◆ IsMember() [4/4]

IsMember ( T &&  set,
filter_fn_t  filter_fn_1,
filter_fn_t  filter_fn_2,
Args &&...  other 
)
inline

You can pass in as many filter functions as you like, they nest (string only currently)

Definition at line 2115 of file CLI11.hpp.


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