CLI11  2.6.2
Classes | Namespaces | Enumerations | Functions
Validators.hpp File Reference
#include "Error.hpp"
#include "Macros.hpp"
#include "StringTools.hpp"
#include "TypeTools.hpp"
#include <cmath>
#include <cstdint>
#include <functional>
#include <iostream>
#include <limits>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include <sys/stat.h>
#include <sys/types.h>
#include "impl/Validators_inl.hpp"
Include dependency graph for Validators.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CLI::Validator
 Some validators that are provided. More...
 
class  CLI::detail::ExistingFileValidator
 Check for an existing file (returns error message if check fails) More...
 
class  CLI::detail::ExistingDirectoryValidator
 Check for an existing directory (returns error message if check fails) More...
 
class  CLI::detail::ExistingPathValidator
 Check for an existing path. More...
 
class  CLI::detail::NonexistentPathValidator
 Check for an non-existing path. More...
 
class  CLI::detail::EscapedStringTransformer
 
class  CLI::FileOnDefaultPath
 
class  CLI::Range
 Produce a range (factory). Min and max are inclusive. More...
 

Namespaces

 CLI
 
 CLI::detail
 

Enumerations

enum  CLI::detail::path_type : std::uint8_t { CLI::detail::path_type::nonexistent, CLI::detail::path_type::file, CLI::detail::path_type::directory }
 CLI enumeration of different file types. More...
 

Functions

CLI11_INLINE path_type CLI::detail::check_path (const char *file) noexcept
 get the type of the path from a file name More...
 
template<typename T >
std::enable_if< std::is_signed< T >::value, T >::type CLI::detail::overflowCheck (const T &a, const T &b)
 Do a check for overflow on signed numbers. More...
 
template<typename T >
std::enable_if<!std::is_signed< T >::value, T >::type CLI::detail::overflowCheck (const T &a, const T &b)
 Do a check for overflow on unsigned numbers. More...
 
template<typename T >
std::enable_if< std::is_integral< T >::value, bool >::type CLI::detail::checked_multiply (T &a, T b)
 Performs a *= b; if it doesn't cause integer overflow. Returns false otherwise. More...
 
template<typename T >
std::enable_if< std::is_floating_point< T >::value, bool >::type CLI::detail::checked_multiply (T &a, T b)
 Performs a *= b; if it doesn't equal infinity. Returns false otherwise. More...
 
CLI11_INLINE std::pair< std::string, std::string > CLI::detail::split_program_name (std::string commandline)
 
using CLI::CustomValidator = Validator
 Alias for Validator for custom Validator for clarity. More...
 
CLI11_MODULE_INLINE const detail::ExistingFileValidator CLI::ExistingFile
 Check for existing file (returns error message if check fails) More...
 
CLI11_MODULE_INLINE const detail::ExistingDirectoryValidator CLI::ExistingDirectory
 Check for an existing directory (returns error message if check fails) More...
 
CLI11_MODULE_INLINE const detail::ExistingPathValidator CLI::ExistingPath
 Check for an existing path. More...
 
CLI11_MODULE_INLINE const detail::NonexistentPathValidator CLI::NonexistentPath
 Check for an non-existing path. More...
 
CLI11_MODULE_INLINE const detail::EscapedStringTransformer CLI::EscapedString
 convert escaped characters into their associated values More...
 
CLI11_MODULE_INLINE const Range CLI::NonNegativeNumber ((std::numeric_limits< double >::max)(),"NONNEGATIVE")
 Check for a non negative number. More...
 
CLI11_MODULE_INLINE const Range CLI::PositiveNumber ((std::numeric_limits< double >::min)(),(std::numeric_limits< double >::max)(),"POSITIVE")
 Check for a positive valued number (val>0.0), <double>::min here is the smallest positive number. More...