Loading...
Searching...
No Matches
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"`

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

namespace | CLI
namespace | CLI::detail

## Enumerations

enum class | CLI::detail::path_type : std::uint8_t { CLI::detail::nonexistent , CLI::detail::file , CLI::detail::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
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.
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.
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.
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.
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.
const detail::ExistingFileValidator | CLI::ExistingFile
| Check for existing file (returns error message if check fails).
const detail::ExistingDirectoryValidator | CLI::ExistingDirectory
| Check for an existing directory (returns error message if check fails).
const detail::ExistingPathValidator | CLI::ExistingPath
| Check for an existing path.
const detail::NonexistentPathValidator | CLI::NonexistentPath
| Check for an non-existing path.
const detail::EscapedStringTransformer | CLI::EscapedString
| convert escaped characters into their associated values
const Range | CLI::NonNegativeNumber ((std::numeric_limits< double >::max)(), "NONNEGATIVE")
| Check for a non negative number.
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.