CLI11 2.6.1
 
Loading...
Searching...
No Matches
ExtraValidators.hpp File Reference
#include "Error.hpp"
#include "Macros.hpp"
#include "StringTools.hpp"
#include "Validators.hpp"
#include <cmath>
#include <cstdint>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "impl/ExtraValidators_inl.hpp"

Go to the source code of this file.

Classes

class  CLI::detail::IPV4Validator
 Validate the given string is a legal ipv4 address. More...
 
class  CLI::TypeValidator< DesiredType >
 Validate the input as a particular type. More...
 
class  CLI::Bound
 Produce a bounded range (factory). Min and max are inclusive. More...
 
struct  CLI::detail::has_find< C, V >
 
class  CLI::IsMember
 Verify items are in a set. More...
 
class  CLI::Transformer
 Translate named items to other or a value set. More...
 
class  CLI::CheckedTransformer
 translate named items to other or a value set More...
 
class  CLI::AsNumberWithUnit
 
class  CLI::AsSizeValue
 

Namespaces

namespace  CLI
 
namespace  CLI::detail
 

Typedefs

template<typename T>
using CLI::TransformPairs = std::vector<std::pair<std::string, T>>
 definition of the default transformation object
 

Functions

template<typename T, enable_if_t< is_copyable_ptr< typename std::remove_reference< T >::type >::value, detail::enabler > = detail::dummy>
auto CLI::detail::smart_deref (T value) -> decltype(*value)
 
template<typename T, enable_if_t<!is_copyable_ptr< typename std::remove_reference< T >::type >::value, detail::enabler > = detail::dummy>
std::remove_reference< T >::type & CLI::detail::smart_deref (T &value)
 
template<typename T>
std::string CLI::detail::generate_set (const T &set)
 Generate a string representation of a set.
 
template<typename T>
std::string CLI::detail::generate_map (const T &map, bool key_only=false)
 Generate a string representation of a map.
 
template<typename T, typename V, enable_if_t<!has_find< T, V >::value, detail::enabler > = detail::dummy>
auto CLI::detail::search (const T &set, const V &val) -> std::pair< bool, decltype(std::begin(detail::smart_deref(set)))>
 A search function.
 
template<typename T, typename V>
auto CLI::detail::search (const T &set, const V &val, const std::function< V(V)> &filter_function) -> std::pair< bool, decltype(std::begin(detail::smart_deref(set)))>
 A search function with a filter function.
 
std::string CLI::ignore_case (std::string item)
 Helper function to allow ignore_case to be passed to IsMember or Transform.
 
std::string CLI::ignore_underscore (std::string item)
 Helper function to allow ignore_underscore to be passed to IsMember or Transform.
 
std::string CLI::ignore_space (std::string item)
 Helper function to allow checks to ignore spaces to be passed to IsMember or Transform.
 
AsNumberWithUnit::Options CLI::operator| (const AsNumberWithUnit::Options &a, const AsNumberWithUnit::Options &b)
 

Variables

const TypeValidator< double > CLI::Number ("NUMBER")
 Check for a number.
 
const detail::IPV4Validator CLI::ValidIPV4
 Check for an IP4 address.