Showing preview only (6,484K chars total). Download the full file or copy to clipboard to get everything.
Repository: Prepouce/CoercedPotato
Branch: master
Commit: 0de12264e14c
Files: 30
Total size: 6.2 MB
Directory structure:
gitextract_qkytoi01/
├── .gitattributes
├── .gitignore
├── .gitmodules
├── CLI11.hpp
├── CoerceFunctions.cpp
├── CoerceFunctions.h
├── CoercedPotato.cpp
├── CoercedPotato.sln
├── CoercedPotato.vcxproj
├── CoercedPotato.vcxproj.filters
├── IDL_FILES/
│ ├── ms-efsr.idl
│ ├── ms-even.idl
│ ├── ms-par.idl
│ ├── ms-rprn.idl
│ └── ms-srvsvc.idl
├── README.md
├── lib/
│ ├── ms-efsr_h.h
│ ├── ms-even_h.h
│ ├── ms-par_h.h
│ ├── ms-rprn_h.h
│ └── ms-srvsvc_h.h
└── rpc_interfaces/
├── ms-efsr_c.c
├── ms-even_c.c
├── ms-even_s.c
├── ms-par_c.c
├── ms-par_s.c
├── ms-rprn_c.c
├── ms-rprn_s.c
├── ms-srvsvc_c.c
└── ms-srvsvc_s.c
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
================================================
FILE: .gitignore
================================================
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Oo]ut/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
*.tlog
*.txt
*.recipe
================================================
FILE: .gitmodules
================================================
[submodule "win32errorcodes"]
path = win32errorcodes
url = https://github.com/p0dalirius/win32errorcodes
================================================
FILE: CLI11.hpp
================================================
// CLI11: Version 2.3.2
// Originally designed by Henry Schreiner
// https://github.com/CLIUtils/CLI11
//
// This is a standalone header file generated by MakeSingleHeader.py in CLI11/scripts
// from: v2.3.2
//
// CLI11 2.3.2 Copyright (c) 2017-2022 University of Cincinnati, developed by Henry
// Schreiner under NSF AWARD 1414736. All rights reserved.
//
// Redistribution and use in source and binary forms of CLI11, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// 3. Neither the name of the copyright holder nor the names of its contributors
// may be used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#pragma once
// Standard combined includes:
#include <iomanip>
#include <set>
#include <memory>
#include <vector>
#include <utility>
#include <stdexcept>
#include <locale>
#include <functional>
#include <iostream>
#include <iterator>
#include <exception>
#include <numeric>
#include <fstream>
#include <string>
#include <type_traits>
#include <tuple>
#include <map>
#include <algorithm>
#include <cstdint>
#include <sstream>
#include <cmath>
#include <limits>
#define CLI11_VERSION_MAJOR 2
#define CLI11_VERSION_MINOR 3
#define CLI11_VERSION_PATCH 2
#define CLI11_VERSION "2.3.2"
// The following version macro is very similar to the one in pybind11
#if !(defined(_MSC_VER) && __cplusplus == 199711L) && !defined(__INTEL_COMPILER)
#if __cplusplus >= 201402L
#define CLI11_CPP14
#if __cplusplus >= 201703L
#define CLI11_CPP17
#if __cplusplus > 201703L
#define CLI11_CPP20
#endif
#endif
#endif
#elif defined(_MSC_VER) && __cplusplus == 199711L
// MSVC sets _MSVC_LANG rather than __cplusplus (supposedly until the standard is fully implemented)
// Unless you use the /Zc:__cplusplus flag on Visual Studio 2017 15.7 Preview 3 or newer
#if _MSVC_LANG >= 201402L
#define CLI11_CPP14
#if _MSVC_LANG > 201402L && _MSC_VER >= 1910
#define CLI11_CPP17
#if _MSVC_LANG > 201703L && _MSC_VER >= 1910
#define CLI11_CPP20
#endif
#endif
#endif
#endif
#if defined(CLI11_CPP14)
#define CLI11_DEPRECATED(reason) [[deprecated(reason)]]
#elif defined(_MSC_VER)
#define CLI11_DEPRECATED(reason) __declspec(deprecated(reason))
#else
#define CLI11_DEPRECATED(reason) __attribute__((deprecated(reason)))
#endif
// GCC < 10 doesn't ignore this in unevaluated contexts
#if !defined(CLI11_CPP17) || \
(defined(__GNUC__) && !defined(__llvm__) && !defined(__INTEL_COMPILER) && __GNUC__ < 10 && __GNUC__ > 4)
#define CLI11_NODISCARD
#else
#define CLI11_NODISCARD [[nodiscard]]
#endif
/** detection of rtti */
#ifndef CLI11_USE_STATIC_RTTI
#if(defined(_HAS_STATIC_RTTI) && _HAS_STATIC_RTTI)
#define CLI11_USE_STATIC_RTTI 1
#elif defined(__cpp_rtti)
#if(defined(_CPPRTTI) && _CPPRTTI == 0)
#define CLI11_USE_STATIC_RTTI 1
#else
#define CLI11_USE_STATIC_RTTI 0
#endif
#elif(defined(__GCC_RTTI) && __GXX_RTTI)
#define CLI11_USE_STATIC_RTTI 0
#else
#define CLI11_USE_STATIC_RTTI 1
#endif
#endif
/** Inline macro **/
#ifdef CLI11_COMPILE
#define CLI11_INLINE
#else
#define CLI11_INLINE inline
#endif
// C standard library
// Only needed for existence checking
#if defined CLI11_CPP17 && defined __has_include && !defined CLI11_HAS_FILESYSTEM
#if __has_include(<filesystem>)
// Filesystem cannot be used if targeting macOS < 10.15
#if defined __MAC_OS_X_VERSION_MIN_REQUIRED && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500
#define CLI11_HAS_FILESYSTEM 0
#elif defined(__wasi__)
// As of wasi-sdk-14, filesystem is not implemented
#define CLI11_HAS_FILESYSTEM 0
#else
#include <filesystem>
#if defined __cpp_lib_filesystem && __cpp_lib_filesystem >= 201703
#if defined _GLIBCXX_RELEASE && _GLIBCXX_RELEASE >= 9
#define CLI11_HAS_FILESYSTEM 1
#elif defined(__GLIBCXX__)
// if we are using gcc and Version <9 default to no filesystem
#define CLI11_HAS_FILESYSTEM 0
#else
#define CLI11_HAS_FILESYSTEM 1
#endif
#else
#define CLI11_HAS_FILESYSTEM 0
#endif
#endif
#endif
#endif
#if defined CLI11_HAS_FILESYSTEM && CLI11_HAS_FILESYSTEM > 0
#include <filesystem> // NOLINT(build/include)
#else
#include <sys/stat.h>
#include <sys/types.h>
#endif
namespace CLI {
/// Include the items in this namespace to get free conversion of enums to/from streams.
/// (This is available inside CLI as well, so CLI11 will use this without a using statement).
namespace enums {
/// output streaming for enumerations
template <typename T, typename = typename std::enable_if<std::is_enum<T>::value>::type>
std::ostream &operator<<(std::ostream &in, const T &item) {
// make sure this is out of the detail namespace otherwise it won't be found when needed
return in << static_cast<typename std::underlying_type<T>::type>(item);
}
} // namespace enums
/// Export to CLI namespace
using enums::operator<<;
namespace detail {
/// a constant defining an expected max vector size defined to be a big number that could be multiplied by 4 and not
/// produce overflow for some expected uses
constexpr int expected_max_vector_size{1 << 29};
// Based on http://stackoverflow.com/questions/236129/split-a-string-in-c
/// Split a string by a delim
CLI11_INLINE std::vector<std::string> split(const std::string &s, char delim);
/// Simple function to join a string
template <typename T> std::string join(const T &v, std::string delim = ",") {
std::ostringstream s;
auto beg = std::begin(v);
auto end = std::end(v);
if(beg != end)
s << *beg++;
while(beg != end) {
s << delim << *beg++;
}
return s.str();
}
/// Simple function to join a string from processed elements
template <typename T,
typename Callable,
typename = typename std::enable_if<!std::is_constructible<std::string, Callable>::value>::type>
std::string join(const T &v, Callable func, std::string delim = ",") {
std::ostringstream s;
auto beg = std::begin(v);
auto end = std::end(v);
auto loc = s.tellp();
while(beg != end) {
auto nloc = s.tellp();
if(nloc > loc) {
s << delim;
loc = nloc;
}
s << func(*beg++);
}
return s.str();
}
/// Join a string in reverse order
template <typename T> std::string rjoin(const T &v, std::string delim = ",") {
std::ostringstream s;
for(std::size_t start = 0; start < v.size(); start++) {
if(start > 0)
s << delim;
s << v[v.size() - start - 1];
}
return s.str();
}
// Based roughly on http://stackoverflow.com/questions/25829143/c-trim-whitespace-from-a-string
/// Trim whitespace from left of string
CLI11_INLINE std::string <rim(std::string &str);
/// Trim anything from left of string
CLI11_INLINE std::string <rim(std::string &str, const std::string &filter);
/// Trim whitespace from right of string
CLI11_INLINE std::string &rtrim(std::string &str);
/// Trim anything from right of string
CLI11_INLINE std::string &rtrim(std::string &str, const std::string &filter);
/// Trim whitespace from string
inline std::string &trim(std::string &str) { return ltrim(rtrim(str)); }
/// Trim anything from string
inline std::string &trim(std::string &str, const std::string filter) { return ltrim(rtrim(str, filter), filter); }
/// Make a copy of the string and then trim it
inline std::string trim_copy(const std::string &str) {
std::string s = str;
return trim(s);
}
/// remove quotes at the front and back of a string either '"' or '\''
CLI11_INLINE std::string &remove_quotes(std::string &str);
/// Add a leader to the beginning of all new lines (nothing is added
/// at the start of the first line). `"; "` would be for ini files
///
/// Can't use Regex, or this would be a subs.
CLI11_INLINE std::string fix_newlines(const std::string &leader, std::string input);
/// Make a copy of the string and then trim it, any filter string can be used (any char in string is filtered)
inline std::string trim_copy(const std::string &str, const std::string &filter) {
std::string s = str;
return trim(s, filter);
}
/// Print a two part "help" string
CLI11_INLINE std::ostream &
format_help(std::ostream &out, std::string name, const std::string &description, std::size_t wid);
/// Print subcommand aliases
CLI11_INLINE std::ostream &format_aliases(std::ostream &out, const std::vector<std::string> &aliases, std::size_t wid);
/// Verify the first character of an option
/// - is a trigger character, ! has special meaning and new lines would just be annoying to deal with
template <typename T> bool valid_first_char(T c) { return ((c != '-') && (c != '!') && (c != ' ') && c != '\n'); }
/// Verify following characters of an option
template <typename T> bool valid_later_char(T c) {
// = and : are value separators, { has special meaning for option defaults,
// and \n would just be annoying to deal with in many places allowing space here has too much potential for
// inadvertent entry errors and bugs
return ((c != '=') && (c != ':') && (c != '{') && (c != ' ') && c != '\n');
}
/// Verify an option/subcommand name
CLI11_INLINE bool valid_name_string(const std::string &str);
/// Verify an app name
inline bool valid_alias_name_string(const std::string &str) {
static const std::string badChars(std::string("\n") + '\0');
return (str.find_first_of(badChars) == std::string::npos);
}
/// check if a string is a container segment separator (empty or "%%")
inline bool is_separator(const std::string &str) {
static const std::string sep("%%");
return (str.empty() || str == sep);
}
/// Verify that str consists of letters only
inline bool isalpha(const std::string &str) {
return std::all_of(str.begin(), str.end(), [](char c) { return std::isalpha(c, std::locale()); });
}
/// Return a lower case version of a string
inline std::string to_lower(std::string str) {
std::transform(std::begin(str), std::end(str), std::begin(str), [](const std::string::value_type &x) {
return std::tolower(x, std::locale());
});
return str;
}
/// remove underscores from a string
inline std::string remove_underscore(std::string str) {
str.erase(std::remove(std::begin(str), std::end(str), '_'), std::end(str));
return str;
}
/// Find and replace a substring with another substring
CLI11_INLINE std::string find_and_replace(std::string str, std::string from, std::string to);
/// check if the flag definitions has possible false flags
inline bool has_default_flag_values(const std::string &flags) {
return (flags.find_first_of("{!") != std::string::npos);
}
CLI11_INLINE void remove_default_flag_values(std::string &flags);
/// Check if a string is a member of a list of strings and optionally ignore case or ignore underscores
CLI11_INLINE std::ptrdiff_t find_member(std::string name,
const std::vector<std::string> names,
bool ignore_case = false,
bool ignore_underscore = false);
/// Find a trigger string and call a modify callable function that takes the current string and starting position of the
/// trigger and returns the position in the string to search for the next trigger string
template <typename Callable> inline std::string find_and_modify(std::string str, std::string trigger, Callable modify) {
std::size_t start_pos = 0;
while((start_pos = str.find(trigger, start_pos)) != std::string::npos) {
start_pos = modify(str, start_pos);
}
return str;
}
/// Split a string '"one two" "three"' into 'one two', 'three'
/// Quote characters can be ` ' or "
CLI11_INLINE std::vector<std::string> split_up(std::string str, char delimiter = '\0');
/// This function detects an equal or colon followed by an escaped quote after an argument
/// then modifies the string to replace the equality with a space. This is needed
/// to allow the split up function to work properly and is intended to be used with the find_and_modify function
/// the return value is the offset+1 which is required by the find_and_modify function.
CLI11_INLINE std::size_t escape_detect(std::string &str, std::size_t offset);
/// Add quotes if the string contains spaces
CLI11_INLINE std::string &add_quotes_if_needed(std::string &str);
} // namespace detail
namespace detail {
CLI11_INLINE std::vector<std::string> split(const std::string &s, char delim) {
std::vector<std::string> elems;
// Check to see if empty string, give consistent result
if(s.empty()) {
elems.emplace_back();
} else {
std::stringstream ss;
ss.str(s);
std::string item;
while(std::getline(ss, item, delim)) {
elems.push_back(item);
}
}
return elems;
}
CLI11_INLINE std::string <rim(std::string &str) {
auto it = std::find_if(str.begin(), str.end(), [](char ch) { return !std::isspace<char>(ch, std::locale()); });
str.erase(str.begin(), it);
return str;
}
CLI11_INLINE std::string <rim(std::string &str, const std::string &filter) {
auto it = std::find_if(str.begin(), str.end(), [&filter](char ch) { return filter.find(ch) == std::string::npos; });
str.erase(str.begin(), it);
return str;
}
CLI11_INLINE std::string &rtrim(std::string &str) {
auto it = std::find_if(str.rbegin(), str.rend(), [](char ch) { return !std::isspace<char>(ch, std::locale()); });
str.erase(it.base(), str.end());
return str;
}
CLI11_INLINE std::string &rtrim(std::string &str, const std::string &filter) {
auto it =
std::find_if(str.rbegin(), str.rend(), [&filter](char ch) { return filter.find(ch) == std::string::npos; });
str.erase(it.base(), str.end());
return str;
}
CLI11_INLINE std::string &remove_quotes(std::string &str) {
if(str.length() > 1 && (str.front() == '"' || str.front() == '\'')) {
if(str.front() == str.back()) {
str.pop_back();
str.erase(str.begin(), str.begin() + 1);
}
}
return str;
}
CLI11_INLINE std::string fix_newlines(const std::string &leader, std::string input) {
std::string::size_type n = 0;
while(n != std::string::npos && n < input.size()) {
n = input.find('\n', n);
if(n != std::string::npos) {
input = input.substr(0, n + 1) + leader + input.substr(n + 1);
n += leader.size();
}
}
return input;
}
CLI11_INLINE std::ostream &
format_help(std::ostream &out, std::string name, const std::string &description, std::size_t wid) {
name = " " + name;
out << std::setw(static_cast<int>(wid)) << std::left << name;
if(!description.empty()) {
if(name.length() >= wid)
out << "\n" << std::setw(static_cast<int>(wid)) << "";
for(const char c : description) {
out.put(c);
if(c == '\n') {
out << std::setw(static_cast<int>(wid)) << "";
}
}
}
out << "\n";
return out;
}
CLI11_INLINE std::ostream &format_aliases(std::ostream &out, const std::vector<std::string> &aliases, std::size_t wid) {
if(!aliases.empty()) {
out << std::setw(static_cast<int>(wid)) << " aliases: ";
bool front = true;
for(const auto &alias : aliases) {
if(!front) {
out << ", ";
} else {
front = false;
}
out << detail::fix_newlines(" ", alias);
}
out << "\n";
}
return out;
}
CLI11_INLINE bool valid_name_string(const std::string &str) {
if(str.empty() || !valid_first_char(str[0])) {
return false;
}
auto e = str.end();
for(auto c = str.begin() + 1; c != e; ++c)
if(!valid_later_char(*c))
return false;
return true;
}
CLI11_INLINE std::string find_and_replace(std::string str, std::string from, std::string to) {
std::size_t start_pos = 0;
while((start_pos = str.find(from, start_pos)) != std::string::npos) {
str.replace(start_pos, from.length(), to);
start_pos += to.length();
}
return str;
}
CLI11_INLINE void remove_default_flag_values(std::string &flags) {
auto loc = flags.find_first_of('{', 2);
while(loc != std::string::npos) {
auto finish = flags.find_first_of("},", loc + 1);
if((finish != std::string::npos) && (flags[finish] == '}')) {
flags.erase(flags.begin() + static_cast<std::ptrdiff_t>(loc),
flags.begin() + static_cast<std::ptrdiff_t>(finish) + 1);
}
loc = flags.find_first_of('{', loc + 1);
}
flags.erase(std::remove(flags.begin(), flags.end(), '!'), flags.end());
}
CLI11_INLINE std::ptrdiff_t
find_member(std::string name, const std::vector<std::string> names, bool ignore_case, bool ignore_underscore) {
auto it = std::end(names);
if(ignore_case) {
if(ignore_underscore) {
name = detail::to_lower(detail::remove_underscore(name));
it = std::find_if(std::begin(names), std::end(names), [&name](std::string local_name) {
return detail::to_lower(detail::remove_underscore(local_name)) == name;
});
} else {
name = detail::to_lower(name);
it = std::find_if(std::begin(names), std::end(names), [&name](std::string local_name) {
return detail::to_lower(local_name) == name;
});
}
} else if(ignore_underscore) {
name = detail::remove_underscore(name);
it = std::find_if(std::begin(names), std::end(names), [&name](std::string local_name) {
return detail::remove_underscore(local_name) == name;
});
} else {
it = std::find(std::begin(names), std::end(names), name);
}
return (it != std::end(names)) ? (it - std::begin(names)) : (-1);
}
CLI11_INLINE std::vector<std::string> split_up(std::string str, char delimiter) {
const std::string delims("\'\"`");
auto find_ws = [delimiter](char ch) {
return (delimiter == '\0') ? std::isspace<char>(ch, std::locale()) : (ch == delimiter);
};
trim(str);
std::vector<std::string> output;
bool embeddedQuote = false;
char keyChar = ' ';
while(!str.empty()) {
if(delims.find_first_of(str[0]) != std::string::npos) {
keyChar = str[0];
auto end = str.find_first_of(keyChar, 1);
while((end != std::string::npos) && (str[end - 1] == '\\')) { // deal with escaped quotes
end = str.find_first_of(keyChar, end + 1);
embeddedQuote = true;
}
if(end != std::string::npos) {
output.push_back(str.substr(1, end - 1));
if(end + 2 < str.size()) {
str = str.substr(end + 2);
} else {
str.clear();
}
} else {
output.push_back(str.substr(1));
str = "";
}
} else {
auto it = std::find_if(std::begin(str), std::end(str), find_ws);
if(it != std::end(str)) {
std::string value = std::string(str.begin(), it);
output.push_back(value);
str = std::string(it + 1, str.end());
} else {
output.push_back(str);
str = "";
}
}
// transform any embedded quotes into the regular character
if(embeddedQuote) {
output.back() = find_and_replace(output.back(), std::string("\\") + keyChar, std::string(1, keyChar));
embeddedQuote = false;
}
trim(str);
}
return output;
}
CLI11_INLINE std::size_t escape_detect(std::string &str, std::size_t offset) {
auto next = str[offset + 1];
if((next == '\"') || (next == '\'') || (next == '`')) {
auto astart = str.find_last_of("-/ \"\'`", offset - 1);
if(astart != std::string::npos) {
if(str[astart] == ((str[offset] == '=') ? '-' : '/'))
str[offset] = ' '; // interpret this as a space so the split_up works properly
}
}
return offset + 1;
}
CLI11_INLINE std::string &add_quotes_if_needed(std::string &str) {
if((str.front() != '"' && str.front() != '\'') || str.front() != str.back()) {
char quote = str.find('"') < str.find('\'') ? '\'' : '"';
if(str.find(' ') != std::string::npos) {
str.insert(0, 1, quote);
str.append(1, quote);
}
}
return str;
}
} // namespace detail
// Use one of these on all error classes.
// These are temporary and are undef'd at the end of this file.
#define CLI11_ERROR_DEF(parent, name) \
protected: \
name(std::string ename, std::string msg, int exit_code) : parent(std::move(ename), std::move(msg), exit_code) {} \
name(std::string ename, std::string msg, ExitCodes exit_code) \
: parent(std::move(ename), std::move(msg), exit_code) {} \
\
public: \
name(std::string msg, ExitCodes exit_code) : parent(#name, std::move(msg), exit_code) {} \
name(std::string msg, int exit_code) : parent(#name, std::move(msg), exit_code) {}
// This is added after the one above if a class is used directly and builds its own message
#define CLI11_ERROR_SIMPLE(name) \
explicit name(std::string msg) : name(#name, msg, ExitCodes::name) {}
/// These codes are part of every error in CLI. They can be obtained from e using e.exit_code or as a quick shortcut,
/// int values from e.get_error_code().
enum class ExitCodes {
Success = 0,
IncorrectConstruction = 100,
BadNameString,
OptionAlreadyAdded,
FileError,
ConversionError,
ValidationError,
RequiredError,
RequiresError,
ExcludesError,
ExtrasError,
ConfigError,
InvalidError,
HorribleError,
OptionNotFound,
ArgumentMismatch,
BaseClass = 127
};
// Error definitions
/// @defgroup error_group Errors
/// @brief Errors thrown by CLI11
///
/// These are the errors that can be thrown. Some of them, like CLI::Success, are not really errors.
/// @{
/// All errors derive from this one
class Error : public std::runtime_error {
int actual_exit_code;
std::string error_name{"Error"};
public:
CLI11_NODISCARD int get_exit_code() const { return actual_exit_code; }
CLI11_NODISCARD std::string get_name() const { return error_name; }
Error(std::string name, std::string msg, int exit_code = static_cast<int>(ExitCodes::BaseClass))
: runtime_error(msg), actual_exit_code(exit_code), error_name(std::move(name)) {}
Error(std::string name, std::string msg, ExitCodes exit_code) : Error(name, msg, static_cast<int>(exit_code)) {}
};
// Note: Using Error::Error constructors does not work on GCC 4.7
/// Construction errors (not in parsing)
class ConstructionError : public Error {
CLI11_ERROR_DEF(Error, ConstructionError)
};
/// Thrown when an option is set to conflicting values (non-vector and multi args, for example)
class IncorrectConstruction : public ConstructionError {
CLI11_ERROR_DEF(ConstructionError, IncorrectConstruction)
CLI11_ERROR_SIMPLE(IncorrectConstruction)
static IncorrectConstruction PositionalFlag(std::string name) {
return IncorrectConstruction(name + ": Flags cannot be positional");
}
static IncorrectConstruction Set0Opt(std::string name) {
return IncorrectConstruction(name + ": Cannot set 0 expected, use a flag instead");
}
static IncorrectConstruction SetFlag(std::string name) {
return IncorrectConstruction(name + ": Cannot set an expected number for flags");
}
static IncorrectConstruction ChangeNotVector(std::string name) {
return IncorrectConstruction(name + ": You can only change the expected arguments for vectors");
}
static IncorrectConstruction AfterMultiOpt(std::string name) {
return IncorrectConstruction(
name + ": You can't change expected arguments after you've changed the multi option policy!");
}
static IncorrectConstruction MissingOption(std::string name) {
return IncorrectConstruction("Option " + name + " is not defined");
}
static IncorrectConstruction MultiOptionPolicy(std::string name) {
return IncorrectConstruction(name + ": multi_option_policy only works for flags and exact value options");
}
};
/// Thrown on construction of a bad name
class BadNameString : public ConstructionError {
CLI11_ERROR_DEF(ConstructionError, BadNameString)
CLI11_ERROR_SIMPLE(BadNameString)
static BadNameString OneCharName(std::string name) { return BadNameString("Invalid one char name: " + name); }
static BadNameString BadLongName(std::string name) { return BadNameString("Bad long name: " + name); }
static BadNameString DashesOnly(std::string name) {
return BadNameString("Must have a name, not just dashes: " + name);
}
static BadNameString MultiPositionalNames(std::string name) {
return BadNameString("Only one positional name allowed, remove: " + name);
}
};
/// Thrown when an option already exists
class OptionAlreadyAdded : public ConstructionError {
CLI11_ERROR_DEF(ConstructionError, OptionAlreadyAdded)
explicit OptionAlreadyAdded(std::string name)
: OptionAlreadyAdded(name + " is already added", ExitCodes::OptionAlreadyAdded) {}
static OptionAlreadyAdded Requires(std::string name, std::string other) {
return {name + " requires " + other, ExitCodes::OptionAlreadyAdded};
}
static OptionAlreadyAdded Excludes(std::string name, std::string other) {
return {name + " excludes " + other, ExitCodes::OptionAlreadyAdded};
}
};
// Parsing errors
/// Anything that can error in Parse
class ParseError : public Error {
CLI11_ERROR_DEF(Error, ParseError)
};
// Not really "errors"
/// This is a successful completion on parsing, supposed to exit
class Success : public ParseError {
CLI11_ERROR_DEF(ParseError, Success)
Success() : Success("Successfully completed, should be caught and quit", ExitCodes::Success) {}
};
/// -h or --help on command line
class CallForHelp : public Success {
CLI11_ERROR_DEF(Success, CallForHelp)
CallForHelp() : CallForHelp("This should be caught in your main function, see examples", ExitCodes::Success) {}
};
/// Usually something like --help-all on command line
class CallForAllHelp : public Success {
CLI11_ERROR_DEF(Success, CallForAllHelp)
CallForAllHelp()
: CallForAllHelp("This should be caught in your main function, see examples", ExitCodes::Success) {}
};
/// -v or --version on command line
class CallForVersion : public Success {
CLI11_ERROR_DEF(Success, CallForVersion)
CallForVersion()
: CallForVersion("This should be caught in your main function, see examples", ExitCodes::Success) {}
};
/// Does not output a diagnostic in CLI11_PARSE, but allows main() to return with a specific error code.
class RuntimeError : public ParseError {
CLI11_ERROR_DEF(ParseError, RuntimeError)
explicit RuntimeError(int exit_code = 1) : RuntimeError("Runtime error", exit_code) {}
};
/// Thrown when parsing an INI file and it is missing
class FileError : public ParseError {
CLI11_ERROR_DEF(ParseError, FileError)
CLI11_ERROR_SIMPLE(FileError)
static FileError Missing(std::string name) { return FileError(name + " was not readable (missing?)"); }
};
/// Thrown when conversion call back fails, such as when an int fails to coerce to a string
class ConversionError : public ParseError {
CLI11_ERROR_DEF(ParseError, ConversionError)
CLI11_ERROR_SIMPLE(ConversionError)
ConversionError(std::string member, std::string name)
: ConversionError("The value " + member + " is not an allowed value for " + name) {}
ConversionError(std::string name, std::vector<std::string> results)
: ConversionError("Could not convert: " + name + " = " + detail::join(results)) {}
static ConversionError TooManyInputsFlag(std::string name) {
return ConversionError(name + ": too many inputs for a flag");
}
static ConversionError TrueFalse(std::string name) {
return ConversionError(name + ": Should be true/false or a number");
}
};
/// Thrown when validation of results fails
class ValidationError : public ParseError {
CLI11_ERROR_DEF(ParseError, ValidationError)
CLI11_ERROR_SIMPLE(ValidationError)
explicit ValidationError(std::string name, std::string msg) : ValidationError(name + ": " + msg) {}
};
/// Thrown when a required option is missing
class RequiredError : public ParseError {
CLI11_ERROR_DEF(ParseError, RequiredError)
explicit RequiredError(std::string name) : RequiredError(name + " is required", ExitCodes::RequiredError) {}
static RequiredError Subcommand(std::size_t min_subcom) {
if(min_subcom == 1) {
return RequiredError("A subcommand");
}
return {"Requires at least " + std::to_string(min_subcom) + " subcommands", ExitCodes::RequiredError};
}
static RequiredError
Option(std::size_t min_option, std::size_t max_option, std::size_t used, const std::string &option_list) {
if((min_option == 1) && (max_option == 1) && (used == 0))
return RequiredError("Exactly 1 option from [" + option_list + "]");
if((min_option == 1) && (max_option == 1) && (used > 1)) {
return {"Exactly 1 option from [" + option_list + "] is required and " + std::to_string(used) +
" were given",
ExitCodes::RequiredError};
}
if((min_option == 1) && (used == 0))
return RequiredError("At least 1 option from [" + option_list + "]");
if(used < min_option) {
return {"Requires at least " + std::to_string(min_option) + " options used and only " +
std::to_string(used) + "were given from [" + option_list + "]",
ExitCodes::RequiredError};
}
if(max_option == 1)
return {"Requires at most 1 options be given from [" + option_list + "]", ExitCodes::RequiredError};
return {"Requires at most " + std::to_string(max_option) + " options be used and " + std::to_string(used) +
"were given from [" + option_list + "]",
ExitCodes::RequiredError};
}
};
/// Thrown when the wrong number of arguments has been received
class ArgumentMismatch : public ParseError {
CLI11_ERROR_DEF(ParseError, ArgumentMismatch)
CLI11_ERROR_SIMPLE(ArgumentMismatch)
ArgumentMismatch(std::string name, int expected, std::size_t received)
: ArgumentMismatch(expected > 0 ? ("Expected exactly " + std::to_string(expected) + " arguments to " + name +
", got " + std::to_string(received))
: ("Expected at least " + std::to_string(-expected) + " arguments to " + name +
", got " + std::to_string(received)),
ExitCodes::ArgumentMismatch) {}
static ArgumentMismatch AtLeast(std::string name, int num, std::size_t received) {
return ArgumentMismatch(name + ": At least " + std::to_string(num) + " required but received " +
std::to_string(received));
}
static ArgumentMismatch AtMost(std::string name, int num, std::size_t received) {
return ArgumentMismatch(name + ": At Most " + std::to_string(num) + " required but received " +
std::to_string(received));
}
static ArgumentMismatch TypedAtLeast(std::string name, int num, std::string type) {
return ArgumentMismatch(name + ": " + std::to_string(num) + " required " + type + " missing");
}
static ArgumentMismatch FlagOverride(std::string name) {
return ArgumentMismatch(name + " was given a disallowed flag override");
}
static ArgumentMismatch PartialType(std::string name, int num, std::string type) {
return ArgumentMismatch(name + ": " + type + " only partially specified: " + std::to_string(num) +
" required for each element");
}
};
/// Thrown when a requires option is missing
class RequiresError : public ParseError {
CLI11_ERROR_DEF(ParseError, RequiresError)
RequiresError(std::string curname, std::string subname)
: RequiresError(curname + " requires " + subname, ExitCodes::RequiresError) {}
};
/// Thrown when an excludes option is present
class ExcludesError : public ParseError {
CLI11_ERROR_DEF(ParseError, ExcludesError)
ExcludesError(std::string curname, std::string subname)
: ExcludesError(curname + " excludes " + subname, ExitCodes::ExcludesError) {}
};
/// Thrown when too many positionals or options are found
class ExtrasError : public ParseError {
CLI11_ERROR_DEF(ParseError, ExtrasError)
explicit ExtrasError(std::vector<std::string> args)
: ExtrasError((args.size() > 1 ? "The following arguments were not expected: "
: "The following argument was not expected: ") +
detail::rjoin(args, " "),
ExitCodes::ExtrasError) {}
ExtrasError(const std::string &name, std::vector<std::string> args)
: ExtrasError(name,
(args.size() > 1 ? "The following arguments were not expected: "
: "The following argument was not expected: ") +
detail::rjoin(args, " "),
ExitCodes::ExtrasError) {}
};
/// Thrown when extra values are found in an INI file
class ConfigError : public ParseError {
CLI11_ERROR_DEF(ParseError, ConfigError)
CLI11_ERROR_SIMPLE(ConfigError)
static ConfigError Extras(std::string item) { return ConfigError("INI was not able to parse " + item); }
static ConfigError NotConfigurable(std::string item) {
return ConfigError(item + ": This option is not allowed in a configuration file");
}
};
/// Thrown when validation fails before parsing
class InvalidError : public ParseError {
CLI11_ERROR_DEF(ParseError, InvalidError)
explicit InvalidError(std::string name)
: InvalidError(name + ": Too many positional arguments with unlimited expected args", ExitCodes::InvalidError) {
}
};
/// This is just a safety check to verify selection and parsing match - you should not ever see it
/// Strings are directly added to this error, but again, it should never be seen.
class HorribleError : public ParseError {
CLI11_ERROR_DEF(ParseError, HorribleError)
CLI11_ERROR_SIMPLE(HorribleError)
};
// After parsing
/// Thrown when counting a non-existent option
class OptionNotFound : public Error {
CLI11_ERROR_DEF(Error, OptionNotFound)
explicit OptionNotFound(std::string name) : OptionNotFound(name + " not found", ExitCodes::OptionNotFound) {}
};
#undef CLI11_ERROR_DEF
#undef CLI11_ERROR_SIMPLE
/// @}
// Type tools
// Utilities for type enabling
namespace detail {
// Based generally on https://rmf.io/cxx11/almost-static-if
/// Simple empty scoped class
enum class enabler {};
/// An instance to use in EnableIf
constexpr enabler dummy = {};
} // namespace detail
/// A copy of enable_if_t from C++14, compatible with C++11.
///
/// We could check to see if C++14 is being used, but it does not hurt to redefine this
/// (even Google does this: https://github.com/google/skia/blob/main/include/private/SkTLogic.h)
/// It is not in the std namespace anyway, so no harm done.
template <bool B, class T = void> using enable_if_t = typename std::enable_if<B, T>::type;
/// A copy of std::void_t from C++17 (helper for C++11 and C++14)
template <typename... Ts> struct make_void {
using type = void;
};
/// A copy of std::void_t from C++17 - same reasoning as enable_if_t, it does not hurt to redefine
template <typename... Ts> using void_t = typename make_void<Ts...>::type;
/// A copy of std::conditional_t from C++14 - same reasoning as enable_if_t, it does not hurt to redefine
template <bool B, class T, class F> using conditional_t = typename std::conditional<B, T, F>::type;
/// Check to see if something is bool (fail check by default)
template <typename T> struct is_bool : std::false_type {};
/// Check to see if something is bool (true if actually a bool)
template <> struct is_bool<bool> : std::true_type {};
/// Check to see if something is a shared pointer
template <typename T> struct is_shared_ptr : std::false_type {};
/// Check to see if something is a shared pointer (True if really a shared pointer)
template <typename T> struct is_shared_ptr<std::shared_ptr<T>> : std::true_type {};
/// Check to see if something is a shared pointer (True if really a shared pointer)
template <typename T> struct is_shared_ptr<const std::shared_ptr<T>> : std::true_type {};
/// Check to see if something is copyable pointer
template <typename T> struct is_copyable_ptr {
static bool const value = is_shared_ptr<T>::value || std::is_pointer<T>::value;
};
/// This can be specialized to override the type deduction for IsMember.
template <typename T> struct IsMemberType {
using type = T;
};
/// The main custom type needed here is const char * should be a string.
template <> struct IsMemberType<const char *> {
using type = std::string;
};
namespace detail {
// These are utilities for IsMember and other transforming objects
/// Handy helper to access the element_type generically. This is not part of is_copyable_ptr because it requires that
/// pointer_traits<T> be valid.
/// not a pointer
template <typename T, typename Enable = void> struct element_type {
using type = T;
};
template <typename T> struct element_type<T, typename std::enable_if<is_copyable_ptr<T>::value>::type> {
using type = typename std::pointer_traits<T>::element_type;
};
/// Combination of the element type and value type - remove pointer (including smart pointers) and get the value_type of
/// the container
template <typename T> struct element_value_type {
using type = typename element_type<T>::type::value_type;
};
/// Adaptor for set-like structure: This just wraps a normal container in a few utilities that do almost nothing.
template <typename T, typename _ = void> struct pair_adaptor : std::false_type {
using value_type = typename T::value_type;
using first_type = typename std::remove_const<value_type>::type;
using second_type = typename std::remove_const<value_type>::type;
/// Get the first value (really just the underlying value)
template <typename Q> static auto first(Q &&pair_value) -> decltype(std::forward<Q>(pair_value)) {
return std::forward<Q>(pair_value);
}
/// Get the second value (really just the underlying value)
template <typename Q> static auto second(Q &&pair_value) -> decltype(std::forward<Q>(pair_value)) {
return std::forward<Q>(pair_value);
}
};
/// Adaptor for map-like structure (true version, must have key_type and mapped_type).
/// This wraps a mapped container in a few utilities access it in a general way.
template <typename T>
struct pair_adaptor<
T,
conditional_t<false, void_t<typename T::value_type::first_type, typename T::value_type::second_type>, void>>
: std::true_type {
using value_type = typename T::value_type;
using first_type = typename std::remove_const<typename value_type::first_type>::type;
using second_type = typename std::remove_const<typename value_type::second_type>::type;
/// Get the first value (really just the underlying value)
template <typename Q> static auto first(Q &&pair_value) -> decltype(std::get<0>(std::forward<Q>(pair_value))) {
return std::get<0>(std::forward<Q>(pair_value));
}
/// Get the second value (really just the underlying value)
template <typename Q> static auto second(Q &&pair_value) -> decltype(std::get<1>(std::forward<Q>(pair_value))) {
return std::get<1>(std::forward<Q>(pair_value));
}
};
// Warning is suppressed due to "bug" in gcc<5.0 and gcc 7.0 with c++17 enabled that generates a Wnarrowing warning
// in the unevaluated context even if the function that was using this wasn't used. The standard says narrowing in
// brace initialization shouldn't be allowed but for backwards compatibility gcc allows it in some contexts. It is a
// little fuzzy what happens in template constructs and I think that was something GCC took a little while to work out.
// But regardless some versions of gcc generate a warning when they shouldn't from the following code so that should be
// suppressed
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnarrowing"
#endif
// check for constructibility from a specific type and copy assignable used in the parse detection
template <typename T, typename C> class is_direct_constructible {
template <typename TT, typename CC>
static auto test(int, std::true_type) -> decltype(
// NVCC warns about narrowing conversions here
#ifdef __CUDACC__
#pragma diag_suppress 2361
#endif
TT{std::declval<CC>()}
#ifdef __CUDACC__
#pragma diag_default 2361
#endif
,
std::is_move_assignable<TT>());
template <typename TT, typename CC> static auto test(int, std::false_type) -> std::false_type;
template <typename, typename> static auto test(...) -> std::false_type;
public:
static constexpr bool value = decltype(test<T, C>(0, typename std::is_constructible<T, C>::type()))::value;
};
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
// Check for output streamability
// Based on https://stackoverflow.com/questions/22758291/how-can-i-detect-if-a-type-can-be-streamed-to-an-stdostream
template <typename T, typename S = std::ostringstream> class is_ostreamable {
template <typename TT, typename SS>
static auto test(int) -> decltype(std::declval<SS &>() << std::declval<TT>(), std::true_type());
template <typename, typename> static auto test(...) -> std::false_type;
public:
static constexpr bool value = decltype(test<T, S>(0))::value;
};
/// Check for input streamability
template <typename T, typename S = std::istringstream> class is_istreamable {
template <typename TT, typename SS>
static auto test(int) -> decltype(std::declval<SS &>() >> std::declval<TT &>(), std::true_type());
template <typename, typename> static auto test(...) -> std::false_type;
public:
static constexpr bool value = decltype(test<T, S>(0))::value;
};
/// Check for complex
template <typename T> class is_complex {
template <typename TT>
static auto test(int) -> decltype(std::declval<TT>().real(), std::declval<TT>().imag(), std::true_type());
template <typename> static auto test(...) -> std::false_type;
public:
static constexpr bool value = decltype(test<T>(0))::value;
};
/// Templated operation to get a value from a stream
template <typename T, enable_if_t<is_istreamable<T>::value, detail::enabler> = detail::dummy>
bool from_stream(const std::string &istring, T &obj) {
std::istringstream is;
is.str(istring);
is >> obj;
return !is.fail() && !is.rdbuf()->in_avail();
}
template <typename T, enable_if_t<!is_istreamable<T>::value, detail::enabler> = detail::dummy>
bool from_stream(const std::string & /*istring*/, T & /*obj*/) {
return false;
}
// check to see if an object is a mutable container (fail by default)
template <typename T, typename _ = void> struct is_mutable_container : std::false_type {};
/// type trait to test if a type is a mutable container meaning it has a value_type, it has an iterator, a clear, and
/// end methods and an insert function. And for our purposes we exclude std::string and types that can be constructed
/// from a std::string
template <typename T>
struct is_mutable_container<
T,
conditional_t<false,
void_t<typename T::value_type,
decltype(std::declval<T>().end()),
decltype(std::declval<T>().clear()),
decltype(std::declval<T>().insert(std::declval<decltype(std::declval<T>().end())>(),
std::declval<const typename T::value_type &>()))>,
void>>
: public conditional_t<std::is_constructible<T, std::string>::value, std::false_type, std::true_type> {};
// check to see if an object is a mutable container (fail by default)
template <typename T, typename _ = void> struct is_readable_container : std::false_type {};
/// type trait to test if a type is a container meaning it has a value_type, it has an iterator, a clear, and an end
/// methods and an insert function. And for our purposes we exclude std::string and types that can be constructed from
/// a std::string
template <typename T>
struct is_readable_container<
T,
conditional_t<false, void_t<decltype(std::declval<T>().end()), decltype(std::declval<T>().begin())>, void>>
: public std::true_type {};
// check to see if an object is a wrapper (fail by default)
template <typename T, typename _ = void> struct is_wrapper : std::false_type {};
// check if an object is a wrapper (it has a value_type defined)
template <typename T>
struct is_wrapper<T, conditional_t<false, void_t<typename T::value_type>, void>> : public std::true_type {};
// Check for tuple like types, as in classes with a tuple_size type trait
template <typename S> class is_tuple_like {
template <typename SS>
// static auto test(int)
// -> decltype(std::conditional<(std::tuple_size<SS>::value > 0), std::true_type, std::false_type>::type());
static auto test(int) -> decltype(std::tuple_size<typename std::decay<SS>::type>::value, std::true_type{});
template <typename> static auto test(...) -> std::false_type;
public:
static constexpr bool value = decltype(test<S>(0))::value;
};
/// Convert an object to a string (directly forward if this can become a string)
template <typename T, enable_if_t<std::is_convertible<T, std::string>::value, detail::enabler> = detail::dummy>
auto to_string(T &&value) -> decltype(std::forward<T>(value)) {
return std::forward<T>(value);
}
/// Construct a string from the object
template <typename T,
enable_if_t<std::is_constructible<std::string, T>::value && !std::is_convertible<T, std::string>::value,
detail::enabler> = detail::dummy>
std::string to_string(const T &value) {
return std::string(value); // NOLINT(google-readability-casting)
}
/// Convert an object to a string (streaming must be supported for that type)
template <typename T,
enable_if_t<!std::is_convertible<std::string, T>::value && !std::is_constructible<std::string, T>::value &&
is_ostreamable<T>::value,
detail::enabler> = detail::dummy>
std::string to_string(T &&value) {
std::stringstream stream;
stream << value;
return stream.str();
}
/// If conversion is not supported, return an empty string (streaming is not supported for that type)
template <typename T,
enable_if_t<!std::is_constructible<std::string, T>::value && !is_ostreamable<T>::value &&
!is_readable_container<typename std::remove_const<T>::type>::value,
detail::enabler> = detail::dummy>
std::string to_string(T &&) {
return {};
}
/// convert a readable container to a string
template <typename T,
enable_if_t<!std::is_constructible<std::string, T>::value && !is_ostreamable<T>::value &&
is_readable_container<T>::value,
detail::enabler> = detail::dummy>
std::string to_string(T &&variable) {
auto cval = variable.begin();
auto end = variable.end();
if(cval == end) {
return {"{}"};
}
std::vector<std::string> defaults;
while(cval != end) {
defaults.emplace_back(CLI::detail::to_string(*cval));
++cval;
}
return {"[" + detail::join(defaults) + "]"};
}
/// special template overload
template <typename T1,
typename T2,
typename T,
enable_if_t<std::is_same<T1, T2>::value, detail::enabler> = detail::dummy>
auto checked_to_string(T &&value) -> decltype(to_string(std::forward<T>(value))) {
return to_string(std::forward<T>(value));
}
/// special template overload
template <typename T1,
typename T2,
typename T,
enable_if_t<!std::is_same<T1, T2>::value, detail::enabler> = detail::dummy>
std::string checked_to_string(T &&) {
return std::string{};
}
/// get a string as a convertible value for arithmetic types
template <typename T, enable_if_t<std::is_arithmetic<T>::value, detail::enabler> = detail::dummy>
std::string value_string(const T &value) {
return std::to_string(value);
}
/// get a string as a convertible value for enumerations
template <typename T, enable_if_t<std::is_enum<T>::value, detail::enabler> = detail::dummy>
std::string value_string(const T &value) {
return std::to_string(static_cast<typename std::underlying_type<T>::type>(value));
}
/// for other types just use the regular to_string function
template <typename T,
enable_if_t<!std::is_enum<T>::value && !std::is_arithmetic<T>::value, detail::enabler> = detail::dummy>
auto value_string(const T &value) -> decltype(to_string(value)) {
return to_string(value);
}
/// template to get the underlying value type if it exists or use a default
template <typename T, typename def, typename Enable = void> struct wrapped_type {
using type = def;
};
/// Type size for regular object types that do not look like a tuple
template <typename T, typename def> struct wrapped_type<T, def, typename std::enable_if<is_wrapper<T>::value>::type> {
using type = typename T::value_type;
};
/// This will only trigger for actual void type
template <typename T, typename Enable = void> struct type_count_base {
static const int value{0};
};
/// Type size for regular object types that do not look like a tuple
template <typename T>
struct type_count_base<T,
typename std::enable_if<!is_tuple_like<T>::value && !is_mutable_container<T>::value &&
!std::is_void<T>::value>::type> {
static constexpr int value{1};
};
/// the base tuple size
template <typename T>
struct type_count_base<T, typename std::enable_if<is_tuple_like<T>::value && !is_mutable_container<T>::value>::type> {
static constexpr int value{std::tuple_size<T>::value};
};
/// Type count base for containers is the type_count_base of the individual element
template <typename T> struct type_count_base<T, typename std::enable_if<is_mutable_container<T>::value>::type> {
static constexpr int value{type_count_base<typename T::value_type>::value};
};
/// Set of overloads to get the type size of an object
/// forward declare the subtype_count structure
template <typename T> struct subtype_count;
/// forward declare the subtype_count_min structure
template <typename T> struct subtype_count_min;
/// This will only trigger for actual void type
template <typename T, typename Enable = void> struct type_count {
static const int value{0};
};
/// Type size for regular object types that do not look like a tuple
template <typename T>
struct type_count<T,
typename std::enable_if<!is_wrapper<T>::value && !is_tuple_like<T>::value && !is_complex<T>::value &&
!std::is_void<T>::value>::type> {
static constexpr int value{1};
};
/// Type size for complex since it sometimes looks like a wrapper
template <typename T> struct type_count<T, typename std::enable_if<is_complex<T>::value>::type> {
static constexpr int value{2};
};
/// Type size of types that are wrappers,except complex and tuples(which can also be wrappers sometimes)
template <typename T> struct type_count<T, typename std::enable_if<is_mutable_container<T>::value>::type> {
static constexpr int value{subtype_count<typename T::value_type>::value};
};
/// Type size of types that are wrappers,except containers complex and tuples(which can also be wrappers sometimes)
template <typename T>
struct type_count<T,
typename std::enable_if<is_wrapper<T>::value && !is_complex<T>::value && !is_tuple_like<T>::value &&
!is_mutable_container<T>::value>::type> {
static constexpr int value{type_count<typename T::value_type>::value};
};
/// 0 if the index > tuple size
template <typename T, std::size_t I>
constexpr typename std::enable_if<I == type_count_base<T>::value, int>::type tuple_type_size() {
return 0;
}
/// Recursively generate the tuple type name
template <typename T, std::size_t I>
constexpr typename std::enable_if < I<type_count_base<T>::value, int>::type tuple_type_size() {
return subtype_count<typename std::tuple_element<I, T>::type>::value + tuple_type_size<T, I + 1>();
}
/// Get the type size of the sum of type sizes for all the individual tuple types
template <typename T> struct type_count<T, typename std::enable_if<is_tuple_like<T>::value>::type> {
static constexpr int value{tuple_type_size<T, 0>()};
};
/// definition of subtype count
template <typename T> struct subtype_count {
static constexpr int value{is_mutable_container<T>::value ? expected_max_vector_size : type_count<T>::value};
};
/// This will only trigger for actual void type
template <typename T, typename Enable = void> struct type_count_min {
static const int value{0};
};
/// Type size for regular object types that do not look like a tuple
template <typename T>
struct type_count_min<
T,
typename std::enable_if<!is_mutable_container<T>::value && !is_tuple_like<T>::value && !is_wrapper<T>::value &&
!is_complex<T>::value && !std::is_void<T>::value>::type> {
static constexpr int value{type_count<T>::value};
};
/// Type size for complex since it sometimes looks like a wrapper
template <typename T> struct type_count_min<T, typename std::enable_if<is_complex<T>::value>::type> {
static constexpr int value{1};
};
/// Type size min of types that are wrappers,except complex and tuples(which can also be wrappers sometimes)
template <typename T>
struct type_count_min<
T,
typename std::enable_if<is_wrapper<T>::value && !is_complex<T>::value && !is_tuple_like<T>::value>::type> {
static constexpr int value{subtype_count_min<typename T::value_type>::value};
};
/// 0 if the index > tuple size
template <typename T, std::size_t I>
constexpr typename std::enable_if<I == type_count_base<T>::value, int>::type tuple_type_size_min() {
return 0;
}
/// Recursively generate the tuple type name
template <typename T, std::size_t I>
constexpr typename std::enable_if < I<type_count_base<T>::value, int>::type tuple_type_size_min() {
return subtype_count_min<typename std::tuple_element<I, T>::type>::value + tuple_type_size_min<T, I + 1>();
}
/// Get the type size of the sum of type sizes for all the individual tuple types
template <typename T> struct type_count_min<T, typename std::enable_if<is_tuple_like<T>::value>::type> {
static constexpr int value{tuple_type_size_min<T, 0>()};
};
/// definition of subtype count
template <typename T> struct subtype_count_min {
static constexpr int value{is_mutable_container<T>::value
? ((type_count<T>::value < expected_max_vector_size) ? type_count<T>::value : 0)
: type_count_min<T>::value};
};
/// This will only trigger for actual void type
template <typename T, typename Enable = void> struct expected_count {
static const int value{0};
};
/// For most types the number of expected items is 1
template <typename T>
struct expected_count<T,
typename std::enable_if<!is_mutable_container<T>::value && !is_wrapper<T>::value &&
!std::is_void<T>::value>::type> {
static constexpr int value{1};
};
/// number of expected items in a vector
template <typename T> struct expected_count<T, typename std::enable_if<is_mutable_container<T>::value>::type> {
static constexpr int value{expected_max_vector_size};
};
/// number of expected items in a vector
template <typename T>
struct expected_count<T, typename std::enable_if<!is_mutable_container<T>::value && is_wrapper<T>::value>::type> {
static constexpr int value{expected_count<typename T::value_type>::value};
};
// Enumeration of the different supported categorizations of objects
enum class object_category : int {
char_value = 1,
integral_value = 2,
unsigned_integral = 4,
enumeration = 6,
boolean_value = 8,
floating_point = 10,
number_constructible = 12,
double_constructible = 14,
integer_constructible = 16,
// string like types
string_assignable = 23,
string_constructible = 24,
other = 45,
// special wrapper or container types
wrapper_value = 50,
complex_number = 60,
tuple_value = 70,
container_value = 80,
};
/// Set of overloads to classify an object according to type
/// some type that is not otherwise recognized
template <typename T, typename Enable = void> struct classify_object {
static constexpr object_category value{object_category::other};
};
/// Signed integers
template <typename T>
struct classify_object<
T,
typename std::enable_if<std::is_integral<T>::value && !std::is_same<T, char>::value && std::is_signed<T>::value &&
!is_bool<T>::value && !std::is_enum<T>::value>::type> {
static constexpr object_category value{object_category::integral_value};
};
/// Unsigned integers
template <typename T>
struct classify_object<T,
typename std::enable_if<std::is_integral<T>::value && std::is_unsigned<T>::value &&
!std::is_same<T, char>::value && !is_bool<T>::value>::type> {
static constexpr object_category value{object_category::unsigned_integral};
};
/// single character values
template <typename T>
struct classify_object<T, typename std::enable_if<std::is_same<T, char>::value && !std::is_enum<T>::value>::type> {
static constexpr object_category value{object_category::char_value};
};
/// Boolean values
template <typename T> struct classify_object<T, typename std::enable_if<is_bool<T>::value>::type> {
static constexpr object_category value{object_category::boolean_value};
};
/// Floats
template <typename T> struct classify_object<T, typename std::enable_if<std::is_floating_point<T>::value>::type> {
static constexpr object_category value{object_category::floating_point};
};
/// String and similar direct assignment
template <typename T>
struct classify_object<T,
typename std::enable_if<!std::is_floating_point<T>::value && !std::is_integral<T>::value &&
std::is_assignable<T &, std::string>::value>::type> {
static constexpr object_category value{object_category::string_assignable};
};
/// String and similar constructible and copy assignment
template <typename T>
struct classify_object<
T,
typename std::enable_if<!std::is_floating_point<T>::value && !std::is_integral<T>::value &&
!std::is_assignable<T &, std::string>::value && (type_count<T>::value == 1) &&
std::is_constructible<T, std::string>::value>::type> {
static constexpr object_category value{object_category::string_constructible};
};
/// Enumerations
template <typename T> struct classify_object<T, typename std::enable_if<std::is_enum<T>::value>::type> {
static constexpr object_category value{object_category::enumeration};
};
template <typename T> struct classify_object<T, typename std::enable_if<is_complex<T>::value>::type> {
static constexpr object_category value{object_category::complex_number};
};
/// Handy helper to contain a bunch of checks that rule out many common types (integers, string like, floating point,
/// vectors, and enumerations
template <typename T> struct uncommon_type {
using type = typename std::conditional<!std::is_floating_point<T>::value && !std::is_integral<T>::value &&
!std::is_assignable<T &, std::string>::value &&
!std::is_constructible<T, std::string>::value && !is_complex<T>::value &&
!is_mutable_container<T>::value && !std::is_enum<T>::value,
std::true_type,
std::false_type>::type;
static constexpr bool value = type::value;
};
/// wrapper type
template <typename T>
struct classify_object<T,
typename std::enable_if<(!is_mutable_container<T>::value && is_wrapper<T>::value &&
!is_tuple_like<T>::value && uncommon_type<T>::value)>::type> {
static constexpr object_category value{object_category::wrapper_value};
};
/// Assignable from double or int
template <typename T>
struct classify_object<T,
typename std::enable_if<uncommon_type<T>::value && type_count<T>::value == 1 &&
!is_wrapper<T>::value && is_direct_constructible<T, double>::value &&
is_direct_constructible<T, int>::value>::type> {
static constexpr object_category value{object_category::number_constructible};
};
/// Assignable from int
template <typename T>
struct classify_object<T,
typename std::enable_if<uncommon_type<T>::value && type_count<T>::value == 1 &&
!is_wrapper<T>::value && !is_direct_constructible<T, double>::value &&
is_direct_constructible<T, int>::value>::type> {
static constexpr object_category value{object_category::integer_constructible};
};
/// Assignable from double
template <typename T>
struct classify_object<T,
typename std::enable_if<uncommon_type<T>::value && type_count<T>::value == 1 &&
!is_wrapper<T>::value && is_direct_constructible<T, double>::value &&
!is_direct_constructible<T, int>::value>::type> {
static constexpr object_category value{object_category::double_constructible};
};
/// Tuple type
template <typename T>
struct classify_object<
T,
typename std::enable_if<is_tuple_like<T>::value &&
((type_count<T>::value >= 2 && !is_wrapper<T>::value) ||
(uncommon_type<T>::value && !is_direct_constructible<T, double>::value &&
!is_direct_constructible<T, int>::value) ||
(uncommon_type<T>::value && type_count<T>::value >= 2))>::type> {
static constexpr object_category value{object_category::tuple_value};
// the condition on this class requires it be like a tuple, but on some compilers (like Xcode) tuples can be
// constructed from just the first element so tuples of <string, int,int> can be constructed from a string, which
// could lead to issues so there are two variants of the condition, the first isolates things with a type size >=2
// mainly to get tuples on Xcode with the exception of wrappers, the second is the main one and just separating out
// those cases that are caught by other object classifications
};
/// container type
template <typename T> struct classify_object<T, typename std::enable_if<is_mutable_container<T>::value>::type> {
static constexpr object_category value{object_category::container_value};
};
// Type name print
/// Was going to be based on
/// http://stackoverflow.com/questions/1055452/c-get-name-of-type-in-template
/// But this is cleaner and works better in this case
template <typename T,
enable_if_t<classify_object<T>::value == object_category::char_value, detail::enabler> = detail::dummy>
constexpr const char *type_name() {
return "CHAR";
}
template <typename T,
enable_if_t<classify_object<T>::value == object_category::integral_value ||
classify_object<T>::value == object_category::integer_constructible,
detail::enabler> = detail::dummy>
constexpr const char *type_name() {
return "INT";
}
template <typename T,
enable_if_t<classify_object<T>::value == object_category::unsigned_integral, detail::enabler> = detail::dummy>
constexpr const char *type_name() {
return "UINT";
}
template <typename T,
enable_if_t<classify_object<T>::value == object_category::floating_point ||
classify_object<T>::value == object_category::number_constructible ||
classify_object<T>::value == object_category::double_constructible,
detail::enabler> = detail::dummy>
constexpr const char *type_name() {
return "FLOAT";
}
/// Print name for enumeration types
template <typename T,
enable_if_t<classify_object<T>::value == object_category::enumeration, detail::enabler> = detail::dummy>
constexpr const char *type_name() {
return "ENUM";
}
/// Print name for enumeration types
template <typename T,
enable_if_t<classify_object<T>::value == object_category::boolean_value, detail::enabler> = detail::dummy>
constexpr const char *type_name() {
return "BOOLEAN";
}
/// Print name for enumeration types
template <typename T,
enable_if_t<classify_object<T>::value == object_category::complex_number, detail::enabler> = detail::dummy>
constexpr const char *type_name() {
return "COMPLEX";
}
/// Print for all other types
template <typename T,
enable_if_t<classify_object<T>::value >= object_category::string_assignable &&
classify_object<T>::value <= object_category::other,
detail::enabler> = detail::dummy>
constexpr const char *type_name() {
return "TEXT";
}
/// typename for tuple value
template <typename T,
enable_if_t<classify_object<T>::value == object_category::tuple_value && type_count_base<T>::value >= 2,
detail::enabler> = detail::dummy>
std::string type_name(); // forward declaration
/// Generate type name for a wrapper or container value
template <typename T,
enable_if_t<classify_object<T>::value == object_category::container_value ||
classify_object<T>::value == object_category::wrapper_value,
detail::enabler> = detail::dummy>
std::string type_name(); // forward declaration
/// Print name for single element tuple types
template <typename T,
enable_if_t<classify_object<T>::value == object_category::tuple_value && type_count_base<T>::value == 1,
detail::enabler> = detail::dummy>
inline std::string type_name() {
return type_name<typename std::decay<typename std::tuple_element<0, T>::type>::type>();
}
/// Empty string if the index > tuple size
template <typename T, std::size_t I>
inline typename std::enable_if<I == type_count_base<T>::value, std::string>::type tuple_name() {
return std::string{};
}
/// Recursively generate the tuple type name
template <typename T, std::size_t I>
inline typename std::enable_if<(I < type_count_base<T>::value), std::string>::type tuple_name() {
auto str = std::string{type_name<typename std::decay<typename std::tuple_element<I, T>::type>::type>()} + ',' +
tuple_name<T, I + 1>();
if(str.back() == ',')
str.pop_back();
return str;
}
/// Print type name for tuples with 2 or more elements
template <typename T,
enable_if_t<classify_object<T>::value == object_category::tuple_value && type_count_base<T>::value >= 2,
detail::enabler>>
inline std::string type_name() {
auto tname = std::string(1, '[') + tuple_name<T, 0>();
tname.push_back(']');
return tname;
}
/// get the type name for a type that has a value_type member
template <typename T,
enable_if_t<classify_object<T>::value == object_category::container_value ||
classify_object<T>::value == object_category::wrapper_value,
detail::enabler>>
inline std::string type_name() {
return type_name<typename T::value_type>();
}
// Lexical cast
/// Convert to an unsigned integral
template <typename T, enable_if_t<std::is_unsigned<T>::value, detail::enabler> = detail::dummy>
bool integral_conversion(const std::string &input, T &output) noexcept {
if(input.empty() || input.front() == '-') {
return false;
}
char *val = nullptr;
errno = 0;
std::uint64_t output_ll = std::strtoull(input.c_str(), &val, 0);
if(errno == ERANGE) {
return false;
}
output = static_cast<T>(output_ll);
if(val == (input.c_str() + input.size()) && static_cast<std::uint64_t>(output) == output_ll) {
return true;
}
val = nullptr;
std::int64_t output_sll = std::strtoll(input.c_str(), &val, 0);
if(val == (input.c_str() + input.size())) {
output = (output_sll < 0) ? static_cast<T>(0) : static_cast<T>(output_sll);
return (static_cast<std::int64_t>(output) == output_sll);
}
return false;
}
/// Convert to a signed integral
template <typename T, enable_if_t<std::is_signed<T>::value, detail::enabler> = detail::dummy>
bool integral_conversion(const std::string &input, T &output) noexcept {
if(input.empty()) {
return false;
}
char *val = nullptr;
errno = 0;
std::int64_t output_ll = std::strtoll(input.c_str(), &val, 0);
if(errno == ERANGE) {
return false;
}
output = static_cast<T>(output_ll);
if(val == (input.c_str() + input.size()) && static_cast<std::int64_t>(output) == output_ll) {
return true;
}
if(input == "true") {
// this is to deal with a few oddities with flags and wrapper int types
output = static_cast<T>(1);
return true;
}
return false;
}
/// Convert a flag into an integer value typically binary flags
inline std::int64_t to_flag_value(std::string val) {
static const std::string trueString("true");
static const std::string falseString("false");
if(val == trueString) {
return 1;
}
if(val == falseString) {
return -1;
}
val = detail::to_lower(val);
std::int64_t ret = 0;
if(val.size() == 1) {
if(val[0] >= '1' && val[0] <= '9') {
return (static_cast<std::int64_t>(val[0]) - '0');
}
switch(val[0]) {
case '0':
case 'f':
case 'n':
case '-':
ret = -1;
break;
case 't':
case 'y':
case '+':
ret = 1;
break;
default:
throw std::invalid_argument("unrecognized character");
}
return ret;
}
if(val == trueString || val == "on" || val == "yes" || val == "enable") {
ret = 1;
} else if(val == falseString || val == "off" || val == "no" || val == "disable") {
ret = -1;
} else {
ret = std::stoll(val);
}
return ret;
}
/// Integer conversion
template <typename T,
enable_if_t<classify_object<T>::value == object_category::integral_value ||
classify_object<T>::value == object_category::unsigned_integral,
detail::enabler> = detail::dummy>
bool lexical_cast(const std::string &input, T &output) {
return integral_conversion(input, output);
}
/// char values
template <typename T,
enable_if_t<classify_object<T>::value == object_category::char_value, detail::enabler> = detail::dummy>
bool lexical_cast(const std::string &input, T &output) {
if(input.size() == 1) {
output = static_cast<T>(input[0]);
return true;
}
return integral_conversion(input, output);
}
/// Boolean values
template <typename T,
enable_if_t<classify_object<T>::value == object_category::boolean_value, detail::enabler> = detail::dummy>
bool lexical_cast(const std::string &input, T &output) {
try {
auto out = to_flag_value(input);
output = (out > 0);
return true;
} catch(const std::invalid_argument &) {
return false;
} catch(const std::out_of_range &) {
// if the number is out of the range of a 64 bit value then it is still a number and for this purpose is still
// valid all we care about the sign
output = (input[0] != '-');
return true;
}
}
/// Floats
template <typename T,
enable_if_t<classify_object<T>::value == object_category::floating_point, detail::enabler> = detail::dummy>
bool lexical_cast(const std::string &input, T &output) {
if(input.empty()) {
return false;
}
char *val = nullptr;
auto output_ld = std::strtold(input.c_str(), &val);
output = static_cast<T>(output_ld);
return val == (input.c_str() + input.size());
}
/// complex
template <typename T,
enable_if_t<classify_object<T>::value == object_category::complex_number, detail::enabler> = detail::dummy>
bool lexical_cast(const std::string &input, T &output) {
using XC = typename wrapped_type<T, double>::type;
XC x{0.0}, y{0.0};
auto str1 = input;
bool worked = false;
auto nloc = str1.find_last_of("+-");
if(nloc != std::string::npos && nloc > 0) {
worked = lexical_cast(str1.substr(0, nloc), x);
str1 = str1.substr(nloc);
if(str1.back() == 'i' || str1.back() == 'j')
str1.pop_back();
worked = worked && lexical_cast(str1, y);
} else {
if(str1.back() == 'i' || str1.back() == 'j') {
str1.pop_back();
worked = lexical_cast(str1, y);
x = XC{0};
} else {
worked = lexical_cast(str1, x);
y = XC{0};
}
}
if(worked) {
output = T{x, y};
return worked;
}
return from_stream(input, output);
}
/// String and similar direct assignment
template <typename T,
enable_if_t<classify_object<T>::value == object_category::string_assignable, detail::enabler> = detail::dummy>
bool lexical_cast(const std::string &input, T &output) {
output = input;
return true;
}
/// String and similar constructible and copy assignment
template <
typename T,
enable_if_t<classify_object<T>::value == object_category::string_constructible, detail::enabler> = detail::dummy>
bool lexical_cast(const std::string &input, T &output) {
output = T(input);
return true;
}
/// Enumerations
template <typename T,
enable_if_t<classify_object<T>::value == object_category::enumeration, detail::enabler> = detail::dummy>
bool lexical_cast(const std::string &input, T &output) {
typename std::underlying_type<T>::type val;
if(!integral_conversion(input, val)) {
return false;
}
output = static_cast<T>(val);
return true;
}
/// wrapper types
template <typename T,
enable_if_t<classify_object<T>::value == object_category::wrapper_value &&
std::is_assignable<T &, typename T::value_type>::value,
detail::enabler> = detail::dummy>
bool lexical_cast(const std::string &input, T &output) {
typename T::value_type val;
if(lexical_cast(input, val)) {
output = val;
return true;
}
return from_stream(input, output);
}
template <typename T,
enable_if_t<classify_object<T>::value == object_category::wrapper_value &&
!std::is_assignable<T &, typename T::value_type>::value && std::is_assignable<T &, T>::value,
detail::enabler> = detail::dummy>
bool lexical_cast(const std::string &input, T &output) {
typename T::value_type val;
if(lexical_cast(input, val)) {
output = T{val};
return true;
}
return from_stream(input, output);
}
/// Assignable from double or int
template <
typename T,
enable_if_t<classify_object<T>::value == object_category::number_constructible, detail::enabler> = detail::dummy>
bool lexical_cast(const std::string &input, T &output) {
int val = 0;
if(integral_conversion(input, val)) {
output = T(val);
return true;
}
double dval = 0.0;
if(lexical_cast(input, dval)) {
output = T{dval};
return true;
}
return from_stream(input, output);
}
/// Assignable from int
template <
typename T,
enable_if_t<classify_object<T>::value == object_category::integer_constructible, detail::enabler> = detail::dummy>
bool lexical_cast(const std::string &input, T &output) {
int val = 0;
if(integral_conversion(input, val)) {
output = T(val);
return true;
}
return from_stream(input, output);
}
/// Assignable from double
template <
typename T,
enable_if_t<classify_object<T>::value == object_category::double_constructible, detail::enabler> = detail::dummy>
bool lexical_cast(const std::string &input, T &output) {
double val = 0.0;
if(lexical_cast(input, val)) {
output = T{val};
return true;
}
return from_stream(input, output);
}
/// Non-string convertible from an int
template <typename T,
enable_if_t<classify_object<T>::value == object_category::other && std::is_assignable<T &, int>::value,
detail::enabler> = detail::dummy>
bool lexical_cast(const std::string &input, T &output) {
int val = 0;
if(integral_conversion(input, val)) {
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4800)
#endif
// with Atomic<XX> this could produce a warning due to the conversion but if atomic gets here it is an old style
// so will most likely still work
output = val;
#ifdef _MSC_VER
#pragma warning(pop)
#endif
return true;
}
// LCOV_EXCL_START
// This version of cast is only used for odd cases in an older compilers the fail over
// from_stream is tested elsewhere an not relevant for coverage here
return from_stream(input, output);
// LCOV_EXCL_STOP
}
/// Non-string parsable by a stream
template <typename T,
enable_if_t<classify_object<T>::value == object_category::other && !std::is_assignable<T &, int>::value,
detail::enabler> = detail::dummy>
bool lexical_cast(const std::string &input, T &output) {
static_assert(is_istreamable<T>::value,
"option object type must have a lexical cast overload or streaming input operator(>>) defined, if it "
"is convertible from another type use the add_option<T, XC>(...) with XC being the known type");
return from_stream(input, output);
}
/// Assign a value through lexical cast operations
/// Strings can be empty so we need to do a little different
template <typename AssignTo,
typename ConvertTo,
enable_if_t<std::is_same<AssignTo, ConvertTo>::value &&
(classify_object<AssignTo>::value == object_category::string_assignable ||
classify_object<AssignTo>::value == object_category::string_constructible),
detail::enabler> = detail::dummy>
bool lexical_assign(const std::string &input, AssignTo &output) {
return lexical_cast(input, output);
}
/// Assign a value through lexical cast operations
template <typename AssignTo,
typename ConvertTo,
enable_if_t<std::is_same<AssignTo, ConvertTo>::value && std::is_assignable<AssignTo &, AssignTo>::value &&
classify_object<AssignTo>::value != object_category::string_assignable &&
classify_object<AssignTo>::value != object_category::string_constructible,
detail::enabler> = detail::dummy>
bool lexical_assign(const std::string &input, AssignTo &output) {
if(input.empty()) {
output = AssignTo{};
return true;
}
return lexical_cast(input, output);
}
/// Assign a value through lexical cast operations
template <typename AssignTo,
typename ConvertTo,
enable_if_t<std::is_same<AssignTo, ConvertTo>::value && !std::is_assignable<AssignTo &, AssignTo>::value &&
classify_object<AssignTo>::value == object_category::wrapper_value,
detail::enabler> = detail::dummy>
bool lexical_assign(const std::string &input, AssignTo &output) {
if(input.empty()) {
typename AssignTo::value_type emptyVal{};
output = emptyVal;
return true;
}
return lexical_cast(input, output);
}
/// Assign a value through lexical cast operations for int compatible values
/// mainly for atomic operations on some compilers
template <typename AssignTo,
typename ConvertTo,
enable_if_t<std::is_same<AssignTo, ConvertTo>::value && !std::is_assignable<AssignTo &, AssignTo>::value &&
classify_object<AssignTo>::value != object_category::wrapper_value &&
std::is_assignable<AssignTo &, int>::value,
detail::enabler> = detail::dummy>
bool lexical_assign(const std::string &input, AssignTo &output) {
if(input.empty()) {
output = 0;
return true;
}
int val = 0;
if(lexical_cast(input, val)) {
output = val;
return true;
}
return false;
}
/// Assign a value converted from a string in lexical cast to the output value directly
template <typename AssignTo,
typename ConvertTo,
enable_if_t<!std::is_same<AssignTo, ConvertTo>::value && std::is_assignable<AssignTo &, ConvertTo &>::value,
detail::enabler> = detail::dummy>
bool lexical_assign(const std::string &input, AssignTo &output) {
ConvertTo val{};
bool parse_result = (!input.empty()) ? lexical_cast(input, val) : true;
if(parse_result) {
output = val;
}
return parse_result;
}
/// Assign a value from a lexical cast through constructing a value and move assigning it
template <
typename AssignTo,
typename ConvertTo,
enable_if_t<!std::is_same<AssignTo, ConvertTo>::value && !std::is_assignable<AssignTo &, ConvertTo &>::value &&
std::is_move_assignable<AssignTo>::value,
detail::enabler> = detail::dummy>
bool lexical_assign(const std::string &input, AssignTo &output) {
ConvertTo val{};
bool parse_result = input.empty() ? true : lexical_cast(input, val);
if(parse_result) {
output = AssignTo(val); // use () form of constructor to allow some implicit conversions
}
return parse_result;
}
/// primary lexical conversion operation, 1 string to 1 type of some kind
template <typename AssignTo,
typename ConvertTo,
enable_if_t<classify_object<ConvertTo>::value <= object_category::other &&
classify_object<AssignTo>::value <= object_category::wrapper_value,
detail::enabler> = detail::dummy>
bool lexical_conversion(const std::vector<std ::string> &strings, AssignTo &output) {
return lexical_assign<AssignTo, ConvertTo>(strings[0], output);
}
/// Lexical conversion if there is only one element but the conversion type is for two, then call a two element
/// constructor
template <typename AssignTo,
typename ConvertTo,
enable_if_t<(type_count<AssignTo>::value <= 2) && expected_count<AssignTo>::value == 1 &&
is_tuple_like<ConvertTo>::value && type_count_base<ConvertTo>::value == 2,
detail::enabler> = detail::dummy>
bool lexical_conversion(const std::vector<std ::string> &strings, AssignTo &output) {
// the remove const is to handle pair types coming from a container
typename std::remove_const<typename std::tuple_element<0, ConvertTo>::type>::type v1;
typename std::tuple_element<1, ConvertTo>::type v2;
bool retval = lexical_assign<decltype(v1), decltype(v1)>(strings[0], v1);
if(strings.size() > 1) {
retval = retval && lexical_assign<decltype(v2), decltype(v2)>(strings[1], v2);
}
if(retval) {
output = AssignTo{v1, v2};
}
return retval;
}
/// Lexical conversion of a container types of single elements
template <class AssignTo,
class ConvertTo,
enable_if_t<is_mutable_container<AssignTo>::value && is_mutable_container<ConvertTo>::value &&
type_count<ConvertTo>::value == 1,
detail::enabler> = detail::dummy>
bool lexical_conversion(const std::vector<std ::string> &strings, AssignTo &output) {
output.erase(output.begin(), output.end());
if(strings.size() == 1 && strings[0] == "{}") {
return true;
}
bool skip_remaining = false;
if(strings.size() == 2 && strings[0] == "{}" && is_separator(strings[1])) {
skip_remaining = true;
}
for(const auto &elem : strings) {
typename AssignTo::value_type out;
bool retval = lexical_assign<typename AssignTo::value_type, typename ConvertTo::value_type>(elem, out);
if(!retval) {
return false;
}
output.insert(output.end(), std::move(out));
if(skip_remaining) {
break;
}
}
return (!output.empty());
}
/// Lexical conversion for complex types
template <class AssignTo, class ConvertTo, enable_if_t<is_complex<ConvertTo>::value, detail::enabler> = detail::dummy>
bool lexical_conversion(const std::vector<std::string> &strings, AssignTo &output) {
if(strings.size() >= 2 && !strings[1].empty()) {
using XC2 = typename wrapped_type<ConvertTo, double>::type;
XC2 x{0.0}, y{0.0};
auto str1 = strings[1];
if(str1.back() == 'i' || str1.back() == 'j') {
str1.pop_back();
}
auto worked = lexical_cast(strings[0], x) && lexical_cast(str1, y);
if(worked) {
output = ConvertTo{x, y};
}
return worked;
}
return lexical_assign<AssignTo, ConvertTo>(strings[0], output);
}
/// Conversion to a vector type using a particular single type as the conversion type
template <class AssignTo,
class ConvertTo,
enable_if_t<is_mutable_container<AssignTo>::value && (expected_count<ConvertTo>::value == 1) &&
(type_count<ConvertTo>::value == 1),
detail::enabler> = detail::dummy>
bool lexical_conversion(const std::vector<std ::string> &strings, AssignTo &output) {
bool retval = true;
output.clear();
output.reserve(strings.size());
for(const auto &elem : strings) {
output.emplace_back();
retval = retval && lexical_assign<typename AssignTo::value_type, ConvertTo>(elem, output.back());
}
return (!output.empty()) && retval;
}
// forward declaration
/// Lexical conversion of a container types with conversion type of two elements
template <class AssignTo,
class ConvertTo,
enable_if_t<is_mutable_container<AssignTo>::value && is_mutable_container<ConvertTo>::value &&
type_count_base<ConvertTo>::value == 2,
detail::enabler> = detail::dummy>
bool lexical_conversion(std::vector<std::string> strings, AssignTo &output);
/// Lexical conversion of a vector types with type_size >2 forward declaration
template <class AssignTo,
class ConvertTo,
enable_if_t<is_mutable_container<AssignTo>::value && is_mutable_container<ConvertTo>::value &&
type_count_base<ConvertTo>::value != 2 &&
((type_count<ConvertTo>::value > 2) ||
(type_count<ConvertTo>::value > type_count_base<ConvertTo>::value)),
detail::enabler> = detail::dummy>
bool lexical_conversion(const std::vector<std::string> &strings, AssignTo &output);
/// Conversion for tuples
template <class AssignTo,
class ConvertTo,
enable_if_t<is_tuple_like<AssignTo>::value && is_tuple_like<ConvertTo>::value &&
(type_count_base<ConvertTo>::value != type_count<ConvertTo>::value ||
type_count<ConvertTo>::value > 2),
detail::enabler> = detail::dummy>
bool lexical_conversion(const std::vector<std::string> &strings, AssignTo &output); // forward declaration
/// Conversion for operations where the assigned type is some class but the conversion is a mutable container or large
/// tuple
template <typename AssignTo,
typename ConvertTo,
enable_if_t<!is_tuple_like<AssignTo>::value && !is_mutable_container<AssignTo>::value &&
classify_object<ConvertTo>::value != object_category::wrapper_value &&
(is_mutable_container<ConvertTo>::value || type_count<ConvertTo>::value > 2),
detail::enabler> = detail::dummy>
bool lexical_conversion(const std::vector<std ::string> &strings, AssignTo &output) {
if(strings.size() > 1 || (!strings.empty() && !(strings.front().empty()))) {
ConvertTo val;
auto retval = lexical_conversion<ConvertTo, ConvertTo>(strings, val);
output = AssignTo{val};
return retval;
}
output = AssignTo{};
return true;
}
/// function template for converting tuples if the static Index is greater than the tuple size
template <class AssignTo, class ConvertTo, std::size_t I>
inline typename std::enable_if<(I >= type_count_base<AssignTo>::value), bool>::type
tuple_conversion(const std::vector<std::string> &, AssignTo &) {
return true;
}
/// Conversion of a tuple element where the type size ==1 and not a mutable container
template <class AssignTo, class ConvertTo>
inline typename std::enable_if<!is_mutable_container<ConvertTo>::value && type_count<ConvertTo>::value == 1, bool>::type
tuple_type_conversion(std::vector<std::string> &strings, AssignTo &output) {
auto retval = lexical_assign<AssignTo, ConvertTo>(strings[0], output);
strings.erase(strings.begin());
return retval;
}
/// Conversion of a tuple element where the type size !=1 but the size is fixed and not a mutable container
template <class AssignTo, class ConvertTo>
inline typename std::enable_if<!is_mutable_container<ConvertTo>::value && (type_count<ConvertTo>::value > 1) &&
type_count<ConvertTo>::value == type_count_min<ConvertTo>::value,
bool>::type
tuple_type_conversion(std::vector<std::string> &strings, AssignTo &output) {
auto retval = lexical_conversion<AssignTo, ConvertTo>(strings, output);
strings.erase(strings.begin(), strings.begin() + type_count<ConvertTo>::value);
return retval;
}
/// Conversion of a tuple element where the type is a mutable container or a type with different min and max type sizes
template <class AssignTo, class ConvertTo>
inline typename std::enable_if<is_mutable_container<ConvertTo>::value ||
type_count<ConvertTo>::value != type_count_min<ConvertTo>::value,
bool>::type
tuple_type_conversion(std::vector<std::string> &strings, AssignTo &output) {
std::size_t index{subtype_count_min<ConvertTo>::value};
const std::size_t mx_count{subtype_count<ConvertTo>::value};
const std::size_t mx{(std::max)(mx_count, strings.size())};
while(index < mx) {
if(is_separator(strings[index])) {
break;
}
++index;
}
bool retval = lexical_conversion<AssignTo, ConvertTo>(
std::vector<std::string>(strings.begin(), strings.begin() + static_cast<std::ptrdiff_t>(index)), output);
strings.erase(strings.begin(), strings.begin() + static_cast<std::ptrdiff_t>(index) + 1);
return retval;
}
/// Tuple conversion operation
template <class AssignTo, class ConvertTo, std::size_t I>
inline typename std::enable_if<(I < type_count_base<AssignTo>::value), bool>::type
tuple_conversion(std::vector<std::string> strings, AssignTo &output) {
bool retval = true;
using ConvertToElement = typename std::
conditional<is_tuple_like<ConvertTo>::value, typename std::tuple_element<I, ConvertTo>::type, ConvertTo>::type;
if(!strings.empty()) {
retval = retval && tuple_type_conversion<typename std::tuple_element<I, AssignTo>::type, ConvertToElement>(
strings, std::get<I>(output));
}
retval = retval && tuple_conversion<AssignTo, ConvertTo, I + 1>(std::move(strings), output);
return retval;
}
/// Lexical conversion of a container types with tuple elements of size 2
template <class AssignTo,
class ConvertTo,
enable_if_t<is_mutable_container<AssignTo>::value && is_mutable_container<ConvertTo>::value &&
type_count_base<ConvertTo>::value == 2,
detail::enabler>>
bool lexical_conversion(std::vector<std::string> strings, AssignTo &output) {
output.clear();
while(!strings.empty()) {
typename std::remove_const<typename std::tuple_element<0, typename ConvertTo::value_type>::type>::type v1;
typename std::tuple_element<1, typename ConvertTo::value_type>::type v2;
bool retval = tuple_type_conversion<decltype(v1), decltype(v1)>(strings, v1);
if(!strings.empty()) {
retval = retval && tuple_type_conversion<decltype(v2), decltype(v2)>(strings, v2);
}
if(retval) {
output.insert(output.end(), typename AssignTo::value_type{v1, v2});
} else {
return false;
}
}
return (!output.empty());
}
/// lexical conversion of tuples with type count>2 or tuples of types of some element with a type size>=2
template <class AssignTo,
class ConvertTo,
enable_if_t<is_tuple_like<AssignTo>::value && is_tuple_like<ConvertTo>::value &&
(type_count_base<ConvertTo>::value != type_count<ConvertTo>::value ||
type_count<ConvertTo>::value > 2),
detail::enabler>>
bool lexical_conversion(const std::vector<std ::string> &strings, AssignTo &output) {
static_assert(
!is_tuple_like<ConvertTo>::value || type_count_base<AssignTo>::value == type_count_base<ConvertTo>::value,
"if the conversion type is defined as a tuple it must be the same size as the type you are converting to");
return tuple_conversion<AssignTo, ConvertTo, 0>(strings, output);
}
/// Lexical conversion of a vector types for everything but tuples of two elements and types of size 1
template <class AssignTo,
class ConvertTo,
enable_if_t<is_mutable_container<AssignTo>::value && is_mutable_container<ConvertTo>::value &&
type_count_base<ConvertTo>::value != 2 &&
((type_count<ConvertTo>::value > 2) ||
(type_count<ConvertTo>::value > type_count_base<ConvertTo>::value)),
detail::enabler>>
bool lexical_conversion(const std::vector<std ::string> &strings, AssignTo &output) {
bool retval = true;
output.clear();
std::vector<std::string> temp;
std::size_t ii{0};
std::size_t icount{0};
std::size_t xcm{type_count<ConvertTo>::value};
auto ii_max = strings.size();
while(ii < ii_max) {
temp.push_back(strings[ii]);
++ii;
++icount;
if(icount == xcm || is_separator(temp.back()) || ii == ii_max) {
if(static_cast<int>(xcm) > type_count_min<ConvertTo>::value && is_separator(temp.back())) {
temp.pop_back();
}
typename AssignTo::value_type temp_out;
retval = retval &&
lexical_conversion<typename AssignTo::value_type, typename ConvertTo::value_type>(temp, temp_out);
temp.clear();
if(!retval) {
return false;
}
output.insert(output.end(), std::move(temp_out));
icount = 0;
}
}
return retval;
}
/// conversion for wrapper types
template <typename AssignTo,
class ConvertTo,
enable_if_t<classify_object<ConvertTo>::value == object_category::wrapper_value &&
std::is_assignable<ConvertTo &, ConvertTo>::value,
detail::enabler> = detail::dummy>
bool lexical_conversion(const std::vector<std::string> &strings, AssignTo &output) {
if(strings.empty() || strings.front().empty()) {
output = ConvertTo{};
return true;
}
typename ConvertTo::value_type val;
if(lexical_conversion<typename ConvertTo::value_type, typename ConvertTo::value_type>(strings, val)) {
output = ConvertTo{val};
return true;
}
return false;
}
/// conversion for wrapper types
template <typename AssignTo,
class ConvertTo,
enable_if_t<classify_object<ConvertTo>::value == object_category::wrapper_value &&
!std::is_assignable<AssignTo &, ConvertTo>::value,
detail::enabler> = detail::dummy>
bool lexical_conversion(const std::vector<std::string> &strings, AssignTo &output) {
using ConvertType = typename ConvertTo::value_type;
if(strings.empty() || strings.front().empty()) {
output = ConvertType{};
return true;
}
ConvertType val;
if(lexical_conversion<typename ConvertTo::value_type, typename ConvertTo::value_type>(strings, val)) {
output = val;
return true;
}
return false;
}
/// Sum a vector of strings
inline std::string sum_string_vector(const std::vector<std::string> &values) {
double val{0.0};
bool fail{false};
std::string output;
for(const auto &arg : values) {
double tv{0.0};
auto comp = lexical_cast(arg, tv);
if(!comp) {
try {
tv = static_cast<double>(detail::to_flag_value(arg));
} catch(const std::exception &) {
fail = true;
break;
}
}
val += tv;
}
if(fail) {
for(const auto &arg : values) {
output.append(arg);
}
} else {
if(val <= static_cast<double>((std::numeric_limits<std::int64_t>::min)()) ||
val >= static_cast<double>((std::numeric_limits<std::int64_t>::max)()) ||
std::ceil(val) == std::floor(val)) {
output = detail::value_string(static_cast<int64_t>(val));
} else {
output = detail::value_string(val);
}
}
return output;
}
} // namespace detail
namespace detail {
// Returns false if not a short option. Otherwise, sets opt name and rest and returns true
CLI11_INLINE bool split_short(const std::string ¤t, std::string &name, std::string &rest);
// Returns false if not a long option. Otherwise, sets opt name and other side of = and returns true
CLI11_INLINE bool split_long(const std::string ¤t, std::string &name, std::string &value);
// Returns false if not a windows style option. Otherwise, sets opt name and value and returns true
CLI11_INLINE bool split_windows_style(const std::string ¤t, std::string &name, std::string &value);
// Splits a string into multiple long and short names
CLI11_INLINE std::vector<std::string> split_names(std::string current);
/// extract default flag values either {def} or starting with a !
CLI11_INLINE std::vector<std::pair<std::string, std::string>> get_default_flag_values(const std::string &str);
/// Get a vector of short names, one of long names, and a single name
CLI11_INLINE std::tuple<std::vector<std::string>, std::vector<std::string>, std::string>
get_names(const std::vector<std::string> &input);
} // namespace detail
namespace detail {
CLI11_INLINE bool split_short(const std::string ¤t, std::string &name, std::string &rest) {
if(current.size() > 1 && current[0] == '-' && valid_first_char(current[1])) {
name = current.substr(1, 1);
rest = current.substr(2);
return true;
}
return false;
}
CLI11_INLINE bool split_long(const std::string ¤t, std::string &name, std::string &value) {
if(current.size() > 2 && current.substr(0, 2) == "--" && valid_first_char(current[2])) {
auto loc = current.find_first_of('=');
if(loc != std::string::npos) {
name = current.substr(2, loc - 2);
value = current.substr(loc + 1);
} else {
name = current.substr(2);
value = "";
}
return true;
}
return false;
}
CLI11_INLINE bool split_windows_style(const std::string ¤t, std::string &name, std::string &value) {
if(current.size() > 1 && current[0] == '/' && valid_first_char(current[1])) {
auto loc = current.find_first_of(':');
if(loc != std::string::npos) {
name = current.substr(1, loc - 1);
value = current.substr(loc + 1);
} else {
name = current.substr(1);
value = "";
}
return true;
}
return false;
}
CLI11_INLINE std::vector<std::string> split_names(std::string current) {
std::vector<std::string> output;
std::size_t val = 0;
while((val = current.find(',')) != std::string::npos) {
output.push_back(trim_copy(current.substr(0, val)));
current = current.substr(val + 1);
}
output.push_back(trim_copy(current));
return output;
}
CLI11_INLINE std::vector<std::pair<std::string, std::string>> get_default_flag_values(const std::string &str) {
std::vector<std::string> flags = split_names(str);
flags.erase(std::remove_if(flags.begin(),
flags.end(),
[](const std::string &name) {
return ((name.empty()) || (!(((name.find_first_of('{') != std::string::npos) &&
(name.back() == '}')) ||
(name[0] == '!'))));
}),
flags.end());
std::vector<std::pair<std::string, std::string>> output;
output.reserve(flags.size());
for(auto &flag : flags) {
auto def_start = flag.find_first_of('{');
std::string defval = "false";
if((def_start != std::string::npos) && (flag.back() == '}')) {
defval = flag.substr(def_start + 1);
defval.pop_back();
flag.erase(def_start, std::string::npos); // NOLINT(readability-suspicious-call-argument)
}
flag.erase(0, flag.find_first_not_of("-!"));
output.emplace_back(flag, defval);
}
return output;
}
CLI11_INLINE std::tuple<std::vector<std::string>, std::vector<std::string>, std::string>
get_names(const std::vector<std::string> &input) {
std::vector<std::string> short_names;
std::vector<std::string> long_names;
std::string pos_name;
for(std::string name : input) {
if(name.length() == 0) {
continue;
}
if(name.length() > 1 && name[0] == '-' && name[1] != '-') {
if(name.length() == 2 && valid_first_char(name[1]))
short_names.emplace_back(1, name[1]);
else
throw BadNameString::OneCharName(name);
} else if(name.length() > 2 && name.substr(0, 2) == "--") {
name = name.substr(2);
if(valid_name_string(name))
long_names.push_back(name);
else
throw BadNameString::BadLongName(name);
} else if(name == "-" || name == "--") {
throw BadNameString::DashesOnly(name);
} else {
if(pos_name.length() > 0)
throw BadNameString::MultiPositionalNames(name);
pos_name = name;
}
}
return std::make_tuple(short_names, long_names, pos_name);
}
} // namespace detail
class App;
/// Holds values to load into Options
struct ConfigItem {
/// This is the list of parents
std::vector<std::string> parents{};
/// This is the name
std::string name{};
/// Listing of inputs
std::vector<std::string> inputs{};
/// The list of parents and name joined by "."
CLI11_NODISCARD std::string fullname() const {
std::vector<std::string> tmp = parents;
tmp.emplace_back(name);
return detail::join(tmp, ".");
}
};
/// This class provides a converter for configuration files.
class Config {
protected:
std::vector<ConfigItem> items{};
public:
/// Convert an app into a configuration
virtual std::string to_config(const App *, bool, bool, std::string) const = 0;
/// Convert a configuration into an app
virtual std::vector<ConfigItem> from_config(std::istream &) const = 0;
/// Get a flag value
CLI11_NODISCARD virtual std::string to_flag(const ConfigItem &item) const {
if(item.inputs.size() == 1) {
return item.inputs.at(0);
}
if(item.inputs.empty()) {
return "{}";
}
throw ConversionError::TooManyInputsFlag(item.fullname()); // LCOV_EXCL_LINE
}
/// Parse a config file, throw an error (ParseError:ConfigParseError or FileError) on failure
CLI11_NODISCARD std::vector<ConfigItem> from_file(const std::string &name) const {
std::ifstream input{name};
if(!input.good())
throw FileError::Missing(name);
return from_config(input);
}
/// Virtual destructor
virtual ~Config() = default;
};
/// This converter works with INI/TOML files; to write INI files use ConfigINI
class ConfigBase : public Config {
protected:
/// the character used for comments
char commentChar = '#';
/// the character used to start an array '\0' is a default to not use
char arrayStart = '[';
/// the character used to end an array '\0' is a default to not use
char arrayEnd = ']';
/// the character used to separate elements in an array
char arraySeparator = ',';
/// the character used separate the name from the value
char valueDelimiter = '=';
/// the character to use around strings
char stringQuote = '"';
/// the character to use around single characters
char characterQuote = '\'';
/// the maximum number of layers to allow
uint8_t maximumLayers{255};
/// the separator used to separator parent layers
char parentSeparatorChar{'.'};
/// Specify the configuration index to use for arrayed sections
int16_t configIndex{-1};
/// Specify the configuration section that should be used
std::string configSection{};
public:
std::string
to_config(const App * /*app*/, bool default_also, bool write_description, std::string prefix) const override;
std::vector<ConfigItem> from_config(std::istream &input) const override;
/// Specify the configuration for comment characters
ConfigBase *comment(char cchar) {
commentChar = cchar;
return this;
}
/// Specify the start and end characters for an array
ConfigBase *arrayBounds(char aStart, char aEnd) {
arrayStart = aStart;
arrayEnd = aEnd;
return this;
}
/// Specify the delimiter character for an array
ConfigBase *arrayDelimiter(char aSep) {
arraySeparator = aSep;
return this;
}
/// Specify the delimiter between a name and value
ConfigBase *valueSeparator(char vSep) {
valueDelimiter = vSep;
return this;
}
/// Specify the quote characters used around strings and characters
ConfigBase *quoteCharacter(char qString, char qChar) {
stringQuote = qString;
characterQuote = qChar;
return this;
}
/// Specify the maximum number of parents
ConfigBase *maxLayers(uint8_t layers) {
maximumLayers = layers;
return this;
}
/// Specify the separator to use for parent layers
ConfigBase *parentSeparator(char sep) {
parentSeparatorChar = sep;
return this;
}
/// get a reference to the configuration section
std::string §ionRef() { return configSection; }
/// get the section
CLI11_NODISCARD const std::string §ion() const { return configSection; }
/// specify a particular section of the configuration file to use
ConfigBase *section(const std::string §ionName) {
configSection = sectionName;
return this;
}
/// get a reference to the configuration index
int16_t &indexRef() { return configIndex; }
/// get the section index
CLI11_NODISCARD int16_t index() const { return configIndex; }
/// specify a particular index in the section to use (-1) for all sections to use
ConfigBase *index(int16_t sectionIndex) {
configIndex = sectionIndex;
return this;
}
};
/// the default Config is the TOML file format
using ConfigTOML = ConfigBase;
/// ConfigINI generates a "standard" INI compliant output
class ConfigINI : public ConfigTOML {
public:
ConfigINI() {
commentChar = ';';
arrayStart = '\0';
arrayEnd = '\0';
arraySeparator = ' ';
valueDelimiter = '=';
}
};
class Option;
/// @defgroup validator_group Validators
/// @brief Some validators that are provided
///
/// These are simple `std::string(const std::string&)` validators that are useful. They return
/// a string if the validation fails. A custom struct is provided, as well, with the same user
/// semantics, but with the ability to provide a new type name.
/// @{
///
class Validator {
protected:
/// This is the description function, if empty the description_ will be used
std::function<std::string()> desc_function_{[]() { return std::string{}; }};
/// This is the base function that is to be called.
/// Returns a string error message if validation fails.
std::function<std::string(std::string &)> func_{[](std::string &) { return std::string{}; }};
/// The name for search purposes of the Validator
std::string name_{};
/// A Validator will only apply to an indexed value (-1 is all elements)
int application_index_ = -1;
/// Enable for Validator to allow it to be disabled if need be
bool active_{true};
/// specify that a validator should not modify the input
bool non_modifying_{false};
Validator(std::string validator_desc, std::function<std::string(std::string &)> func)
: desc_function_([validator_desc]() { return validator_desc; }), func_(std::move(func)) {}
public:
Validator() = default;
/// Construct a Validator with just the description string
explicit Validator(std::string validator_desc) : desc_function_([validator_desc]() { return validator_desc; }) {}
/// Construct Validator from basic information
Validator(std::function<std::string(std::string &)> op, std::string validator_desc, std::string validator_name = "")
: desc_function_([validator_desc]() { return validator_desc; }), func_(std::move(op)),
name_(std::move(validator_name)) {}
/// Set the Validator operation function
Validator &operation(std::function<std::string(std::string &)> op) {
func_ = std::move(op);
return *this;
}
/// This is the required operator for a Validator - provided to help
/// users (CLI11 uses the member `func` directly)
std::string operator()(std::string &str) const;
/// This is the required operator for a Validator - provided to help
/// users (CLI11 uses the member `func` directly)
std::string operator()(const std::string &str) const {
std::string value = str;
return (active_) ? func_(value) : std::string{};
}
/// Specify the type string
Validator &description(std::string validator_desc) {
desc_function_ = [validator_desc]() { return validator_desc; };
return *this;
}
/// Specify the type string
CLI11_NODISCARD Validator description(std::string validator_desc) const;
/// Generate type description information for the Validator
CLI11_NODISCARD std::string get_description() const {
if(active_) {
return desc_function_();
}
return std::string{};
}
/// Specify the type string
Validator &name(std::string validator_name) {
name_ = std::move(validator_name);
return *this;
}
/// Specify the type string
CLI11_NODISCARD Validator name(std::string validator_name) const {
Validator newval(*this);
newval.name_ = std::move(validator_name);
return newval;
}
/// Get the name of the Validator
CLI11_NODISCARD const std::string &get_name() const { return name_; }
/// Specify whether the Validator is active or not
Validator &active(bool active_val = true) {
active_ = active_val;
return *this;
}
/// Specify whether the Validator is active or not
CLI11_NODISCARD Validator active(bool active_val = true) const {
Validator newval(*this);
newval.active_ = active_val;
return newval;
}
/// Specify whether the Validator can be modifying or not
Validator &non_modifying(bool no_modify = true) {
non_modifying_ = no_modify;
return *this;
}
/// Specify the application index of a validator
Validator &application_index(int app_index) {
application_index_ = app_index;
return *this;
}
/// Specify the application index of a validator
CLI11_NODISCARD Validator application_index(int app_index) const {
Validator newval(*this);
newval.application_index_ = app_index;
return newval;
}
/// Get the current value of the application index
CLI11_NODISCARD int get_application_index() const { return application_index_; }
/// Get a boolean if the validator is active
CLI11_NODISCARD bool get_active() const { return active_; }
/// Get a boolean if the validator is allowed to modify the input returns true if it can modify the input
CLI11_NODISCARD bool get_modifying() const { return !non_modifying_; }
/// Combining validators is a new validator. Type comes from left validator if function, otherwise only set if the
/// same.
Validator operator&(const Validator &other) const;
/// Combining validators is a new validator. Type comes from left validator if function, otherwise only set if the
/// same.
Validator operator|(const Validator &other) const;
/// Create a validator that fails when a given validator succeeds
Validator operator!() const;
private:
void _merge_description(const Validator &val1, const Validator &val2, const std::string &merger);
};
/// Class wrapping some of the accessors of Validator
class CustomValidator : public Validator {
public:
};
// The implementation of the built in validators is using the Validator class;
// the user is only expected to use the const (static) versions (since there's no setup).
// Therefore, this is in detail.
namespace detail {
/// CLI enumeration of different file types
enum class path_type { nonexistent, file, directory };
/// get the type of the path from a file name
CLI11_INLINE path_type check_path(const char *file) noexcept;
/// Check for an existing file (returns error message if check fails)
class ExistingFileValidator : public Validator {
public:
ExistingFileValidator();
};
/// Check for an existing directory (returns error message if check fails)
class ExistingDirectoryValidator : public Validator {
public:
ExistingDirectoryValidator();
};
/// Check for an existing path
class ExistingPathValidator : public Validator {
public:
ExistingPathValidator();
};
/// Check for an non-existing path
class NonexistentPathValidator : public Validator {
public:
NonexistentPathValidator();
};
/// Validate the given string is a legal ipv4 address
class IPV4Validator : public Validator {
public:
IPV4Validator();
};
} // namespace detail
// Static is not needed here, because global const implies static.
/// Check for existing file (returns error message if check fails)
const detail::ExistingFileValidator ExistingFile;
/// Check for an existing directory (returns error message if check fails)
const detail::ExistingDirectoryValidator ExistingDirectory;
/// Check for an existing path
const detail::ExistingPathValidator ExistingPath;
/// Check for an non-existing path
const detail::NonexistentPathValidator NonexistentPath;
/// Check for an IP4 address
const detail::IPV4Validator ValidIPV4;
/// Validate the input as a particular type
template <typename DesiredType> class TypeValidator : public Validator {
public:
explicit TypeValidator(const std::string &validator_name)
: Validator(validator_name, [](std::string &input_string) {
using CLI::detail::lexical_cast;
auto val = DesiredType();
if(!lexical_cast(input_string, val)) {
return std::string("Failed parsing ") + input_string + " as a " + detail::type_name<DesiredType>();
}
return std::string();
}) {}
TypeValidator() : TypeValidator(detail::type_name<DesiredType>()) {}
};
/// Check for a number
const TypeValidator<double> Number("NUMBER");
/// Modify a path if the file is a particular default location, can be used as Check or transform
/// with the error return optionally disabled
class FileOnDefaultPath : public Validator {
public:
explicit FileOnDefaultPath(std::string default_path, bool enableErrorReturn = true);
};
/// Produce a range (factory). Min and max are inclusive.
class Range : public Validator {
public:
/// This produces a range with min and max inclusive.
///
/// Note that the constructor is templated, but the struct is not, so C++17 is not
/// needed to provide nice syntax for Range(a,b).
template <typename T>
Range(T min_val, T max_val, const std::string &validator_name = std::string{}) : Validator(validator_name) {
if(validator_name.empty()) {
std::stringstream out;
out << detail::type_name<T>() << " in [" << min_val << " - " << max_val << "]";
description(out.str());
}
func_ = [min_val, max_val](std::string &input) {
using CLI::detail::lexical_cast;
T val;
bool converted = lexical_cast(input, val);
if((!converted) || (val < min_val || val > max_val)) {
std::stringstream out;
out << "Value " << input << " not in range [";
out << min_val << " - " << max_val << "]";
return out.str();
}
return std::string{};
};
}
/// Range of one value is 0 to value
template <typename T>
explicit Range(T max_val, const std::string &validator_name = std::string{})
: Range(static_cast<T>(0), max_val, validator_name) {}
};
/// Check for a non negative number
const Range NonNegativeNumber((std::numeric_limits<double>::max)(), "NONNEGATIVE");
/// Check for a positive valued number (val>0.0), <double>::min here is the smallest positive number
const Range PositiveNumber((std::numeric_limits<double>::min)(), (std::numeric_limits<double>::max)(), "POSITIVE");
/// Produce a bounded range (factory). Min and max are inclusive.
class Bound : public Validator {
public:
/// This bounds a value with min and max inclusive.
///
/// Note that the constructor is templated, but the struct is not, so C++17 is not
/// needed to provide nice syntax for Range(a,b).
template <typename T> Bound(T min_val, T max_val) {
std::stringstream out;
out << detail::type_name<T>() << " bounded to [" << min_val << " - " << max_val << "]";
description(out.str());
func_ = [min_val, max_val](std::string &input) {
using CLI::detail::lexical_cast;
T val;
bool converted = lexical_cast(input, val);
if(!converted) {
return std::string("Value ") + input + " could not be converted";
}
if(val < min_val)
input = detail::to_string(min_val);
else if(val > max_val)
input = detail::to_string(max_val);
return std::string{};
};
}
/// Range of one value is 0 to value
template <typename T> explicit Bound(T max_val) : Bound(static_cast<T>(0), max_val) {}
};
namespace detail {
template <typename T,
enable_if_t<is_copyable_ptr<typename std::remove_reference<T>::type>::value, detail::enabler> = detail::dummy>
auto smart_deref(T value) -> decltype(*value) {
return *value;
}
template <
typename T,
enable_if_t<!is_copyable_ptr<typename std::remove_reference<T>::type>::value, detail::enabler> = detail::dummy>
typename std::remove_reference<T>::type &smart_deref(T &value) {
return value;
}
/// Generate a string representation of a set
template <typename T> std::string generate_set(const T &set) {
using element_t = typename detail::element_type<T>::type;
using iteration_type_t = typename detail::pair_adaptor<element_t>::value_type; // the type of the object pair
std::string out(1, '{');
out.append(detail::join(
detail::smart_deref(set),
[](const iteration_type_t &v) { return detail::pair_adaptor<element_t>::first(v); },
","));
out.push_back('}');
return out;
}
/// Generate a string representation of a map
template <typename T> std::string generate_map(const T &map, bool key_only = false) {
using element_t = typename detail::element_type<T>::type;
using iteration_type_t = typename detail::pair_adaptor<element_t>::value_type; // the type of the object pair
std::string out(1, '{');
out.append(detail::join(
detail::smart_deref(map),
[key_only](const iteration_type_t &v) {
std::string res{detail::to_string(detail::pair_adaptor<element_t>::first(v))};
if(!key_only) {
res.append("->");
res += detail::to_string(detail::pair_adaptor<element_t>::second(v));
}
return res;
},
","));
out.push_back('}');
return out;
}
template <typename C, typename V> struct has_find {
template <typename CC, typename VV>
static auto test(int) -> decltype(std::declval<CC>().find(std::declval<VV>()), std::true_type());
template <typename, typename> static auto test(...) -> decltype(std::false_type());
static const auto value = decltype(test<C, V>(0))::value;
using type = std::integral_constant<bool, value>;
};
/// A search function
template <typename T, typename V, enable_if_t<!has_find<T, V>::value, detail::enabler> = detail::dummy>
auto search(const T &set, const V &val) -> std::pair<bool, decltype(std::begin(detail::smart_deref(set)))> {
using element_t = typename detail::element_type<T>::type;
auto &setref = detail::smart_deref(set);
auto it = std::find_if(std::begin(setref), std::end(setref), [&val](decltype(*std::begin(setref)) v) {
return (detail::pair_adaptor<element_t>::first(v) == val);
});
return {(it != std::end(setref)), it};
}
/// A search function that uses the built in find function
template <typename T, typename V, enable_if_t<has_find<T, V>::value, detail::enabler> = detail::dummy>
auto search(const T &set, const V &val) -> std::pair<bool, decltype(std::begin(detail::smart_deref(set)))> {
auto &setref = detail::smart_deref(set);
auto it = setref.find(val);
return {(it != std::end(setref)), it};
}
/// A search function with a filter function
template <typename T, typename V>
auto search(const T &set, const V &val, const std::function<V(V)> &filter_function)
-> std::pair<bool, decltype(std::begin(detail::smart_deref(set)))> {
using element_t = typename detail::element_type<T>::type;
// do the potentially faster first search
auto res = search(set, val);
if((res.first) || (!(filter_function))) {
return res;
}
// if we haven't found it do the longer linear search with all the element translations
auto &setref = detail::smart_deref(set);
auto it = std::find_if(std::begin(setref), std::end(setref), [&](decltype(*std::begin(setref)) v) {
V a{detail::pair_adaptor<element_t>::first(v)};
a = filter_function(a);
return (a == val);
});
return {(it != std::end(setref)), it};
}
// the following suggestion was made by Nikita Ofitserov(@himikof)
// done in templates to prevent compiler warnings on negation of unsigned numbers
/// Do a check for overflow on signed numbers
template <typename T>
inline typename std::enable_if<std::is_signed<T>::value, T>::type overflowCheck(const T &a, const T &b) {
if((a > 0) == (b > 0)) {
return ((std::numeric_limits<T>::max)() / (std::abs)(a) < (std::abs)(b));
}
return ((std::numeric_limits<T>::min)() / (std::abs)(a) > -(std::abs)(b));
}
/// Do a check for overflow on unsigned numbers
template <typename T>
inline typename std::enable_if<!std::is_signed<T>::value, T>::type overflowCheck(const T &a, const T &b) {
return ((std::numeric_limits<T>::max)() / a < b);
}
/// Performs a *= b; if it doesn't cause integer overflow. Returns false otherwise.
template <typename T> typename std::enable_if<std::is_integral<T>::value, bool>::type checked_multiply(T &a, T b) {
if(a == 0 || b == 0 || a == 1 || b == 1) {
a *= b;
return true;
}
if(a == (std::numeric_limits<T>::min)() || b == (std::numeric_limits<T>::min)()) {
return false;
}
if(overflowCheck(a, b)) {
return false;
}
a *= b;
return true;
}
/// Performs a *= b; if it doesn't equal infinity. Returns false otherwise.
template <typename T>
typename std::enable_if<std::is_floating_point<T>::value, bool>::type checked_multiply(T &a, T b) {
T c = a * b;
if(std::isinf(c) && !std::isinf(a) && !std::isinf(b)) {
return false;
}
a = c;
return true;
}
} // namespace detail
/// Verify items are in a set
class IsMember : public Validator {
public:
using filter_fn_t = std::function<std::string(std::string)>;
/// This allows in-place construction using an initializer list
template <typename T, typename... Args>
IsMember(std::initializer_list<T> values, Args &&...args)
: IsMember(std::vector<T>(values), std::forward<Args>(args)...) {}
/// This checks to see if an item is in a set (empty function)
template <typename T> explicit IsMember(T &&set) : IsMember(std::forward<T>(set), nullptr) {}
/// 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.
template <typename T, typename F> explicit IsMember(T set, F filter_function) {
// Get the type of the contained item - requires a container have ::value_type
// if the type does not have first_type and second_type, these are both value_type
using element_t = typename detail::element_type<T>::type; // Removes (smart) pointers if needed
using item_t = typename detail::pair_adaptor<element_t>::first_type; // Is value_type if not a map
using local_item_t = typename IsMemberType<item_t>::type; // This will convert bad types to good ones
// (const char * to std::string)
// Make a local copy of the filter function, using a std::function if not one already
std::function<local_item_t(local_item_t)> filter_fn = filter_function;
// This is the type name for help, it will take the current version of the set contents
desc_function_ = [set]() { return detail::generate_set(detail::smart_deref(set)); };
// This is the function that validates
// It stores a copy of the set pointer-like, so shared_ptr will stay alive
func_ = [set, filter_fn](std::string &input) {
using CLI::detail::lexical_cast;
local_item_t b;
if(!lexical_cast(input, b)) {
throw ValidationError(input); // name is added later
}
if(filter_fn) {
b = filter_fn(b);
}
auto res = detail::search(set, b, filter_fn);
if(res.first) {
// Make sure the version in the input string is identical to the one in the set
if(filter_fn) {
input = detail::value_string(detail::pair_adaptor<element_t>::first(*(res.second)));
}
// Return empty error string (success)
return std::string{};
}
// If you reach this point, the result was not found
return input + " not in " + detail::generate_set(detail::smart_deref(set));
};
}
/// You can pass in as many filter functions as you like, they nest (string only currently)
template <typename T, typename... Args>
IsMember(T &&set, filter_fn_t filter_fn_1, filter_fn_t filter_fn_2, Args &&...other)
: IsMember(
std::forward<T>(set),
[filter_fn_1, filter_fn_2](std::string a) { return filter_fn_2(filter_fn_1(a)); },
other...) {}
};
/// definition of the default transformation object
template <typename T> using TransformPairs = std::vector<std::pair<std::string, T>>;
/// Translate named items to other or a value set
class Transformer : public Validator {
public:
using filter_fn_t = std::function<std::string(std::string)>;
/// This allows in-place construction
template <typename... Args>
Transformer(std::initializer_list<std::pair<std::string, std::string>> values, Args &&...args)
: Transformer(TransformPairs<std::string>(values), std::forward<Args>(args)...) {}
/// direct map of std::string to std::string
template <typename T> explicit Transformer(T &&mapping) : Transformer(std::forward<T>(mapping), nullptr) {}
/// 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.
template <typename T, typename F> explicit Transformer(T mapping, F filter_function) {
static_assert(detail::pair_adaptor<typename detail::element_type<T>::type>::value,
"mapping must produce value pairs");
// Get the type of the contained item - requires a container have ::value_type
// if the type does not have first_type and second_type, these are both value_type
using element_t = typename detail::element_type<T>::type; // Removes (smart) pointers if needed
using item_t = typename detail::pair_adaptor<element_t>::first_type; // Is value_type if not a map
using local_item_t = typename IsMemberType<item_t>::type; // Will convert bad types to good ones
// (const char * to std::string)
// Make a local copy of the filter function, using a std::function if not one already
std::function<local_item_t(local_item_t)> filter_fn = filter_function;
// This is the type name for help, it will take the current version of the set contents
desc_function_ = [mapping]() { return detail::generate_map(detail::smart_deref(mapping)); };
func_ = [mapping, filter_fn](std::string &input) {
using CLI::detail::lexical_cast;
local_item_t b;
if(!lexical_cast(input, b)) {
return std::string();
// there is no possible way we can match anything in the mapping if we can't convert so just return
}
if(filter_fn) {
b = filter_fn(b);
}
auto res = detail::search(mapping, b, filter_fn);
if(res.first) {
input = detail::value_string(detail::pair_adaptor<element_t>::second(*res.second));
}
return std::string{};
};
}
/// You can pass in as many filter functions as you like, they nest
template <typename T, typename... Args>
Transformer(T &&mapping, filter_fn_t filter_fn_1, filter_fn_t filter_fn_2, Args &&...other)
: Transformer(
std::forward<T>(mapping),
[filter_fn_1, filter_fn_2](std::string a) { return filter_fn_2(filter_fn_1(a)); },
other...) {}
};
/// translate named items to other or a value set
class CheckedTransformer : public Validator {
public:
using filter_fn_t = std::function<std::string(std::string)>;
/// This allows in-place construction
template <typename... Args>
CheckedTransformer(std::initializer_list<std::pair<std::string, std::string>> values, Args &&...args)
: CheckedTransformer(TransformPairs<std::string>(values), std::forward<Args>(args)...) {}
/// direct map of std::string to std::string
template <typename T> explicit CheckedTransformer(T mapping) : CheckedTransformer(std::move(mapping), nullptr) {}
/// 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.
template <typename T, typename F> explicit CheckedTransformer(T mapping, F filter_function) {
static_assert(detail::pair_adaptor<typename detail::element_type<T>::type>::value,
"mapping must produce value pairs");
// Get the type of the contained item - requires a container have ::value_type
// if the type does not have first_type and second_type, these are both value_type
using element_t = typename detail::element_type<T>::type; // Removes (smart) pointers if needed
using item_t = typename detail::pair_adaptor<element_t>::first_type; // Is value_type if not a map
using local_item_t = typename IsMemberType<item_t>::type; // Will convert bad types to good ones
// (const char * to std::string)
using iteration_type_t = typename detail::pair_adaptor<element_t>::value_type; // the type of the object pair
// Make a local copy of the filter function, using a std::function if not one already
std::function<local_item_t(local_item_t)> filter_fn = filter_function;
auto tfunc = [mapping]() {
std::string out("value in ");
out += detail::generate_map(detail::smart_deref(mapping)) + " OR {";
out += detail::join(
detail::smart_deref(mapping),
[](const iteration_type_t &v) { return detail::to_string(detail::pair_adaptor<element_t>::second(v)); },
",");
out.push_back('}');
return out;
};
desc_function_ = tfunc;
func_ = [mapping, tfunc, filter_fn](std::string &input) {
using CLI::detail::lexical_cast;
local_item_t b;
bool converted = lexical_cast(input, b);
if(converted) {
if(filter_fn) {
b = filter_fn(b);
}
auto res = detail::search(mapping, b, filter_fn);
if(res.first) {
input = detail::value_string(detail::pair_adaptor<element_t>::second(*res.second));
return std::string{};
}
}
for(const auto &v : detail::smart_deref(mapping)) {
auto output_string = detail::value_string(detail::pair_adaptor<element_t>::second(v));
if(output_string == input) {
return std::string();
}
}
return "Check " + input + " " + tfunc() + " FAILED";
};
}
/// You can pass in as many filter functions as you like, they nest
template <typename T, typename... Args>
CheckedTransformer(T &&mapping, filter_fn_t filter_fn_1, filter_fn_t filter_fn_2, Args &&...other)
: CheckedTransformer(
std::forward<T>(mapping),
[filter_fn_1, filter_fn_2](std::string a) { return filter_fn_2(filter_fn_1(a)); },
other...) {}
};
/// Helper function to allow ignore_case to be passed to IsMember or Transform
inline std::string ignore_case(std::string item) { return detail::to_lower(item); }
/// Helper function to allow ignore_underscore to be passed to IsMember or Transform
inline std::string ignore_underscore(std::string item) { return detail::remove_underscore(item); }
/// Helper function to allow checks to ignore spaces to be passed to IsMember or Transform
inline std::string ignore_space(std::string item) {
item.erase(std::remove(std::begin(item), std::end(item), ' '), std::end(item));
item.erase(std::remove(std::begin(item), std::end(item), '\t'), std::end(item));
return item;
}
/// Multiply a number by a factor using given mapping.
/// Can be used to write transforms for SIZE or DURATION inputs.
///
/// Example:
/// With mapping = `{"b"->1, "kb"->1024, "mb"->1024*1024}`
/// one can recognize inputs like "100", "12kb", "100 MB",
/// that will be automatically transformed to 100, 14448, 104857600.
///
/// Output number type matches the type in the provided mapping.
/// Therefore, if it is required to interpret real inputs like "0.42 s",
/// the mapping should be of a type <string, float> or <string, double>.
class AsNumberWithUnit : public Validator {
public:
/// Adjust AsNumberWithUnit behavior.
/// CASE_SENSITIVE/CASE_INSENSITIVE controls how units are matched.
/// UNIT_OPTIONAL/UNIT_REQUIRED throws ValidationError
/// if UNIT_REQUIRED is set and unit literal is not found.
enum Options {
CASE_SENSITIVE = 0,
CASE_INSENSITIVE = 1,
UNIT_OPTIONAL = 0,
UNIT_REQUIRED = 2,
DEFAULT = CASE_INSENSITIVE | UNIT_OPTIONAL
};
template <typename Number>
explicit AsNumberWithUnit(std::map<std::string, Number> mapping,
Options opts = DEFAULT,
const std::string &unit_name = "UNIT") {
description(generate_description<Number>(unit_name, opts));
validate_mapping(mapping, opts);
// transform function
func_ = [mapping, opts](std::string &input) -> std::string {
Number num{};
detail::rtrim(input);
if(input.empty()) {
throw ValidationError("Input is empty");
}
// Find split position between number and prefix
auto unit_begin = input.end();
while(unit_begin > input.begin() && std::isalpha(*(unit_begin - 1), std::locale())) {
--unit_begin;
}
std::string unit{unit_begin, input.end()};
input.resize(static_cast<std::size_t>(std::distance(input.begin(), unit_begin)));
detail::trim(input);
if(opts & UNIT_REQUIRED && unit.empty()) {
throw ValidationError("Missing mandatory unit");
}
if(opts & CASE_INSENSITIVE) {
unit = detail::to_lower(unit);
}
if(unit.empty()) {
using CLI::detail::lexical_cast;
if(!lexical_cast(input, num)) {
throw ValidationError(std::string("Value ") + input + " could not be converted to " +
detail::type_name<Number>());
}
// No need to modify input if no unit passed
return {};
}
// find corresponding factor
auto it = mapping.find(unit);
if(it == mapping.end()) {
throw ValidationError(unit +
" unit not recognized. "
"Allowed values: " +
detail::generate_map(mapping, true));
}
if(!input.empty()) {
using CLI::detail::lexical_cast;
bool converted = lexical_cast(input, num);
if(!converted) {
throw ValidationError(std::string("Value ") + input + " could not be converted to " +
detail::type_name<Number>());
}
// perform safe multiplication
bool ok = detail::checked_multiply(num, it->second);
if(!ok) {
throw ValidationError(detail::to_string(num) + " multiplied by " + unit +
" factor would cause number overflow. Use smaller value.");
}
} else {
num = static_cast<Number>(it->second);
}
input = detail::to_string(num);
return {};
};
}
private:
/// Check that mapping contains valid units.
/// Update mapping for CASE_INSENSITIVE mode.
template <typename Number> static void validate_mapping(std::map<std::string, Number> &mapping, Options opts) {
for(auto &kv : mapping) {
if(kv.first.empty()) {
throw ValidationError("Unit must not be empty.");
}
if(!detail::isalpha(kv.first)) {
throw ValidationError("Unit must contain only letters.");
}
}
// make all units lowercase if CASE_INSENSITIVE
if(opts & CASE_INSENSITIVE) {
std::map<std::string, Number> lower_mapping;
for(auto &kv : mapping) {
auto s = detail::to_lower(kv.first);
if(lower_mapping.count(s)) {
throw ValidationError(std::string("Several matching lowercase unit representations are found: ") +
s);
}
lower_mapping[detail::to_lower(kv.first)] = kv.second;
}
mapping = std::move(lower_mapping);
}
}
/// Generate description like this: NUMBER [UNIT]
template <typename Number> static std::string generate_description(const std::string &name, Options opts) {
std::stringstream out;
out << detail::type_name<Number>() << ' ';
if(opts & UNIT_REQUIRED) {
out << name;
} else {
out << '[' << name << ']';
}
return out.str();
}
};
inline AsNumberWithUnit::Options operator|(const AsNumberWithUnit::Options &a, const AsNumberWithUnit::Options &b) {
return static_cast<AsNumberWithUnit::Options>(static_cast<int>(a) | static_cast<int>(b));
}
/// Converts a human-readable size string (with unit literal) to uin64_t size.
/// Example:
/// "100" => 100
/// "1 b" => 100
/// "10Kb" => 10240 // you can configure this to be interpreted as kilobyte (*1000) or kibibyte (*1024)
/// "10 KB" => 10240
/// "10 kb" => 10240
/// "10 kib" => 10240 // *i, *ib are always interpreted as *bibyte (*1024)
/// "10kb" => 10240
/// "2 MB" => 2097152
/// "2 EiB" => 2^61 // Units up to exibyte are supported
class AsSizeValue : public AsNumberWithUnit {
public:
using result_t = std::uint64_t;
/// If kb_is_1000 is true,
/// interpret 'kb', 'k' as 1000 and 'kib', 'ki' as 1024
/// (same applies to higher order units as well).
/// Otherwise, interpret all literals as factors of 1024.
/// The first option is formally correct, but
/// the second interpretation is more wide-spread
/// (see https://en.wikipedia.org/wiki/Binary_prefix).
explicit AsSizeValue(bool kb_is_1000);
private:
/// Get <size unit, factor> mapping
static std::map<std::string, result_t> init_mapping(bool kb_is_1000);
/// Cache calculated mapping
static std::map<std::string, result_t> get_mapping(bool kb_is_1000);
};
namespace detail {
/// Split a string into a program name and command line arguments
/// the string is assumed to contain a file name followed by other arguments
/// the return value contains is a pair with the first argument containing the program name and the second
/// everything else.
CLI11_INLINE std::pair<std::string, std::string> split_program_name(std::string commandline);
} // namespace detail
/// @}
CLI11_INLINE std::string Validator::operator()(std::string &str) const {
std::string retstring;
if(active_) {
if(non_modifying_) {
std::string value = str;
retstring = func_(value);
} else {
retstring = func_(str);
}
}
return retstring;
}
CLI11_NODISCARD CLI11_INLINE Validator Validator::description(std::string validator_desc) const {
Validator newval(*this);
newval.desc_function_ = [validator_desc]() { return validator_desc; };
return newval;
}
CLI11_INLINE Validator Validator::operator&(const Validator &other) const {
Validator newval;
newval._merge_description(*this, other, " AND ");
// Give references (will make a copy in lambda function)
const std::function<std::string(std::string & filename)> &f1 = func_;
const std::function<std::string(std::string & filename)> &f2 = other.func_;
newval.func_ = [f1, f2](std::string &input) {
std::string s1 = f1(input);
std::string s2 = f2(input);
if(!s1.empty() && !s2.empty())
return std::string("(") + s1 + ") AND (" + s2 + ")";
return s1 + s2;
};
newval.active_ = active_ && other.active_;
newval.application_index_ = application_index_;
return newval;
}
CLI11_INLINE Validator Validator::operator|(const Validator &other) const {
Validator newval;
newval._merge_description(*this, other, " OR ");
// Give references (will make a copy in lambda function)
const std::function<std::string(std::string &)> &f1 = func_;
const std::function<std::string(std::string &)> &f2 = other.func_;
newval.func_ = [f1, f2](std::string &input) {
std::string s1 = f1(input);
std::string s2 = f2(input);
if(s1.empty() || s2.empty())
return std::string();
return std::string("(") + s1 + ") OR (" + s2 + ")";
};
newval.active_ = active_ && other.active_;
newval.application_index_ = application_index_;
return newval;
}
CLI11_INLINE Validator Validator::operator!() const {
Validator newval;
const std::function<std::string()> &dfunc1 = desc_function_;
newval.desc_function_ = [dfunc1]() {
auto str = dfunc1();
return (!str.empty()) ? std::string("NOT ") + str : std::string{};
};
// Give references (will make a copy in lambda function)
const std::function<std::string(std::string & res)> &f1 = func_;
newval.func_ = [f1, dfunc1](std::string &test) -> std::string {
std::string s1 = f1(test);
if(s1.empty()) {
return std::string("check ") + dfunc1() + " succeeded improperly";
}
return std::string{};
};
newval.active_ = active_;
newval.application_index_ = application_index_;
return newval;
}
CLI11_INLINE void
Validator::_merge_description(const Validator &val1, const Validator &val2, const std::string &merger) {
const std::function<std::string()> &dfunc1 = val1.desc_function_;
const std::function<std::string()> &dfunc2 = val2.desc_function_;
desc_function_ = [=]() {
std::string f1 = dfunc1();
std::string f2 = dfunc2();
if((f1.empty()) || (f2.empty())) {
return f1 + f2;
}
return std::string(1, '(') + f1 + ')' + merger + '(' + f2 + ')';
};
}
namespace detail {
#if defined CLI11_HAS_FILESYSTEM && CLI11_HAS_FILESYSTEM > 0
CLI11_INLINE path_type check_path(const char *file) noexcept {
std::error_code ec;
auto stat = std::filesystem::status(file, ec);
if(ec) {
return path_type::nonexistent;
}
switch(stat.type()) {
case std::filesystem::file_type::none: // LCOV_EXCL_LINE
case std::filesystem::file_type::not_found:
return path_type::nonexistent;
case std::filesystem::file_type::directory:
return path_type::directory;
case std::filesystem::file_type::symlink:
case std::filesystem::file_type::block:
case std::filesystem::file_type::character:
case std::filesystem::file_type::fifo:
case std::filesystem::file_type::socket:
case std::filesystem::file_type::regular:
case std::filesystem::file_type::unknown:
default:
return path_type::file;
}
}
#else
CLI11_INLINE path_type check_path(const char *file) noexcept {
#if defined(_MSC_VER)
struct __stat64 buffer;
if(_stat64(file, &buffer) == 0) {
return ((buffer.st_mode & S_IFDIR) != 0) ? path_type::directory : path_type::file;
}
#else
struct stat buffer;
if(stat(file, &buffer) == 0) {
return ((buffer.st_mode & S_IFDIR) != 0) ? path_type::directory : path_type::file;
}
#endif
return path_type::nonexistent;
}
#endif
CLI11_INLINE ExistingFileValidator::ExistingFileValidator() : Validator("FILE") {
func_ = [](std::string &filename) {
auto path_result = check_path(filename.c_str());
if(path_result == path_type::nonexistent) {
return "File does not exist: " + filename;
}
if(path_result == path_type::directory) {
return "File is actually a directory: " + filename;
}
return std::string();
};
}
CLI11_INLINE ExistingDirectoryValidator::ExistingDirectoryValidator() : Validator("DIR") {
func_ = [](std::string &filename) {
auto path_result = check_path(filename.c_str());
if(path_result == path_type::nonexistent) {
return "Directory does not exist: " + filename;
}
if(path_result == path_type::file) {
return "Directory is actually a file: " + filename;
}
return std::string();
};
}
CLI11_INLINE ExistingPathValidator::ExistingPathValidator() : Validator("PATH(existing)") {
func_ = [](std::string &filename) {
auto path_result = check_path(filename.c_str());
if(path_result == path_type::nonexistent) {
return "Path does not exist: " + filename;
}
return std::string();
};
}
CLI11_INLINE NonexistentPathValidator::NonexistentPathValidator() : Validator("PATH(non-existing)") {
func_ = [](std::string &filename) {
auto path_result = check_path(filename.c_str());
if(path_result != path_type::nonexistent) {
return "Path already exists: " + filename;
}
return std::string();
};
}
CLI11_INLINE IPV4Validator::IPV4Validator() : Validator("IPV4") {
func_ = [](std::string &ip_addr) {
auto result = CLI::detail::split(ip_addr, '.');
if(result.size() != 4) {
return std::string("Invalid IPV4 address must have four parts (") + ip_addr + ')';
}
int num = 0;
for(const auto &var : result) {
using CLI::detail::lexical_cast;
bool retval = lexical_cast(var, num);
if(!retval) {
return std::string("Failed parsing number (") + var + ')';
}
if(num < 0 || num > 255) {
return std::string("Each IP number must be between 0 and 255 ") + var;
}
}
return std::string();
};
}
} // namespace detail
CLI11_INLINE FileOnDefaultPath::FileOnDefaultPath(std::string default_path, bool enableErrorReturn)
: Validator("FILE") {
func_ = [default_path, enableErrorReturn](std::string &filename) {
auto path_result = detail::check_path(filename.c_str());
if(path_result == detail::path_type::nonexistent) {
std::string test_file_path = default_path;
if(default_path.back() != '/' && default_path.back() != '\\') {
// Add folder separator
test_file_path += '/';
}
test_file_path.append(filename);
path_result = detail::check_path(test_file_path.c_str());
if(path_result == detail::path_type::file) {
filename = test_file_path;
} else {
if(enableErrorReturn) {
return "File does not exist: " + filename;
}
}
}
return std::string{};
};
}
CLI11_INLINE AsSizeValue::AsSizeValue(bool kb_is_1000) : AsNumberWithUnit(get_mapping(kb_is_1000)) {
if(kb_is_1000) {
description("SIZE [b, kb(=1000b), kib(=1024b), ...]");
} else {
description("SIZE [b, kb(=1024b), ...]");
}
}
CLI11_INLINE std::map<std::string, AsSizeValue::result_t> AsSizeValue::init_mapping(bool kb_is_1000) {
std::map<std::string, result_t> m;
result_t k_factor = kb_is_1000 ? 1000 : 1024;
result_t ki_factor = 1024;
result_t k = 1;
result_t ki = 1;
m["b"] = 1;
for(std::string p : {"k", "m", "g", "t", "p", "e"}) {
k *= k_factor;
ki *= ki_factor;
m[p] = k;
m[p + "b"] = k;
m[p + "i"] = ki;
m[p + "ib"] = ki;
}
return m;
}
CLI11_INLINE std::map<std::string, AsSizeValue::result_t> AsSizeValue::get_mapping(bool kb_is_1000) {
if(kb_is_1000) {
static auto m = init_mapping(true);
return m;
}
static auto m = init_mapping(false);
return m;
}
namespace detail {
CLI11_INLINE std::pair<std::string, std::string> split_program_name(std::string commandline) {
// try to determine the programName
std::pair<std::string, std::string> vals;
trim(commandline);
auto esp = commandline.find_first_of(' ', 1);
while(detail::check_path(commandline.substr(0, esp).c_str()) != path_type::file) {
esp = commandline.find_first_of(' ', esp + 1);
if(esp == std::string::npos) {
// if we have reached the end and haven't found a valid file just assume the first argument is the
// program name
if(commandline[0] == '"' || commandline[0] == '\'' || commandline[0] == '`') {
bool embeddedQuote = false;
auto keyChar = commandline[0];
auto end = commandline.find_first_of(keyChar, 1);
while((end != std::string::npos) && (commandline[end - 1] == '\\')) { // deal with escaped quotes
end = commandline.find_first_of(keyChar, end + 1);
embeddedQuote = true;
}
if(end != std::string::npos) {
vals.first = commandline.substr(1, end - 1);
esp = end + 1;
if(embeddedQuote) {
vals.first = find_and_replace(vals.first, std::string("\\") + keyChar, std::string(1, keyChar));
}
} else {
esp = commandline.find_first_of(' ', 1);
}
} else {
esp = commandline.find_first_of(' ', 1);
}
break;
}
}
if(vals.first.empty()) {
vals.first = commandline.substr(0, esp);
rtrim(vals.first);
}
// strip the program name
vals.second = (esp < commandline.length() - 1) ? commandline.substr(esp + 1) : std::string{};
ltrim(vals.second);
return vals;
}
} // namespace detail
/// @}
class Option;
class App;
/// This enum signifies the type of help requested
///
/// This is passed in by App; all user classes must accept this as
/// the second argument.
enum class AppFormatMode {
Normal, ///< The normal, detailed help
All, ///< A fully expanded help
Sub, ///< Used when printed as part of expanded subcommand
};
/// This is the minimum requirements to run a formatter.
///
/// A user can subclass this is if they do not care at all
/// about the structure in CLI::Formatter.
class FormatterBase {
protected:
/// @name Options
///@{
/// The width of the first column
std::size_t column_width_{30};
/// @brief The required help printout labels (user changeable)
/// Values are Needs, Excludes, etc.
std::map<std::string, std::string> labels_{};
///@}
/// @name Basic
///@{
public:
FormatterBase() = default;
FormatterBase(const FormatterBase &) = default;
FormatterBase(FormatterBase &&) = default;
FormatterBase &operator=(const FormatterBase &) = default;
FormatterBase &operator=(FormatterBase &&) = default;
/// Adding a destructor in this form to work around bug in GCC 4.7
virtual ~FormatterBase() noexcept {} // NOLINT(modernize-use-equals-default)
/// This is the key method that puts together help
virtual std::string make_help(const App *, std::string, AppFormatMode) const = 0;
///@}
/// @name Setters
///@{
/// Set the "REQUIRED" label
void label(std::string key, std::string val) { labels_[key] = val; }
/// Set the column width
void column_width(std::size_t val) { column_width_ = val; }
///@}
/// @name Getters
///@{
/// Get the current value of a name (REQUIRED, etc.)
CLI11_NODISCARD std::string get_label(std::string key) const {
if(labels_.find(key) == labels_.end())
return key;
return labels_.at(key);
}
/// Get the current column width
CLI11_NODISCARD std::size_t get_column_width() const { return column_width_; }
///@}
};
/// This is a specialty override for lambda functions
class FormatterLambda final : public FormatterBase {
using funct_t = std::function<std::string(const App *, std::string, AppFormatMode)>;
/// The lambda to hold and run
funct_t lambda_;
public:
/// Create a FormatterLambda with a lambda function
explicit FormatterLambda(funct_t funct) : lambda_(std::move(funct)) {}
/// Adding a destructor (mostly to make GCC 4.7 happy)
~FormatterLambda() noexcept override {} // NOLINT(modernize-use-equals-default)
/// This will simply call the lambda function
std::string make_help(const App *app, std::string name, AppFormatMode mode) const override {
return lambda_(app, name, mode);
}
};
/// This is the default Formatter for CLI11. It pretty prints help output, and is broken into quite a few
/// overridable methods, to be highly customizable with minimal effort.
class Formatter : public FormatterBase {
public:
Formatter() = default;
Formatter(const Formatter &) = default;
Formatter(Formatter &&) = default;
Formatter &operator=(const Formatter &) = default;
Formatter &operator=(Formatter &&) = default;
/// @name Overridables
///@{
/// This prints out a group of options with title
///
CLI11_NODISCARD virtual std::string
make_group(std::string group, bool is_positional, std::vector<const Option *> opts) const;
/// This prints out just the positionals "group"
virtual std::string make_positionals(const App *app) const;
/// This prints out all the groups of options
std::string make_groups(const App *app, AppFormatMode mode) const;
/// This prints out all the subcommands
virtual std::string make_subcommands(const App *app, AppFormatMode mode) const;
/// This prints out a subcommand
virtual std::string make_subcommand(const App *sub) const;
/// This prints out a subcommand in help-all
virtual std::string make_expanded(const App *sub) const;
/// This prints out all the groups of options
virtual std::string make_footer(const App *app) const;
/// This displays the description line
virtual std::string make_description(const App *app) const;
/// This displays the usage line
virtual std::string make_usage(const App *app, std::string name) const;
/// This puts everything together
std::string make_help(const App * /*app*/, std::string, AppFormatMode) const override;
///@}
/// @name Options
///@{
/// This prints out an option help line, either positional or optional form
virtual std::string make_option(const Option *opt, bool is_positional) const {
std::stringstream out;
detail::format_help(
out, make_option_name(opt, is_positional) + make_option_opts(opt), make_option_desc(opt), column_width_);
return out.str();
}
/// @brief This is the name part of an option, Default: left column
virtual std::string make_option_name(const Option *, bool) const;
/// @brief This is the options part of the name, Default: combined into left column
virtual std::string make_option_opts(const Option *) const;
/// @brief This is the description. Default: Right column, on new line if left column too large
virtual std::string make_option_desc(const Option *) const;
/// @brief This is used to print the name on the USAGE line
virtual std::string make_option_usage(const Option *opt) const;
///@}
};
using results_t = std::vector<std::string>;
/// callback function definition
using callback_t = std::function<bool(const results_t &)>;
class Option;
class App;
using Option_p = std::unique_ptr<Option>;
/// Enumeration of the multiOption Policy selection
enum class MultiOptionPolicy : char {
Throw, //!< Throw an error if any extra arguments were given
TakeLast, //!< take only the last Expected number of arguments
TakeFirst, //!< take only the first Expected number of arguments
Join, //!< merge all the arguments together into a single string via the delimiter character default('\n')
TakeAll, //!< just get all the passed argument regardless
Sum //!< sum all the arguments together if numerical or concatenate directly without delimiter
};
/// This is the CRTP base class for Option and OptionDefaults. It was designed this way
/// to share parts of the class; an OptionDefaults can copy to an Option.
template <typename CRTP> class OptionBase {
friend App;
protected:
/// The group membership
std::string group_ = std::string("Options");
/// True if this is a required option
bool required_{false};
/// Ignore the case when matching (option, not value)
bool ignore_case_{false};
/// Ignore underscores when matching (option, not value)
bool ignore_underscore_{false};
/// Allow this option to be given in a configuration file
bool configurable_{true};
/// Disable overriding flag values with '=value'
bool disable_flag_override_{false};
/// Specify a delimiter character for vector arguments
char delimiter_{'\0'};
/// Automatically capture default value
bool always_capture_default_{false};
/// Policy for handling multiple arguments beyond the expected Max
MultiOptionPolicy multi_option_policy_{MultiOptionPolicy::Throw};
/// Copy the contents to another similar class (one based on OptionBase)
template <typename T> void copy_to(T *other) const;
public:
// setters
/// Changes the group membership
CRTP *group(const std::string &name) {
if(!detail::valid_alias_name_string(name)) {
throw IncorrectConstruction("Group names may not contain newlines or null characters");
}
group_ = name;
return static_cast<CRTP *>(this);
}
/// Set the option as required
CRTP *required(bool value = true) {
required_ = value;
return static_cast<CRTP *>(this);
}
/// Support Plumbum term
CRTP *mandatory(bool value = true) { return required(value); }
CRTP *always_capture_default(bool value = true) {
always_capture_default_ = value;
return static_cast<CRTP *>(this);
}
// Getters
/// Get the group of this option
CLI11_NODISCARD const std::string &get_group() const { return group_; }
/// True if this is a required option
CLI11_NODISCARD bool get_required() const { return required_; }
/// The status of ignore case
CLI11_NODISCARD bool get_ignore_case() const { return ignore_case_; }
/// The status of ignore_underscore
CLI11_NODISCARD bool get_ignore_underscore() const { return ignore_underscore_; }
/// The status of configurable
CLI11_NODISCARD bool get_configurable() const { return configurable_; }
/// The status of configurable
CLI11_NODISCARD bool get_disable_flag_override() const { return disable_flag_override_; }
/// Get the current delimiter char
CLI11_NODISCARD char get_delimiter() const { return delimiter_; }
/// Return true if this will automatically capture the default value for help printing
CLI11_NODISCARD bool get_always_capture_default() const { return always_capture_default_; }
/// The status of the multi option policy
CLI11_NODISCARD MultiOptionPolicy get_multi_option_policy() const { return multi_option_policy_; }
// Shortcuts for multi option policy
/// Set the multi option policy to take last
CRTP *take_last() {
auto *self = static_cast<CRTP *>(this);
self->multi_option_policy(MultiOptionPolicy::TakeLast);
return self;
}
/// Set the multi option policy to take last
CRTP *take_first() {
auto *self = static_cast<CRTP *>(this);
self->multi_option_policy(MultiOptionPolicy::TakeFirst);
return self;
}
/// Set the multi option policy to take all arguments
CRTP *take_all() {
auto self = static_cast<CRTP *>(this);
self->multi_option_policy(MultiOptionPolicy::TakeAll);
return self;
}
/// Set the multi option policy to join
CRTP *join() {
auto *self = static_cast<CRTP *>(this);
self->multi_option_policy(MultiOptionPolicy::Join);
return self;
}
/// Set the multi option policy to join with a specific delimiter
CRTP *join(char delim) {
auto self = static_cast<CRTP *>(this);
self->delimiter_ = delim;
self->multi_option_policy(MultiOptionPolicy::Join);
return self;
}
/// Allow in a configuration file
CRTP *configurable(bool value = true) {
configurable_ = value;
return static_cast<CRTP *>(this);
}
/// Allow in a configuration file
CRTP *delimiter(char value = '\0') {
delimiter_ = value;
return static_cast<CRTP *>(this);
}
};
/// This is a version of OptionBase that only supports setting values,
/// for defaults. It is stored as the default option in an App.
class OptionDefaults : public OptionBase<OptionDefaults> {
public:
OptionDefaults() = default;
// Methods here need a different implementation if they are Option vs. OptionDefault
/// Take the last argument if given multiple times
OptionDefaults *multi_option_policy(MultiOptionPolicy value = MultiOptionPolicy::Throw) {
multi_option_policy_ = value;
return this;
}
/// Ignore the case of the option name
OptionDefaults *ignore_case(bool value = true) {
ignore_case_ = value;
return this;
}
/// Ignore underscores in the option name
OptionDefaults *ignore_underscore(bool value = true) {
ignore_underscore_ = value;
return this;
}
/// Disable overriding flag values with an '=<value>' segment
OptionDefaults *disable_flag_override(bool value = true) {
disable_flag_override_ = value;
return this;
}
/// set a delimiter character to split up single arguments to treat as multiple inputs
OptionDefaults *delimiter(char value = '\0') {
delimiter_ = value;
return this;
}
};
class Option : public OptionBase<Option> {
friend App;
protected:
/// @name Names
///@{
/// A list of the short names (`-a`) without the leading dashes
std::vector<std::string> snames_{};
/// A list of the long names (`--long`) without the leading dashes
std::vector<std::string> lnames_{};
/// A list of the flag names with the appropriate default value, the first part of the pair should be duplicates of
/// what is in snames or lnames but will trigger a particular response on a flag
std::vector<std::pair<std::string, std::string>> default_flag_values_{};
/// a list of flag names with specified default values;
std::vector<std::string> fnames_{};
/// A positional name
std::string pname_{};
/// If given, check the environment for this option
std::string envname_{};
///@}
/// @name Help
///@{
/// The description for help strings
std::string description_{};
/// A human readable default value, either manually set, captured, or captured by default
std::string default_str_{};
/// If given, replace the text that describes the option type and usage in the help text
std::string option_text_{};
/// A human readable type value, set when App creates this
///
/// This is a lambda function so "types" can be dynamic, such as when a set prints its contents.
std::function<std::string()> type_name_{[]() { return std::string(); }};
/// Run this function to capture a default (ignore if empty)
std::function<std::string()> default_function_{};
///@}
/// @name Configuration
///@{
/// The number of arguments that make up one option. max is the nominal type size, min is the minimum number of
/// strings
int type_size_max_{1};
/// The minimum number of arguments an option should be expecting
int type_size_min_{1};
/// The minimum number of expected values
int expected_min_{1};
/// The maximum number of expected values
int expected_max_{1};
/// A list of Validators to run on each value parsed
std::vector<Validator> validators_{};
/// A list of options that are required with this option
std::set<Option *> needs_{};
/// A list of options that are excluded with this option
std::set<Option *> excludes_{};
///@}
/// @name Other
///@{
/// link back up to the parent App for fallthrough
App *parent_{nullptr};
/// Options store a callback to do all the work
callback_t callback_{};
///@}
/// @name Parsing results
///@{
/// complete Results of parsing
results_t results_{};
/// results after reduction
results_t proc_results_{};
/// enumeration for the option state machine
enum class option_state : char {
parsing = 0, //!< The option is currently collecting parsed results
validated = 2, //!< the results have been validated
reduced = 4, //!< a subset of results has been generated
callback_run = 6, //!< the callback has been executed
};
/// Whether the callback has run (needed for INI parsing)
option_state current_option_state_{option_state::parsing};
/// Specify that extra args beyond type_size_max should be allowed
bool allow_extra_args_{false};
/// Specify that the option should act like a flag vs regular option
bool flag_like_{false};
/// Control option to run the callback to set the default
bool run_callback_for_default_{false};
/// flag indicating a separator needs to be injected after each argument call
bool inject_separator_{false};
/// flag indicating that the option should trigger the validation and callback chain on each result when loaded
bool trigger_on_result_{false};
/// flag indicating that the option should force the callback regardless if any results present
bool force_callback_{false};
///@}
/// Making an option by hand is not defined, it must be made by the App class
Option(std::string option_name, std::string option_description, callback_t callback, App *parent)
: description_(std::move(option_description)), parent_(parent), callback_(std::move(callback)) {
std::tie(snames_, lnames_, pname_) = detail::get_names(detail::split_names(option_name));
}
public:
/// @name Basic
///@{
Option(const Option &) = delete;
Option &operator=(const Option &) = delete;
/// Count the total number of times an option was passed
CLI11_NODISCARD std::size_t count() const { return results_.size(); }
/// True if the option was not passed
CLI11_NODISCARD bool empty() const { return results_.empty(); }
/// This bool operator returns true if any arguments were passed or the option callback is forced
explicit operator bool() const { return !empty() || force_callback_; }
/// Clear the parsed results (mostly for testing)
void clear() {
results_.clear();
current_option_state_ = option_state::parsing;
}
///@}
/// @name Setting options
///@{
/// Set the number of expected arguments
Option *expected(int value);
/// Set the range of expected arguments
Option *expected(int value_min, int value_max);
/// Set the value of allow_extra_args which allows extra value arguments on the flag or option to be included
/// with each instance
Option *allow_extra_args(bool value = true) {
allow_extra_args_ = value;
return this;
}
/// Get the current value of allow extra args
CLI11_NODISCARD bool get_allow_extra_args() const { return allow_extra_args_; }
/// Set the value of trigger_on_parse which specifies that the option callback should be triggered on every parse
Option *trigger_on_parse(bool value = true) {
trigger_on_result_ = value;
return this;
}
/// The status of trigger on parse
CLI11_NODISCARD bool get_trigger_on_parse() const { return trigger_on_result_; }
/// Set the value of force_callback
Option *force_callback(bool value = true) {
force_callback_ = value;
return this;
}
/// The status of force_callback
CLI11_NODISCARD bool get_force_callback() const { return force_callback_; }
/// Set the value of run_callback_for_default which controls whether the callback function should be called to set
/// the default This is controlled automatically but could be manipulated by the user.
Option *run_callback_for_default(bool value = true) {
run_callback_for_default_ = value;
return this;
}
/// Get the current value of run_callback_for_default
CLI11_NODISCARD bool get_run_callback_for_default() const { return run_callback_for_default_; }
/// Adds a Validator with a built in type name
Option *check(Validator validator, const std::string &validator_name = "");
/// Adds a Validator. Takes a const string& and returns an error message (empty if conversion/check is okay).
Option *check(std::function<std::string(const std::string &)> Validator,
std::string Validator_description = "",
std::string Validator_name = "");
/// Adds a transforming Validator with a built in type name
Option *transform(Validator Validator, const std::string &Validator_name = "");
/// Adds a Validator-like function that can change result
Option *transform(const std::function<std::string(std::string)> &func,
std::string transform_description = "",
std::string transform_name = "");
/// Adds a user supplied function to run on each item passed in (communicate though lambda capture)
Option *each(const std::function<void(std::string)> &func);
/// Get a named Validator
Validator *get_validator(const std::string &Validator_name = "");
/// Get a Validator by index NOTE: this may not be the order of definition
Validator *get_validator(int index);
/// Sets required options
Option *needs(Option *opt) {
if(opt != this) {
needs_.insert(opt);
}
return this;
}
/// Can find a string if needed
template <typename T = App> Option *needs(std::string opt_name) {
auto opt = static_cast<T *>(parent_)->get_option_no_throw(opt_name);
if(opt == nullptr) {
throw IncorrectConstruction::MissingOption(opt_name);
}
return needs(opt);
}
/// Any number supported, any mix of string and Opt
template <typename A, typename B, typename... ARG> Option *needs(A opt, B opt1, ARG... args) {
needs(opt);
return needs(opt1, args...); // NOLINT(readability-suspicious-call-argument)
}
/// Remove needs link from an option. Returns true if the option really was in the needs list.
bool remove_needs(Option *opt);
/// Sets excluded options
Option *excludes(Option *opt);
/// Can find a string if needed
template <typename T = App> Option *excludes(std::string opt_name) {
auto opt = static_cast<T *>(parent_)->get_option_no_throw(opt_name);
if(opt == nullptr) {
throw IncorrectConstruction::MissingOption(opt_name);
}
return excludes(opt);
}
/// Any number supported, any mix of string and Opt
template <typename A, typename B, typename... ARG> Option *excludes(A opt, B opt1, ARG... args) {
excludes(opt);
return excludes(opt1, args...);
}
/// Remove needs link from an option. Returns true if the option really was in the needs list.
bool remove_excludes(Option *opt);
/// Sets environment variable to read if no option given
Option *envname(std::string name) {
envname_ = std::move(name);
return this;
}
/// Ignore case
///
/// The template hides the fact that we don't have the definition of App yet.
/// You are never expected to add an argument to the template here.
template <typename T = App> Option *ignore_case(bool value = true);
/// Ignore underscores in the option names
///
/// The template hides the fact that we don't have the definition of App yet.
/// You are never expected to add an argument to the template here.
template <typename T = App> Option *ignore_underscore(bool value = true);
/// Take the last argument if given multiple times (or another policy)
Option *multi_option_policy(MultiOptionPolicy value = MultiOptionPolicy::Throw);
/// Disable flag overrides values, e.g. --flag=<value> is not allowed
Option *disable_flag_override(bool value = true) {
disable_flag_override_ = value;
return this;
}
///@}
/// @name Accessors
///@{
/// The number of arguments the option expects
CLI11_NODISCARD int get_type_size() const { return type_size_min_; }
/// The minimum number of arguments the option expects
CLI11_NODISCARD int get_type_size_min() const { return type_size_min_; }
/// The maximum number of arguments the option expects
CLI11_NODISCARD int get_type_size_max() const { return type_size_max_; }
/// Return the inject_separator flag
CLI11_NODISCARD bool get_inject_separator() const { return inject_separator_; }
/// The environment variable associated to this value
CLI11_NODISCARD std::string get_envname() const { return envname_; }
/// The set of options needed
CLI11_NODISCARD std::set<Option *> get_needs() const { return needs_; }
/// The set of options excluded
CLI11_NODISCARD std::set<Option *> get_excludes() const { return excludes_; }
/// The default value (for help printing)
CLI11_NODISCARD std::string get_default_str() const { return default_str_; }
/// Get the callback function
CLI11_NODISCARD callback_t get_callback() const { return callback_; }
/// Get the long names
CLI11_NODISCARD const std::vector<std::string> &get_lnames() const { return lnames_; }
/// Get the short names
CLI11_NODISCARD const std::vector<std::string> &get_snames() const { return snames_; }
/// Get the flag names with specified default values
CLI11_NODISCARD const std::vector<std::string> &get_fnames() const { return fnames_; }
/// Get a single name for the option, first of lname, pname, sname, envname
CLI11_NODISCARD const std::string &get_single_name() const {
if(!lnames_.empty()) {
return lnames_[0];
}
if(!pname_.empty()) {
return pname_;
}
if(!snames_.empty()) {
return snames_[0];
}
return envname_;
}
/// The number of times the option expects to be included
CLI11_NODISCARD int get_expected() const { return expected_min_; }
/// The number of times the option expects to be included
CLI11_NODISCARD int get_expected_min() const { return expected_min_; }
/// The max number of times the option expects to be included
CLI11_NODISCARD int get_expected_max() const { return expected_max_; }
/// The total min number of expected string values to be used
CLI11_NODISCARD int get_items_expected_min() const { return type_size_min_ * expected_min_; }
/// Get the maximum number of items expected to be returned and used for the callback
CLI11_NODISCARD int get_items_expected_max() const {
int t = type_size_max_;
return detail::checked_multiply(t, expected_max_) ? t : detail::expected_max_vector_size;
}
/// The total min number of expected string values to be used
CLI11_NODISCARD int get_items_expected() const { return get_items_expected_min(); }
/// True if the argument can be given directly
CLI11_NODISCARD bool get_positional() const { return pname_.length() > 0; }
/// True if option has at least one non-positional name
CLI11_NODISCARD bool nonpositional() const { return (snames_.size() + lnames_.size()) > 0; }
/// True if option has description
CLI11_NODISCARD bool has_description() const { return description_.length() > 0; }
/// Get the description
CLI11_NODISCARD const std::string &get_description() const { return description_; }
/// Set the description
Option *description(std::string option_description) {
description_ = std::move(option_description);
return this;
}
Option *option_text(std::string text) {
option_text_ = std::move(text);
return this;
}
CLI11_NODISCARD const std::string &get_option_text() const { return option_text_; }
///@}
/// @name Help tools
///@{
/// \brief Gets a comma separated list of names.
/// Will include / prefer the positional name if positional is true.
/// If all_options is false, pick just the most descriptive name to show.
/// Use `get_name(true)` to get the positional name (replaces `get_pname`)
CLI11_NODISCARD std::string get_name(bool positional = false, ///< Show the positional name
bool all_options = false ///< Show every option
) const;
///@}
/// @name Parser tools
///@{
/// Process the callback
void run_callback();
/// If options share any of the same names, find it
CLI11_NODISCARD const std::string &matching_name(const Option &other) const;
/// If options share any of the same names, they are equal (not counting positional)
bool operator==(const Option &other) const { return !matching_name(other).empty(); }
/// Check a name. Requires "-" or "--" for short / long, supports positional name
CLI11_NODISCARD bool check_name(const std::string &name) const;
/// Requires "-" to be removed from string
CLI11_NODISCARD bool check_sname(std::string name) const {
return (detail::find_member(std::move(name), snames_, ignore_case_) >= 0);
}
/// Requires "--" to be removed from string
CLI11_NODISCARD bool check_lname(std::string name) const {
return (detail::find_member(std::move(name), lnames_, ignore_case_, ignore_underscore_) >= 0);
}
/// Requires "--" to be removed from string
CLI11_NODISCARD bool check_fname(std::string name) const {
if(fnames_.empty()) {
return false;
}
return (detail::find_member(std::move(name), fnames_, ignore_case_, ignore_underscore_) >= 0);
}
/// Get the value that goes for a flag, nominally gets the default value but allows for overrides if not
/// disabled
CLI11_NODISCARD std::string get_flag_value(const std::string &name, std::string input_value) const;
/// Puts a result at the end
Option *add_result(std::string s);
/// Puts a result at the end and get a count of the number of arguments actually added
Option *add_result(std::string s, int &results_added);
/// Puts a result at the end
Option *add_result(std::vector<std::string> s);
/// Get the current complete results set
CLI11_NODISCARD const results_t &results() const { return results_; }
/// Get a copy of the results
CLI11_NODISCARD results_t reduced_results() const;
/// Get the results as a specified type
template <typename T> void results(T &output) const {
bool retval = false;
if(current_option_state_ >= option_state::reduced || (results_.size() == 1 && validators_.empty())) {
const results_t &res = (proc_results_.empty()) ? results_ : proc_results_;
retval = detail::lexical_conversion<T, T>(res, output);
} else {
results_t res;
if(results_.empty()) {
if(!default_str_.empty()) {
// _add_results takes an rvalue only
_add_result(std::string(default_str_), res);
_validate_results(res);
results_t extra;
_reduce_results(extra, res);
if(!extra.empty()) {
res = std::move(extra);
}
} else {
res.emplace_back();
}
} else {
res = reduced_results();
}
retval = detail::lexical_conversion<T, T>(res, output);
}
if(!retval) {
throw ConversionError(get_name(), results_);
}
}
/// Return the results as the specified type
template <typename T> CLI11_NODISCARD T as() const {
T output;
results(output);
return output;
}
/// See if the callback has been run already
CLI11_NODISCARD bool get_callback_run() const { return (current_option_state_ == option_state::callback_run); }
///@}
/// @name Custom options
///@{
/// Set the type function to run when displayed on this option
Option *type_name_fn(std::function<std::string()> typefun) {
type_name_ = std::move(typefun);
return this;
}
/// Set a custom option typestring
Option *type_name(std::string typeval) {
type_name_fn([typeval]() { return typeval; });
return this;
}
/// Set a custom option size
Option *type_size(int option_type_size);
/// Set a custom option type size range
Option *type_size(int option_type_size_min, int option_type_size_max);
/// Set the value of the separator injection flag
void inject_separator(bool value = true) { inject_separator_ = value; }
/// Set a capture function for the default. Mostly used by App.
Option *default_function(const std::function<std::string()> &func) {
default_function_ = func;
return this;
}
/// Capture the default value from the original value (if it can be captured)
Option *capture_default_str() {
if(default_function_) {
default_str_ = default_function_();
}
return this;
}
/// Set the default value string representation (does not change the contained value)
Option *default_str(std::string val) {
default_str_ = std::move(val);
return this;
}
/// Set the default value and validate the results and run the callback if appropriate to set the value into the
/// bound value only available for types that can be converted to a string
template <typename X> Option *default_val(const X &val) {
std::string val_str = detail::to_string(val);
auto old_option_state = current_option_state_;
gitextract_qkytoi01/
├── .gitattributes
├── .gitignore
├── .gitmodules
├── CLI11.hpp
├── CoerceFunctions.cpp
├── CoerceFunctions.h
├── CoercedPotato.cpp
├── CoercedPotato.sln
├── CoercedPotato.vcxproj
├── CoercedPotato.vcxproj.filters
├── IDL_FILES/
│ ├── ms-efsr.idl
│ ├── ms-even.idl
│ ├── ms-par.idl
│ ├── ms-rprn.idl
│ └── ms-srvsvc.idl
├── README.md
├── lib/
│ ├── ms-efsr_h.h
│ ├── ms-even_h.h
│ ├── ms-par_h.h
│ ├── ms-rprn_h.h
│ └── ms-srvsvc_h.h
└── rpc_interfaces/
├── ms-efsr_c.c
├── ms-even_c.c
├── ms-even_s.c
├── ms-par_c.c
├── ms-par_s.c
├── ms-rprn_c.c
├── ms-rprn_s.c
├── ms-srvsvc_c.c
└── ms-srvsvc_s.c
Showing preview only (308K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (4168 symbols across 17 files)
FILE: CLI11.hpp
type CLI (line 173) | namespace CLI {
type enums (line 178) | namespace enums {
type detail (line 192) | namespace detail {
function join (line 201) | std::string join(const T &v, std::string delim = ",") {
function join (line 217) | std::string join(const T &v, Callable func, std::string delim = ",") {
function rjoin (line 234) | std::string rjoin(const T &v, std::string delim = ",") {
function trim_copy (line 265) | inline std::string trim_copy(const std::string &str) {
function trim_copy (line 280) | inline std::string trim_copy(const std::string &str, const std::stri...
function valid_first_char (line 293) | bool valid_first_char(T c) { return ((c != '-') && (c != '!') && (c ...
function valid_later_char (line 296) | bool valid_later_char(T c) {
function valid_alias_name_string (line 307) | inline bool valid_alias_name_string(const std::string &str) {
function is_separator (line 313) | inline bool is_separator(const std::string &str) {
function isalpha (line 319) | inline bool isalpha(const std::string &str) {
function to_lower (line 324) | inline std::string to_lower(std::string str) {
function remove_underscore (line 332) | inline std::string remove_underscore(std::string str) {
function has_default_flag_values (line 341) | inline bool has_default_flag_values(const std::string &flags) {
function find_and_modify (line 355) | inline std::string find_and_modify(std::string str, std::string trig...
function CLI11_INLINE (line 382) | CLI11_INLINE std::vector<std::string> split(const std::string &s, ch...
function CLI11_INLINE (line 398) | CLI11_INLINE std::string <rim(std::string &str) {
function CLI11_INLINE (line 404) | CLI11_INLINE std::string <rim(std::string &str, const std::string ...
function CLI11_INLINE (line 410) | CLI11_INLINE std::string &rtrim(std::string &str) {
function CLI11_INLINE (line 416) | CLI11_INLINE std::string &rtrim(std::string &str, const std::string ...
function CLI11_INLINE (line 423) | CLI11_INLINE std::string &remove_quotes(std::string &str) {
function CLI11_INLINE (line 433) | CLI11_INLINE std::string fix_newlines(const std::string &leader, std...
function CLI11_INLINE (line 445) | CLI11_INLINE std::ostream &
function CLI11_INLINE (line 463) | CLI11_INLINE std::ostream &format_aliases(std::ostream &out, const s...
function CLI11_INLINE (line 480) | CLI11_INLINE bool valid_name_string(const std::string &str) {
function CLI11_INLINE (line 491) | CLI11_INLINE std::string find_and_replace(std::string str, std::stri...
function CLI11_INLINE (line 503) | CLI11_INLINE void remove_default_flag_values(std::string &flags) {
function CLI11_INLINE (line 516) | CLI11_INLINE std::ptrdiff_t
function CLI11_INLINE (line 544) | CLI11_INLINE std::vector<std::string> split_up(std::string str, char...
function CLI11_INLINE (line 596) | CLI11_INLINE std::size_t escape_detect(std::string &str, std::size_t...
function CLI11_INLINE (line 608) | CLI11_INLINE std::string &add_quotes_if_needed(std::string &str) {
function CLI11_INLINE (line 3773) | CLI11_INLINE path_type check_path(const char *file) noexcept {
function CLI11_INLINE (line 3797) | CLI11_INLINE path_type check_path(const char *file) noexcept {
type detail (line 381) | namespace detail {
function join (line 201) | std::string join(const T &v, std::string delim = ",") {
function join (line 217) | std::string join(const T &v, Callable func, std::string delim = ",") {
function rjoin (line 234) | std::string rjoin(const T &v, std::string delim = ",") {
function trim_copy (line 265) | inline std::string trim_copy(const std::string &str) {
function trim_copy (line 280) | inline std::string trim_copy(const std::string &str, const std::stri...
function valid_first_char (line 293) | bool valid_first_char(T c) { return ((c != '-') && (c != '!') && (c ...
function valid_later_char (line 296) | bool valid_later_char(T c) {
function valid_alias_name_string (line 307) | inline bool valid_alias_name_string(const std::string &str) {
function is_separator (line 313) | inline bool is_separator(const std::string &str) {
function isalpha (line 319) | inline bool isalpha(const std::string &str) {
function to_lower (line 324) | inline std::string to_lower(std::string str) {
function remove_underscore (line 332) | inline std::string remove_underscore(std::string str) {
function has_default_flag_values (line 341) | inline bool has_default_flag_values(const std::string &flags) {
function find_and_modify (line 355) | inline std::string find_and_modify(std::string str, std::string trig...
function CLI11_INLINE (line 382) | CLI11_INLINE std::vector<std::string> split(const std::string &s, ch...
function CLI11_INLINE (line 398) | CLI11_INLINE std::string <rim(std::string &str) {
function CLI11_INLINE (line 404) | CLI11_INLINE std::string <rim(std::string &str, const std::string ...
function CLI11_INLINE (line 410) | CLI11_INLINE std::string &rtrim(std::string &str) {
function CLI11_INLINE (line 416) | CLI11_INLINE std::string &rtrim(std::string &str, const std::string ...
function CLI11_INLINE (line 423) | CLI11_INLINE std::string &remove_quotes(std::string &str) {
function CLI11_INLINE (line 433) | CLI11_INLINE std::string fix_newlines(const std::string &leader, std...
function CLI11_INLINE (line 445) | CLI11_INLINE std::ostream &
function CLI11_INLINE (line 463) | CLI11_INLINE std::ostream &format_aliases(std::ostream &out, const s...
function CLI11_INLINE (line 480) | CLI11_INLINE bool valid_name_string(const std::string &str) {
function CLI11_INLINE (line 491) | CLI11_INLINE std::string find_and_replace(std::string str, std::stri...
function CLI11_INLINE (line 503) | CLI11_INLINE void remove_default_flag_values(std::string &flags) {
function CLI11_INLINE (line 516) | CLI11_INLINE std::ptrdiff_t
function CLI11_INLINE (line 544) | CLI11_INLINE std::vector<std::string> split_up(std::string str, char...
function CLI11_INLINE (line 596) | CLI11_INLINE std::size_t escape_detect(std::string &str, std::size_t...
function CLI11_INLINE (line 608) | CLI11_INLINE std::string &add_quotes_if_needed(std::string &str) {
function CLI11_INLINE (line 3773) | CLI11_INLINE path_type check_path(const char *file) noexcept {
function CLI11_INLINE (line 3797) | CLI11_INLINE path_type check_path(const char *file) noexcept {
type ExitCodes (line 641) | enum class ExitCodes {
class Error (line 670) | class Error : public std::runtime_error {
method CLI11_NODISCARD (line 675) | CLI11_NODISCARD int get_exit_code() const { return actual_exit_code; }
method Error (line 682) | Error(std::string name, std::string msg, ExitCodes exit_code) : Erro...
class ConstructionError (line 688) | class ConstructionError : public Error {
class IncorrectConstruction (line 693) | class IncorrectConstruction : public ConstructionError {
method IncorrectConstruction (line 696) | static IncorrectConstruction PositionalFlag(std::string name) {
method IncorrectConstruction (line 699) | static IncorrectConstruction Set0Opt(std::string name) {
method IncorrectConstruction (line 702) | static IncorrectConstruction SetFlag(std::string name) {
method IncorrectConstruction (line 705) | static IncorrectConstruction ChangeNotVector(std::string name) {
method IncorrectConstruction (line 708) | static IncorrectConstruction AfterMultiOpt(std::string name) {
method IncorrectConstruction (line 712) | static IncorrectConstruction MissingOption(std::string name) {
method IncorrectConstruction (line 715) | static IncorrectConstruction MultiOptionPolicy(std::string name) {
class BadNameString (line 721) | class BadNameString : public ConstructionError {
method BadNameString (line 724) | static BadNameString OneCharName(std::string name) { return BadNam...
method BadNameString (line 725) | static BadNameString BadLongName(std::string name) { return BadNam...
method BadNameString (line 726) | static BadNameString DashesOnly(std::string name) {
method BadNameString (line 729) | static BadNameString MultiPositionalNames(std::string name) {
class OptionAlreadyAdded (line 735) | class OptionAlreadyAdded : public ConstructionError {
method OptionAlreadyAdded (line 737) | explicit OptionAlreadyAdded(std::string name)
method OptionAlreadyAdded (line 739) | static OptionAlreadyAdded Requires(std::string name, std::string o...
method OptionAlreadyAdded (line 742) | static OptionAlreadyAdded Excludes(std::string name, std::string o...
class ParseError (line 750) | class ParseError : public Error {
class Success (line 757) | class Success : public ParseError {
method Success (line 759) | Success() : Success("Successfully completed, should be caught an...
class CallForHelp (line 763) | class CallForHelp : public Success {
method CallForHelp (line 765) | CallForHelp() : CallForHelp("This should be caught in your main ...
class CallForAllHelp (line 769) | class CallForAllHelp : public Success {
method CallForAllHelp (line 771) | CallForAllHelp()
class CallForVersion (line 776) | class CallForVersion : public Success {
method CallForVersion (line 778) | CallForVersion()
class RuntimeError (line 783) | class RuntimeError : public ParseError {
method RuntimeError (line 785) | explicit RuntimeError(int exit_code = 1) : RuntimeError("Runtime...
class FileError (line 789) | class FileError : public ParseError {
method FileError (line 792) | static FileError Missing(std::string name) { return FileError(na...
class ConversionError (line 796) | class ConversionError : public ParseError {
method ConversionError (line 799) | ConversionError(std::string member, std::string name)
method ConversionError (line 801) | ConversionError(std::string name, std::vector<std::string> results)
method ConversionError (line 803) | static ConversionError TooManyInputsFlag(std::string name) {
method ConversionError (line 806) | static ConversionError TrueFalse(std::string name) {
class ValidationError (line 812) | class ValidationError : public ParseError {
method ValidationError (line 815) | explicit ValidationError(std::string name, std::string msg) : Va...
class RequiredError (line 819) | class RequiredError : public ParseError {
method RequiredError (line 821) | explicit RequiredError(std::string name) : RequiredError(name + ...
method RequiredError (line 822) | static RequiredError Subcommand(std::size_t min_subcom) {
method RequiredError (line 828) | static RequiredError
class ArgumentMismatch (line 854) | class ArgumentMismatch : public ParseError {
method ArgumentMismatch (line 857) | ArgumentMismatch(std::string name, int expected, std::size_t rec...
method ArgumentMismatch (line 864) | static ArgumentMismatch AtLeast(std::string name, int num, std::...
method ArgumentMismatch (line 868) | static ArgumentMismatch AtMost(std::string name, int num, std::s...
method ArgumentMismatch (line 872) | static ArgumentMismatch TypedAtLeast(std::string name, int num, ...
method ArgumentMismatch (line 875) | static ArgumentMismatch FlagOverride(std::string name) {
method ArgumentMismatch (line 878) | static ArgumentMismatch PartialType(std::string name, int num, s...
class RequiresError (line 885) | class RequiresError : public ParseError {
method RequiresError (line 887) | RequiresError(std::string curname, std::string subname)
class ExcludesError (line 892) | class ExcludesError : public ParseError {
method ExcludesError (line 894) | ExcludesError(std::string curname, std::string subname)
class ExtrasError (line 899) | class ExtrasError : public ParseError {
method ExtrasError (line 901) | explicit ExtrasError(std::vector<std::string> args)
method ExtrasError (line 906) | ExtrasError(const std::string &name, std::vector<std::string> args)
class ConfigError (line 915) | class ConfigError : public ParseError {
method ConfigError (line 918) | static ConfigError Extras(std::string item) { return ConfigError...
method ConfigError (line 919) | static ConfigError NotConfigurable(std::string item) {
class InvalidError (line 925) | class InvalidError : public ParseError {
method InvalidError (line 927) | explicit InvalidError(std::string name)
class HorribleError (line 934) | class HorribleError : public ParseError {
class OptionNotFound (line 942) | class OptionNotFound : public Error {
method OptionNotFound (line 944) | explicit OptionNotFound(std::string name) : OptionNotFound(nam...
method namespace (line 958) | namespace detail {
type make_void (line 975) | struct make_void {
type is_bool (line 986) | struct is_bool : std::false_type {}
type is_bool<bool> (line 989) | struct is_bool<bool> : std::true_type {}
type is_shared_ptr (line 992) | struct is_shared_ptr : std::false_type {}
type is_shared_ptr<std::shared_ptr<T>> (line 995) | struct is_shared_ptr<std::shared_ptr<T>> : std::true_type {}
type is_shared_ptr<const std::shared_ptr<T>> (line 998) | struct is_shared_ptr<const std::shared_ptr<T>> : std::true_type {}
type is_copyable_ptr (line 1001) | struct is_copyable_ptr {
type IsMemberType (line 1006) | struct IsMemberType {
type IsMemberType<const char *> (line 1011) | struct IsMemberType<const char *> {
method namespace (line 1015) | namespace detail {
method namespace (line 2519) | namespace detail {
method namespace (line 2544) | namespace detail {
class App (line 2660) | class App
type ConfigItem (line 2663) | struct ConfigItem {
class Config (line 2682) | class Config {
method from_file (line 2705) | std::vector<ConfigItem> from_file(const std::string &name) const {
class ConfigBase (line 2718) | class ConfigBase : public Config {
method ConfigBase (line 2749) | ConfigBase *comment(char cchar) {
method ConfigBase (line 2754) | ConfigBase *arrayBounds(char aStart, char aEnd) {
method ConfigBase (line 2760) | ConfigBase *arrayDelimiter(char aSep) {
method ConfigBase (line 2765) | ConfigBase *valueSeparator(char vSep) {
method ConfigBase (line 2770) | ConfigBase *quoteCharacter(char qString, char qChar) {
method ConfigBase (line 2776) | ConfigBase *maxLayers(uint8_t layers) {
method ConfigBase (line 2781) | ConfigBase *parentSeparator(char sep) {
method CLI11_NODISCARD (line 2788) | CLI11_NODISCARD const std::string §ion() const { return conf...
method ConfigBase (line 2790) | ConfigBase *section(const std::string §ionName) {
method CLI11_NODISCARD (line 2798) | CLI11_NODISCARD int16_t index() const { return configIndex; }
method ConfigBase (line 2800) | ConfigBase *index(int16_t sectionIndex) {
class ConfigINI (line 2810) | class ConfigINI : public ConfigTOML {
method ConfigINI (line 2813) | ConfigINI() {
class Option (line 2824) | class Option
class Validator (line 2836) | class Validator {
method Validator (line 2853) | Validator(std::string validator_desc, std::function<std::string(...
method Validator (line 2857) | Validator() = default;
method Validator (line 2859) | explicit Validator(std::string validator_desc) : desc_function_(...
method Validator (line 2861) | Validator(std::function<std::string(std::string &)> op, std::str...
method Validator (line 2865) | Validator &operation(std::function<std::string(std::string &)> o...
method Validator (line 2881) | Validator &description(std::string validator_desc) {
method CLI11_NODISCARD (line 2901) | CLI11_NODISCARD Validator name(std::string validator_name) const {
method CLI11_NODISCARD (line 2907) | CLI11_NODISCARD const std::string &get_name() const { return name_; }
method Validator (line 2909) | Validator &active(bool active_val = true) {
method Validator (line 2853) | Validator(std::string validator_desc, std::function<std::string(...
method Validator (line 2857) | Validator() = default;
method Validator (line 2859) | explicit Validator(std::string validator_desc) : desc_function_(...
method Validator (line 2861) | Validator(std::function<std::string(std::string &)> op, std::str...
method Validator (line 2865) | Validator &operation(std::function<std::string(std::string &)> o...
method Validator (line 2881) | Validator &description(std::string validator_desc) {
method CLI11_NODISCARD (line 2914) | CLI11_NODISCARD Validator active(bool active_val = true) const {
method Validator (line 2921) | Validator &non_modifying(bool no_modify = true) {
method Validator (line 2853) | Validator(std::string validator_desc, std::function<std::string(...
method Validator (line 2857) | Validator() = default;
method Validator (line 2859) | explicit Validator(std::string validator_desc) : desc_function_(...
method Validator (line 2861) | Validator(std::function<std::string(std::string &)> op, std::str...
method Validator (line 2865) | Validator &operation(std::function<std::string(std::string &)> o...
method Validator (line 2881) | Validator &description(std::string validator_desc) {
method Validator (line 2926) | Validator &application_index(int app_index) {
method Validator (line 2853) | Validator(std::string validator_desc, std::function<std::string(...
method Validator (line 2857) | Validator() = default;
method Validator (line 2859) | explicit Validator(std::string validator_desc) : desc_function_(...
method Validator (line 2861) | Validator(std::function<std::string(std::string &)> op, std::str...
method Validator (line 2865) | Validator &operation(std::function<std::string(std::string &)> o...
method Validator (line 2881) | Validator &description(std::string validator_desc) {
method CLI11_NODISCARD (line 2931) | CLI11_NODISCARD Validator application_index(int app_index) const {
method CLI11_NODISCARD (line 2937) | CLI11_NODISCARD int get_application_index() const { return applica...
method CLI11_NODISCARD (line 2939) | CLI11_NODISCARD bool get_active() const { return active_; }
method CLI11_NODISCARD (line 2942) | CLI11_NODISCARD bool get_modifying() const { return !non_modifying...
class CustomValidator (line 2960) | class CustomValidator : public Validator {
method namespace (line 2966) | namespace detail {
class TypeValidator (line 3024) | class TypeValidator : public Validator {
method TypeValidator (line 3026) | explicit TypeValidator(const std::string &validator_name)
method TypeValidator (line 3035) | TypeValidator() : TypeValidator(detail::type_name<DesiredType>()) {}
class FileOnDefaultPath (line 3043) | class FileOnDefaultPath : public Validator {
class Range (line 3049) | class Range : public Validator {
method Range (line 3056) | Range(T min_val, T max_val, const std::string &validator_name = st...
method Range (line 3079) | explicit Range(T max_val, const std::string &validator_name = std:...
class Bound (line 3090) | class Bound : public Validator {
method Bound (line 3096) | Bound(T min_val, T max_val) {
method Bound (line 3118) | explicit Bound(T max_val) : Bound(static_cast<T>(0), max_val) {}
method namespace (line 3121) | namespace detail {
class IsMember (line 3262) | class IsMember : public Validator {
method IsMember (line 3268) | IsMember(std::initializer_list<T> values, Args &&...args)
method IsMember (line 3272) | explicit IsMember(T &&set) : IsMember(std::forward<T>(set), nullpt...
method IsMember (line 3276) | explicit IsMember(T set, F filter_function) {
method IsMember (line 3321) | IsMember(T &&set, filter_fn_t filter_fn_1, filter_fn_t filter_fn_2...
class Transformer (line 3332) | class Transformer : public Validator {
method Transformer (line 3338) | Transformer(std::initializer_list<std::pair<std::string, std::stri...
method Transformer (line 3342) | explicit Transformer(T &&mapping) : Transformer(std::forward<T>(ma...
method Transformer (line 3346) | explicit Transformer(T mapping, F filter_function) {
method Transformer (line 3383) | Transformer(T &&mapping, filter_fn_t filter_fn_1, filter_fn_t filt...
class CheckedTransformer (line 3391) | class CheckedTransformer : public Validator {
method CheckedTransformer (line 3397) | CheckedTransformer(std::initializer_list<std::pair<std::string, st...
method CheckedTransformer (line 3401) | explicit CheckedTransformer(T mapping) : CheckedTransformer(std::m...
method CheckedTransformer (line 3405) | explicit CheckedTransformer(T mapping, F filter_function) {
method CheckedTransformer (line 3460) | CheckedTransformer(T &&mapping, filter_fn_t filter_fn_1, filter_fn...
method ignore_case (line 3468) | inline std::string ignore_case(std::string item) { return detail::to...
method ignore_underscore (line 3471) | inline std::string ignore_underscore(std::string item) { return deta...
method ignore_space (line 3474) | inline std::string ignore_space(std::string item) {
class AsNumberWithUnit (line 3491) | class AsNumberWithUnit : public Validator {
type Options (line 3497) | enum Options {
method AsNumberWithUnit (line 3506) | explicit AsNumberWithUnit(std::map<std::string, Number> mapping,
method validate_mapping (line 3582) | static void validate_mapping(std::map<std::string, Number> &mappin...
method generate_description (line 3608) | static std::string generate_description(const std::string &name, O...
class AsSizeValue (line 3635) | class AsSizeValue : public AsNumberWithUnit {
method namespace (line 3656) | namespace detail {
function CLI11_INLINE (line 3688) | CLI11_INLINE Validator Validator::operator&(const Validator &other) co...
function CLI11_INLINE (line 3710) | CLI11_INLINE Validator Validator::operator|(const Validator &other) co...
function CLI11_INLINE (line 3732) | CLI11_INLINE Validator Validator::operator!() const {
function CLI11_INLINE (line 3754) | CLI11_INLINE void
type detail (line 3770) | namespace detail {
function join (line 201) | std::string join(const T &v, std::string delim = ",") {
function join (line 217) | std::string join(const T &v, Callable func, std::string delim = ",") {
function rjoin (line 234) | std::string rjoin(const T &v, std::string delim = ",") {
function trim_copy (line 265) | inline std::string trim_copy(const std::string &str) {
function trim_copy (line 280) | inline std::string trim_copy(const std::string &str, const std::stri...
function valid_first_char (line 293) | bool valid_first_char(T c) { return ((c != '-') && (c != '!') && (c ...
function valid_later_char (line 296) | bool valid_later_char(T c) {
function valid_alias_name_string (line 307) | inline bool valid_alias_name_string(const std::string &str) {
function is_separator (line 313) | inline bool is_separator(const std::string &str) {
function isalpha (line 319) | inline bool isalpha(const std::string &str) {
function to_lower (line 324) | inline std::string to_lower(std::string str) {
function remove_underscore (line 332) | inline std::string remove_underscore(std::string str) {
function has_default_flag_values (line 341) | inline bool has_default_flag_values(const std::string &flags) {
function find_and_modify (line 355) | inline std::string find_and_modify(std::string str, std::string trig...
function CLI11_INLINE (line 382) | CLI11_INLINE std::vector<std::string> split(const std::string &s, ch...
function CLI11_INLINE (line 398) | CLI11_INLINE std::string <rim(std::string &str) {
function CLI11_INLINE (line 404) | CLI11_INLINE std::string <rim(std::string &str, const std::string ...
function CLI11_INLINE (line 410) | CLI11_INLINE std::string &rtrim(std::string &str) {
function CLI11_INLINE (line 416) | CLI11_INLINE std::string &rtrim(std::string &str, const std::string ...
function CLI11_INLINE (line 423) | CLI11_INLINE std::string &remove_quotes(std::string &str) {
function CLI11_INLINE (line 433) | CLI11_INLINE std::string fix_newlines(const std::string &leader, std...
function CLI11_INLINE (line 445) | CLI11_INLINE std::ostream &
function CLI11_INLINE (line 463) | CLI11_INLINE std::ostream &format_aliases(std::ostream &out, const s...
function CLI11_INLINE (line 480) | CLI11_INLINE bool valid_name_string(const std::string &str) {
function CLI11_INLINE (line 491) | CLI11_INLINE std::string find_and_replace(std::string str, std::stri...
function CLI11_INLINE (line 503) | CLI11_INLINE void remove_default_flag_values(std::string &flags) {
function CLI11_INLINE (line 516) | CLI11_INLINE std::ptrdiff_t
function CLI11_INLINE (line 544) | CLI11_INLINE std::vector<std::string> split_up(std::string str, char...
function CLI11_INLINE (line 596) | CLI11_INLINE std::size_t escape_detect(std::string &str, std::size_t...
function CLI11_INLINE (line 608) | CLI11_INLINE std::string &add_quotes_if_needed(std::string &str) {
function CLI11_INLINE (line 3773) | CLI11_INLINE path_type check_path(const char *file) noexcept {
function CLI11_INLINE (line 3797) | CLI11_INLINE path_type check_path(const char *file) noexcept {
function CLI11_INLINE (line 3906) | CLI11_INLINE AsSizeValue::AsSizeValue(bool kb_is_1000) : AsNumberWithUni...
function CLI11_INLINE (line 3914) | CLI11_INLINE std::map<std::string, AsSizeValue::result_t> AsSizeValue::i...
function CLI11_INLINE (line 3932) | CLI11_INLINE std::map<std::string, AsSizeValue::result_t> AsSizeValue::g...
type detail (line 3941) | namespace detail {
function CLI11_INLINE (line 3943) | CLI11_INLINE std::pair<std::string, std::string> split_program_name(st...
type Classifier (line 5582) | enum class Classifier { NONE, POSITIONAL_MARK, SHORT, LONG, WINDOWS_ST...
type AppFriend (line 5583) | struct AppFriend
method parse_arg (line 6901) | static decltype(auto) parse_arg(App *app, Args &&...args) {
method parse_subcommand (line 6906) | static decltype(auto) parse_subcommand(App *app, Args &&...args) {
method parse_arg (line 6912) | static auto parse_arg(App *app, Args &&...args) ->
method parse_subcommand (line 6919) | static auto parse_subcommand(App *app, Args &&...args) ->
method App (line 6925) | static App *get_fallthrough_parent(App *app) { return app->_get_fall...
function Option (line 5606) | Option *default_flag_modifiers(Option *opt) {
function Option (line 5612) | Option *default_flag_modifiers(Option *opt) {
type AppFriend (line 6897) | struct AppFriend {
method parse_arg (line 6901) | static decltype(auto) parse_arg(App *app, Args &&...args) {
method parse_subcommand (line 6906) | static decltype(auto) parse_subcommand(App *app, Args &&...args) {
method parse_arg (line 6912) | static auto parse_arg(App *app, Args &&...args) ->
method parse_subcommand (line 6919) | static auto parse_subcommand(App *app, Args &&...args) ->
method App (line 6925) | static App *get_fallthrough_parent(App *app) { return app->_get_fall...
function CLI11_INLINE (line 9039) | CLI11_INLINE std::string convert_arg_for_ini(const std::string &arg, c...
function CLI11_INLINE (line 9083) | CLI11_INLINE std::string ini_join(const std::vector<std::string> &args,
function CLI11_INLINE (line 9109) | CLI11_INLINE std::vector<std::string>
function CLI11_INLINE (line 9134) | CLI11_INLINE void
class Option (line 3994) | class Option
class App (line 3995) | class App
type startup_mode (line 5768) | enum class startup_mode : char { stable, enabled, disabled }
method App (line 5830) | explicit App(std::string app_description = "", std::string app_name = "")
method App (line 5835) | App(const App &) = delete;
method App (line 5836) | App &operator=(const App &) = delete;
method App (line 5847) | App *callback(std::function<void()> app_callback) {
method App (line 5858) | App *final_callback(std::function<void()> app_callback) {
method App (line 5865) | App *parse_complete_callback(std::function<void()> pc_callback) {
method App (line 5872) | App *preparse_callback(std::function<void(std::size_t)> pp_callback) {
method App (line 5884) | App *allow_extras(bool allow = true) {
method App (line 5890) | App *required(bool require = true) {
method App (line 5896) | App *disabled(bool disable = true) {
method App (line 5902) | App *silent(bool silence = true) {
method App (line 5908) | App *disabled_by_default(bool disable = true) {
method App (line 5919) | App *enabled_by_default(bool enable = true) {
method App (line 5933) | App *validate_positionals(bool validate = true) {
method App (line 5939) | App *validate_optional_arguments(bool validate = true) {
method App (line 5945) | App *allow_config_extras(bool allow = true) {
method App (line 5956) | App *allow_config_extras(config_extras_mode mode) {
method App (line 5962) | App *prefix_command(bool allow = true) {
method App (line 5972) | App *allow_windows_style_options(bool value = true) {
method App (line 5978) | App *positionals_at_end(bool value = true) {
method App (line 5984) | App *configurable(bool value = true) {
method App (line 5993) | App *formatter(std::shared_ptr<FormatterBase> fmt) {
method App (line 5999) | App *formatter_fn(std::function<std::string(const App *, std::string, ...
method App (line 6005) | App *config_formatter(std::shared_ptr<Config> fmt) {
method CLI11_NODISCARD (line 6011) | CLI11_NODISCARD bool parsed() const { return parsed_ > 0; }
method OptionDefaults (line 6014) | OptionDefaults *option_defaults() { return &option_defaults_; }
method Option (line 6044) | Option *add_option(std::string option_name,
method Option (line 6068) | Option *add_option_no_stream(std::string option_name,
method Option (line 6086) | Option *add_option_function(std::string option_name,
method Option (line 6107) | Option *add_option(std::string option_name) {
method Option (line 6115) | Option *add_option(std::string option_name, T &option_description) {
method Option (line 6141) | Option *add_flag(std::string flag_name) { return _add_flag_internal(fl...
method Option (line 6149) | Option *add_flag(std::string flag_name, T &flag_description) {
method Option (line 6159) | Option *add_flag(std::string flag_name,
method Option (line 6175) | Option *add_flag(std::string flag_name,
method Option (line 6204) | Option *add_flag(std::string flag_name,
method T (line 6222) | T *add_option_group(std::string group_name, std::string group_descript...
method App (line 6279) | App *group(std::string group_name) {
method App (line 6285) | App *require_subcommand() {
method App (line 6294) | App *require_subcommand(int value) {
method App (line 6307) | App *require_subcommand(std::size_t min, std::size_t max) {
method App (line 6314) | App *require_option() {
method App (line 6323) | App *require_option(int value) {
method App (line 6336) | App *require_option(std::size_t min, std::size_t max) {
method App (line 6344) | App *fallthrough(bool value = true) {
method pre_callback (line 6360) | virtual void pre_callback() {}
method failure_message (line 6389) | void failure_message(std::function<std::string(const App *, const Erro...
type AppFormatMode (line 4002) | enum class AppFormatMode {
class FormatterBase (line 4012) | class FormatterBase {
method FormatterBase (line 4029) | FormatterBase() = default;
method FormatterBase (line 4030) | FormatterBase(const FormatterBase &) = default;
method FormatterBase (line 4031) | FormatterBase(FormatterBase &&) = default;
method FormatterBase (line 4032) | FormatterBase &operator=(const FormatterBase &) = default;
method FormatterBase (line 4033) | FormatterBase &operator=(FormatterBase &&) = default;
method label (line 4046) | void label(std::string key, std::string val) { labels_[key] = val; }
method column_width (line 4049) | void column_width(std::size_t val) { column_width_ = val; }
class FormatterLambda (line 4069) | class FormatterLambda final : public FormatterBase {
method FormatterLambda (line 4077) | explicit FormatterLambda(funct_t funct) : lambda_(std::move(funct)) {}
method make_help (line 4083) | std::string make_help(const App *app, std::string name, AppFormatMode ...
class Formatter (line 4090) | class Formatter : public FormatterBase {
method Formatter (line 4092) | Formatter() = default;
method Formatter (line 4093) | Formatter(const Formatter &) = default;
method Formatter (line 4094) | Formatter(Formatter &&) = default;
method Formatter (line 4095) | Formatter &operator=(const Formatter &) = default;
method Formatter (line 4096) | Formatter &operator=(Formatter &&) = default;
method make_option (line 4138) | virtual std::string make_option(const Option *opt, bool is_positional)...
class Option (line 4167) | class Option
class App (line 4168) | class App
type startup_mode (line 5768) | enum class startup_mode : char { stable, enabled, disabled }
method App (line 5830) | explicit App(std::string app_description = "", std::string app_name = "")
method App (line 5835) | App(const App &) = delete;
method App (line 5836) | App &operator=(const App &) = delete;
method App (line 5847) | App *callback(std::function<void()> app_callback) {
method App (line 5858) | App *final_callback(std::function<void()> app_callback) {
method App (line 5865) | App *parse_complete_callback(std::function<void()> pc_callback) {
method App (line 5872) | App *preparse_callback(std::function<void(std::size_t)> pp_callback) {
method App (line 5884) | App *allow_extras(bool allow = true) {
method App (line 5890) | App *required(bool require = true) {
method App (line 5896) | App *disabled(bool disable = true) {
method App (line 5902) | App *silent(bool silence = true) {
method App (line 5908) | App *disabled_by_default(bool disable = true) {
method App (line 5919) | App *enabled_by_default(bool enable = true) {
method App (line 5933) | App *validate_positionals(bool validate = true) {
method App (line 5939) | App *validate_optional_arguments(bool validate = true) {
method App (line 5945) | App *allow_config_extras(bool allow = true) {
method App (line 5956) | App *allow_config_extras(config_extras_mode mode) {
method App (line 5962) | App *prefix_command(bool allow = true) {
method App (line 5972) | App *allow_windows_style_options(bool value = true) {
method App (line 5978) | App *positionals_at_end(bool value = true) {
method App (line 5984) | App *configurable(bool value = true) {
method App (line 5993) | App *formatter(std::shared_ptr<FormatterBase> fmt) {
method App (line 5999) | App *formatter_fn(std::function<std::string(const App *, std::string, ...
method App (line 6005) | App *config_formatter(std::shared_ptr<Config> fmt) {
method CLI11_NODISCARD (line 6011) | CLI11_NODISCARD bool parsed() const { return parsed_ > 0; }
method OptionDefaults (line 6014) | OptionDefaults *option_defaults() { return &option_defaults_; }
method Option (line 6044) | Option *add_option(std::string option_name,
method Option (line 6068) | Option *add_option_no_stream(std::string option_name,
method Option (line 6086) | Option *add_option_function(std::string option_name,
method Option (line 6107) | Option *add_option(std::string option_name) {
method Option (line 6115) | Option *add_option(std::string option_name, T &option_description) {
method Option (line 6141) | Option *add_flag(std::string flag_name) { return _add_flag_internal(fl...
method Option (line 6149) | Option *add_flag(std::string flag_name, T &flag_description) {
method Option (line 6159) | Option *add_flag(std::string flag_name,
method Option (line 6175) | Option *add_flag(std::string flag_name,
method Option (line 6204) | Option *add_flag(std::string flag_name,
method T (line 6222) | T *add_option_group(std::string group_name, std::string group_descript...
method App (line 6279) | App *group(std::string group_name) {
method App (line 6285) | App *require_subcommand() {
method App (line 6294) | App *require_subcommand(int value) {
method App (line 6307) | App *require_subcommand(std::size_t min, std::size_t max) {
method App (line 6314) | App *require_option() {
method App (line 6323) | App *require_option(int value) {
method App (line 6336) | App *require_option(std::size_t min, std::size_t max) {
method App (line 6344) | App *fallthrough(bool value = true) {
method pre_callback (line 6360) | virtual void pre_callback() {}
method failure_message (line 6389) | void failure_message(std::function<std::string(const App *, const Erro...
type MultiOptionPolicy (line 4172) | enum class MultiOptionPolicy : char {
class OptionBase (line 4183) | class OptionBase {
method CRTP (line 4221) | CRTP *group(const std::string &name) {
method CRTP (line 4230) | CRTP *required(bool value = true) {
method CRTP (line 4236) | CRTP *mandatory(bool value = true) { return required(value); }
method CRTP (line 4238) | CRTP *always_capture_default(bool value = true) {
method CLI11_NODISCARD (line 4246) | CLI11_NODISCARD const std::string &get_group() const { return group_; }
method CLI11_NODISCARD (line 4249) | CLI11_NODISCARD bool get_required() const { return required_; }
method CLI11_NODISCARD (line 4252) | CLI11_NODISCARD bool get_ignore_case() const { return ignore_case_; }
method CLI11_NODISCARD (line 4255) | CLI11_NODISCARD bool get_ignore_underscore() const { return ignore_und...
method CLI11_NODISCARD (line 4258) | CLI11_NODISCARD bool get_configurable() const { return configurable_; }
method CLI11_NODISCARD (line 4261) | CLI11_NODISCARD bool get_disable_flag_override() const { return disabl...
method CLI11_NODISCARD (line 4264) | CLI11_NODISCARD char get_delimiter() const { return delimiter_; }
method CLI11_NODISCARD (line 4267) | CLI11_NODISCARD bool get_always_capture_default() const { return alway...
method get_multi_option_policy (line 4270) | get_multi_option_policy() const { return multi_option_policy_; }
method CRTP (line 4275) | CRTP *take_last() {
method CRTP (line 4282) | CRTP *take_first() {
method CRTP (line 4289) | CRTP *take_all() {
method CRTP (line 4296) | CRTP *join() {
method CRTP (line 4303) | CRTP *join(char delim) {
method CRTP (line 4311) | CRTP *configurable(bool value = true) {
method CRTP (line 4317) | CRTP *delimiter(char value = '\0') {
class OptionDefaults (line 4325) | class OptionDefaults : public OptionBase<OptionDefaults> {
method OptionDefaults (line 4327) | OptionDefaults() = default;
method OptionDefaults (line 4332) | OptionDefaults *multi_option_policy(MultiOptionPolicy value = MultiOpt...
method OptionDefaults (line 4338) | OptionDefaults *ignore_case(bool value = true) {
method OptionDefaults (line 4344) | OptionDefaults *ignore_underscore(bool value = true) {
method OptionDefaults (line 4350) | OptionDefaults *disable_flag_override(bool value = true) {
method OptionDefaults (line 4356) | OptionDefaults *delimiter(char value = '\0') {
function empty (line 4362) | class Option : public OptionBase<Option> {
function clear (line 4497) | void clear() {
function Option (line 4514) | Option *allow_extra_args(bool value = true) {
function CLI11_NODISCARD (line 4519) | CLI11_NODISCARD bool get_allow_extra_args() const { return allow_extra_a...
function Option (line 4521) | Option *trigger_on_parse(bool value = true) {
function CLI11_NODISCARD (line 4526) | CLI11_NODISCARD bool get_trigger_on_parse() const { return trigger_on_re...
function Option (line 4529) | Option *force_callback(bool value = true) {
function CLI11_NODISCARD (line 4534) | CLI11_NODISCARD bool get_force_callback() const { return force_callback_; }
function Option (line 4538) | Option *run_callback_for_default(bool value = true) {
function CLI11_NODISCARD (line 4543) | CLI11_NODISCARD bool get_run_callback_for_default() const { return run_c...
function Option (line 4571) | Option *needs(Option *opt) {
function Option (line 4579) | Option *needs(std::string opt_name) {
function Option (line 4588) | Option *needs(A opt, B opt1, ARG... args) {
function Option (line 4600) | Option *excludes(std::string opt_name) {
function Option (line 4609) | Option *excludes(A opt, B opt1, ARG... args) {
function Option (line 4618) | Option *envname(std::string name) {
function Option (line 4639) | Option *disable_flag_override(bool value = true) {
function CLI11_NODISCARD (line 4648) | CLI11_NODISCARD int get_type_size() const { return type_size_min_; }
function CLI11_NODISCARD (line 4651) | CLI11_NODISCARD int get_type_size_min() const { return type_size_min_; }
function CLI11_NODISCARD (line 4653) | CLI11_NODISCARD int get_type_size_max() const { return type_size_max_; }
function CLI11_NODISCARD (line 4656) | CLI11_NODISCARD bool get_inject_separator() const { return inject_separa...
function CLI11_NODISCARD (line 4659) | CLI11_NODISCARD std::string get_envname() const { return envname_; }
function CLI11_NODISCARD (line 4662) | CLI11_NODISCARD std::set<Option *> get_needs() const { return needs_; }
function CLI11_NODISCARD (line 4665) | CLI11_NODISCARD std::set<Option *> get_excludes() const { return exclude...
function CLI11_NODISCARD (line 4668) | CLI11_NODISCARD std::string get_default_str() const { return default_str...
function CLI11_NODISCARD (line 4671) | CLI11_NODISCARD callback_t get_callback() const { return callback_; }
function CLI11_NODISCARD (line 4674) | CLI11_NODISCARD const std::vector<std::string> &get_lnames() const { ret...
function CLI11_NODISCARD (line 4677) | CLI11_NODISCARD const std::vector<std::string> &get_snames() const { ret...
function CLI11_NODISCARD (line 4680) | CLI11_NODISCARD const std::vector<std::string> &get_fnames() const { ret...
function CLI11_NODISCARD (line 4682) | CLI11_NODISCARD const std::string &get_single_name() const {
function CLI11_NODISCARD (line 4695) | CLI11_NODISCARD int get_expected() const { return expected_min_; }
function CLI11_NODISCARD (line 4698) | CLI11_NODISCARD int get_expected_min() const { return expected_min_; }
function CLI11_NODISCARD (line 4700) | CLI11_NODISCARD int get_expected_max() const { return expected_max_; }
function CLI11_NODISCARD (line 4703) | CLI11_NODISCARD int get_items_expected_min() const { return type_size_mi...
function CLI11_NODISCARD (line 4706) | CLI11_NODISCARD int get_items_expected_max() const {
function CLI11_NODISCARD (line 4711) | CLI11_NODISCARD int get_items_expected() const { return get_items_expect...
function CLI11_NODISCARD (line 4714) | CLI11_NODISCARD bool get_positional() const { return pname_.length() > 0; }
function CLI11_NODISCARD (line 4717) | CLI11_NODISCARD bool nonpositional() const { return (snames_.size() + ln...
function CLI11_NODISCARD (line 4720) | CLI11_NODISCARD bool has_description() const { return description_.lengt...
function CLI11_NODISCARD (line 4723) | CLI11_NODISCARD const std::string &get_description() const { return desc...
function Option (line 4726) | Option *description(std::string option_description) {
function Option (line 4731) | Option *option_text(std::string text) {
function CLI11_NODISCARD (line 4736) | CLI11_NODISCARD const std::string &get_option_text() const { return opti...
function CLI11_NODISCARD (line 4767) | CLI11_NODISCARD bool check_sname(std::string name) const {
function CLI11_NODISCARD (line 4772) | CLI11_NODISCARD bool check_lname(std::string name) const {
function CLI11_NODISCARD (line 4777) | CLI11_NODISCARD bool check_fname(std::string name) const {
function CLI11_NODISCARD (line 4798) | CLI11_NODISCARD const results_t &results() const { return results_; }
function results (line 4804) | void results(T &output) const {
function CLI11_NODISCARD (line 4835) | CLI11_NODISCARD T as() const {
function CLI11_NODISCARD (line 4842) | CLI11_NODISCARD bool get_callback_run() const { return (current_option_s...
function Option (line 4849) | Option *type_name_fn(std::function<std::string()> typefun) {
function Option (line 4855) | Option *type_name(std::string typeval) {
function inject_separator (line 4867) | void inject_separator(bool value = true) { inject_separator_ = value; }
function Option (line 4870) | Option *default_function(const std::function<std::string()> &func) {
function Option (line 4876) | Option *capture_default_str() {
function Option (line 4884) | Option *default_str(std::string val) {
function Option (line 4891) | Option *default_val(const X &val) {
function CLI11_INLINE (line 4951) | CLI11_INLINE Option *Option::expected(int value) {
function CLI11_INLINE (line 4972) | CLI11_INLINE Option *Option::expected(int value_min, int value_max) {
function CLI11_INLINE (line 4991) | CLI11_INLINE Option *Option::check(Validator validator, const std::strin...
function CLI11_INLINE (line 4999) | CLI11_INLINE Option *Option::check(std::function<std::string(const std::...
function CLI11_INLINE (line 5007) | CLI11_INLINE Option *Option::transform(Validator Validator, const std::s...
function CLI11_INLINE (line 5014) | CLI11_INLINE Option *Option::transform(const std::function<std::string(s...
function CLI11_INLINE (line 5029) | CLI11_INLINE Option *Option::each(const std::function<void(std::string)>...
function CLI11_INLINE (line 5039) | CLI11_INLINE Validator *Option::get_validator(const std::string &Validat...
function CLI11_INLINE (line 5051) | CLI11_INLINE Validator *Option::get_validator(int index) {
function CLI11_INLINE (line 5059) | CLI11_INLINE bool Option::remove_needs(Option *opt) {
function CLI11_INLINE (line 5069) | CLI11_INLINE Option *Option::excludes(Option *opt) {
function CLI11_INLINE (line 5084) | CLI11_INLINE bool Option::remove_excludes(Option *opt) {
function Option (line 5094) | Option *Option::ignore_case(bool value) {
function Option (line 5114) | Option *Option::ignore_underscore(bool value) {
function CLI11_INLINE (line 5135) | CLI11_INLINE Option *Option::multi_option_policy(MultiOptionPolicy value) {
function CLI11_NODISCARD (line 5148) | CLI11_NODISCARD CLI11_INLINE std::string Option::get_name(bool positiona...
function CLI11_INLINE (line 5201) | CLI11_INLINE void Option::run_callback() {
function CLI11_NODISCARD (line 5227) | CLI11_NODISCARD CLI11_INLINE const std::string &Option::matching_name(co...
function CLI11_NODISCARD (line 5248) | CLI11_NODISCARD CLI11_INLINE bool Option::check_name(const std::string &...
function CLI11_NODISCARD (line 5277) | CLI11_NODISCARD CLI11_INLINE std::string Option::get_flag_value(const st...
function CLI11_INLINE (line 5320) | CLI11_INLINE Option *Option::add_result(std::string s) {
function CLI11_INLINE (line 5326) | CLI11_INLINE Option *Option::add_result(std::string s, int &results_adde...
function CLI11_INLINE (line 5332) | CLI11_INLINE Option *Option::add_result(std::vector<std::string> s) {
function CLI11_NODISCARD (line 5340) | CLI11_NODISCARD CLI11_INLINE results_t Option::reduced_results() const {
function CLI11_INLINE (line 5358) | CLI11_INLINE Option *Option::type_size(int option_type_size) {
function CLI11_INLINE (line 5377) | CLI11_INLINE Option *Option::type_size(int option_type_size_min, int opt...
function CLI11_NODISCARD (line 5401) | CLI11_NODISCARD CLI11_INLINE std::string Option::get_type_name() const {
function CLI11_INLINE (line 5414) | CLI11_INLINE void Option::_validate_results(results_t &res) const {
function CLI11_INLINE (line 5452) | CLI11_INLINE void Option::_reduce_results(results_t &out, const results_...
function CLI11_INLINE (line 5516) | CLI11_INLINE std::string Option::_validate(std::string &result, int inde...
function CLI11_INLINE (line 5538) | CLI11_INLINE int Option::_add_result(std::string &&result, std::vector<s...
type detail (line 5581) | namespace detail {
function CLI11_INLINE (line 3943) | CLI11_INLINE std::pair<std::string, std::string> split_program_name(st...
type Classifier (line 5582) | enum class Classifier { NONE, POSITIONAL_MARK, SHORT, LONG, WINDOWS_ST...
type AppFriend (line 5583) | struct AppFriend
method parse_arg (line 6901) | static decltype(auto) parse_arg(App *app, Args &&...args) {
method parse_subcommand (line 6906) | static decltype(auto) parse_subcommand(App *app, Args &&...args) {
method parse_arg (line 6912) | static auto parse_arg(App *app, Args &&...args) ->
method parse_subcommand (line 6919) | static auto parse_subcommand(App *app, Args &&...args) ->
method App (line 6925) | static App *get_fallthrough_parent(App *app) { return app->_get_fall...
function Option (line 5606) | Option *default_flag_modifiers(Option *opt) {
function Option (line 5612) | Option *default_flag_modifiers(Option *opt) {
type AppFriend (line 6897) | struct AppFriend {
method parse_arg (line 6901) | static decltype(auto) parse_arg(App *app, Args &&...args) {
method parse_subcommand (line 6906) | static decltype(auto) parse_subcommand(App *app, Args &&...args) {
method parse_arg (line 6912) | static auto parse_arg(App *app, Args &&...args) ->
method parse_subcommand (line 6919) | static auto parse_subcommand(App *app, Args &&...args) ->
method App (line 6925) | static App *get_fallthrough_parent(App *app) { return app->_get_fall...
function CLI11_INLINE (line 9039) | CLI11_INLINE std::string convert_arg_for_ini(const std::string &arg, c...
function CLI11_INLINE (line 9083) | CLI11_INLINE std::string ini_join(const std::vector<std::string> &args,
function CLI11_INLINE (line 9109) | CLI11_INLINE std::vector<std::string>
function CLI11_INLINE (line 9134) | CLI11_INLINE void
type FailureMessage (line 5586) | namespace FailureMessage {
function CLI11_INLINE (line 8987) | CLI11_INLINE std::string simple(const App *app, const Error &e) {
function CLI11_INLINE (line 9005) | CLI11_INLINE std::string help(const App *app, const Error &e) {
type config_extras_mode (line 5596) | enum class config_extras_mode : char { error = 0, ignore, ignore_all, ca...
class App (line 5598) | class App
type startup_mode (line 5768) | enum class startup_mode : char { stable, enabled, disabled }
method App (line 5830) | explicit App(std::string app_description = "", std::string app_name = "")
method App (line 5835) | App(const App &) = delete;
method App (line 5836) | App &operator=(const App &) = delete;
method App (line 5847) | App *callback(std::function<void()> app_callback) {
method App (line 5858) | App *final_callback(std::function<void()> app_callback) {
method App (line 5865) | App *parse_complete_callback(std::function<void()> pc_callback) {
method App (line 5872) | App *preparse_callback(std::function<void(std::size_t)> pp_callback) {
method App (line 5884) | App *allow_extras(bool allow = true) {
method App (line 5890) | App *required(bool require = true) {
method App (line 5896) | App *disabled(bool disable = true) {
method App (line 5902) | App *silent(bool silence = true) {
method App (line 5908) | App *disabled_by_default(bool disable = true) {
method App (line 5919) | App *enabled_by_default(bool enable = true) {
method App (line 5933) | App *validate_positionals(bool validate = true) {
method App (line 5939) | App *validate_optional_arguments(bool validate = true) {
method App (line 5945) | App *allow_config_extras(bool allow = true) {
method App (line 5956) | App *allow_config_extras(config_extras_mode mode) {
method App (line 5962) | App *prefix_command(bool allow = true) {
method App (line 5972) | App *allow_windows_style_options(bool value = true) {
method App (line 5978) | App *positionals_at_end(bool value = true) {
method App (line 5984) | App *configurable(bool value = true) {
method App (line 5993) | App *formatter(std::shared_ptr<FormatterBase> fmt) {
method App (line 5999) | App *formatter_fn(std::function<std::string(const App *, std::string, ...
method App (line 6005) | App *config_formatter(std::shared_ptr<Config> fmt) {
method CLI11_NODISCARD (line 6011) | CLI11_NODISCARD bool parsed() const { return parsed_ > 0; }
method OptionDefaults (line 6014) | OptionDefaults *option_defaults() { return &option_defaults_; }
method Option (line 6044) | Option *add_option(std::string option_name,
method Option (line 6068) | Option *add_option_no_stream(std::string option_name,
method Option (line 6086) | Option *add_option_function(std::string option_name,
method Option (line 6107) | Option *add_option(std::string option_name) {
method Option (line 6115) | Option *add_option(std::string option_name, T &option_description) {
method Option (line 6141) | Option *add_flag(std::string flag_name) { return _add_flag_internal(fl...
method Option (line 6149) | Option *add_flag(std::string flag_name, T &flag_description) {
method Option (line 6159) | Option *add_flag(std::string flag_name,
method Option (line 6175) | Option *add_flag(std::string flag_name,
method Option (line 6204) | Option *add_flag(std::string flag_name,
method T (line 6222) | T *add_option_group(std::string group_name, std::string group_descript...
method App (line 6279) | App *group(std::string group_name) {
method App (line 6285) | App *require_subcommand() {
method App (line 6294) | App *require_subcommand(int value) {
method App (line 6307) | App *require_subcommand(std::size_t min, std::size_t max) {
method App (line 6314) | App *require_option() {
method App (line 6323) | App *require_option(int value) {
method App (line 6336) | App *require_option(std::size_t min, std::size_t max) {
method App (line 6344) | App *fallthrough(bool value = true) {
method pre_callback (line 6360) | virtual void pre_callback() {}
method failure_message (line 6389) | void failure_message(std::function<std::string(const App *, const Erro...
type detail (line 5602) | namespace detail {
function CLI11_INLINE (line 3943) | CLI11_INLINE std::pair<std::string, std::string> split_program_name(st...
type Classifier (line 5582) | enum class Classifier { NONE, POSITIONAL_MARK, SHORT, LONG, WINDOWS_ST...
type AppFriend (line 5583) | struct AppFriend
method parse_arg (line 6901) | static decltype(auto) parse_arg(App *app, Args &&...args) {
method parse_subcommand (line 6906) | static decltype(auto) parse_subcommand(App *app, Args &&...args) {
method parse_arg (line 6912) | static auto parse_arg(App *app, Args &&...args) ->
method parse_subcommand (line 6919) | static auto parse_subcommand(App *app, Args &&...args) ->
method App (line 6925) | static App *get_fallthrough_parent(App *app) { return app->_get_fall...
function Option (line 5606) | Option *default_flag_modifiers(Option *opt) {
function Option (line 5612) | Option *default_flag_modifiers(Option *opt) {
type AppFriend (line 6897) | struct AppFriend {
method parse_arg (line 6901) | static decltype(auto) parse_arg(App *app, Args &&...args) {
method parse_subcommand (line 6906) | static decltype(auto) parse_subcommand(App *app, Args &&...args) {
method parse_arg (line 6912) | static auto parse_arg(App *app, Args &&...args) ->
method parse_subcommand (line 6919) | static auto parse_subcommand(App *app, Args &&...args) ->
method App (line 6925) | static App *get_fallthrough_parent(App *app) { return app->_get_fall...
function CLI11_INLINE (line 9039) | CLI11_INLINE std::string convert_arg_for_ini(const std::string &arg, c...
function CLI11_INLINE (line 9083) | CLI11_INLINE std::string ini_join(const std::vector<std::string> &args,
function CLI11_INLINE (line 9109) | CLI11_INLINE std::vector<std::string>
function CLI11_INLINE (line 9134) | CLI11_INLINE void
class Option_group (line 5618) | class Option_group
method Option_group (line 6825) | Option_group(std::string group_description, std::string group_name, Ap...
method Option (line 6832) | Option *add_option(Option *opt) {
method add_options (line 6840) | void add_options(Option *opt) { add_option(opt); }
method add_options (line 6842) | void add_options(Option *opt, Args... args) {
method App (line 6848) | App *add_subcommand(App *subcom) {
class App (line 5623) | class App {
type startup_mode (line 5768) | enum class startup_mode : char { stable, enabled, disabled }
method App (line 5830) | explicit App(std::string app_description = "", std::string app_name = "")
method App (line 5835) | App(const App &) = delete;
method App (line 5836) | App &operator=(const App &) = delete;
method App (line 5847) | App *callback(std::function<void()> app_callback) {
method App (line 5858) | App *final_callback(std::function<void()> app_callback) {
method App (line 5865) | App *parse_complete_callback(std::function<void()> pc_callback) {
method App (line 5872) | App *preparse_callback(std::function<void(std::size_t)> pp_callback) {
method App (line 5884) | App *allow_extras(bool allow = true) {
method App (line 5890) | App *required(bool require = true) {
method App (line 5896) | App *disabled(bool disable = true) {
method App (line 5902) | App *silent(bool silence = true) {
method App (line 5908) | App *disabled_by_default(bool disable = true) {
method App (line 5919) | App *enabled_by_default(bool enable = true) {
method App (line 5933) | App *validate_positionals(bool validate = true) {
method App (line 5939) | App *validate_optional_arguments(bool validate = true) {
method App (line 5945) | App *allow_config_extras(bool allow = true) {
method App (line 5956) | App *allow_config_extras(config_extras_mode mode) {
method App (line 5962) | App *prefix_command(bool allow = true) {
method App (line 5972) | App *allow_windows_style_options(bool value = true) {
method App (line 5978) | App *positionals_at_end(bool value = true) {
method App (line 5984) | App *configurable(bool value = true) {
method App (line 5993) | App *formatter(std::shared_ptr<FormatterBase> fmt) {
method App (line 5999) | App *formatter_fn(std::function<std::string(const App *, std::string, ...
method App (line 6005) | App *config_formatter(std::shared_ptr<Config> fmt) {
method CLI11_NODISCARD (line 6011) | CLI11_NODISCARD bool parsed() const { return parsed_ > 0; }
method OptionDefaults (line 6014) | OptionDefaults *option_defaults() { return &option_defaults_; }
method Option (line 6044) | Option *add_option(std::string option_name,
method Option (line 6068) | Option *add_option_no_stream(std::string option_name,
method Option (line 6086) | Option *add_option_function(std::string option_name,
method Option (line 6107) | Option *add_option(std::string option_name) {
method Option (line 6115) | Option *add_option(std::string option_name, T &option_description) {
method Option (line 6141) | Option *add_flag(std::string flag_name) { return _add_flag_internal(fl...
method Option (line 6149) | Option *add_flag(std::string flag_name, T &flag_description) {
method Option (line 6159) | Option *add_flag(std::string flag_name,
method Option (line 6175) | Option *add_flag(std::string flag_name,
method Option (line 6204) | Option *add_flag(std::string flag_name,
method T (line 6222) | T *add_option_group(std::string group_name, std::string group_descript...
method App (line 6279) | App *group(std::string group_name) {
method App (line 6285) | App *require_subcommand() {
method App (line 6294) | App *require_subcommand(int value) {
method App (line 6307) | App *require_subcommand(std::size_t min, std::size_t max) {
method App (line 6314) | App *require_option() {
method App (line 6323) | App *require_option(int value) {
method App (line 6336) | App *require_option(std::size_t min, std::size_t max) {
method App (line 6344) | App *fallthrough(bool value = true) {
method pre_callback (line 6360) | virtual void pre_callback() {}
method failure_message (line 6389) | void failure_message(std::function<std::string(const App *, const Erro...
function got_subcommand (line 6416) | bool got_subcommand(const App *subcom) const {
function CLI11_NODISCARD (line 6422) | CLI11_NODISCARD bool got_subcommand(std::string subcommand_name) const {
function App (line 6427) | App *excludes(Option *opt) {
type startup_mode (line 5768) | enum class startup_mode : char { stable, enabled, disabled }
method App (line 5830) | explicit App(std::string app_description = "", std::string app_name = "")
method App (line 5835) | App(const App &) = delete;
method App (line 5836) | App &operator=(const App &) = delete;
method App (line 5847) | App *callback(std::function<void()> app_callback) {
method App (line 5858) | App *final_callback(std::function<void()> app_callback) {
method App (line 5865) | App *parse_complete_callback(std::function<void()> pc_callback) {
method App (line 5872) | App *preparse_callback(std::function<void(std::size_t)> pp_callback) {
method App (line 5884) | App *allow_extras(bool allow = true) {
method App (line 5890) | App *required(bool require = true) {
method App (line 5896) | App *disabled(bool disable = true) {
method App (line 5902) | App *silent(bool silence = true) {
method App (line 5908) | App *disabled_by_default(bool disable = true) {
method App (line 5919) | App *enabled_by_default(bool enable = true) {
method App (line 5933) | App *validate_positionals(bool validate = true) {
method App (line 5939) | App *validate_optional_arguments(bool validate = true) {
method App (line 5945) | App *allow_config_extras(bool allow = true) {
method App (line 5956) | App *allow_config_extras(config_extras_mode mode) {
method App (line 5962) | App *prefix_command(bool allow = true) {
method App (line 5972) | App *allow_windows_style_options(bool value = true) {
method App (line 5978) | App *positionals_at_end(bool value = true) {
method App (line 5984) | App *configurable(bool value = true) {
method App (line 5993) | App *formatter(std::shared_ptr<FormatterBase> fmt) {
method App (line 5999) | App *formatter_fn(std::function<std::string(const App *, std::string, ...
method App (line 6005) | App *config_formatter(std::shared_ptr<Config> fmt) {
method CLI11_NODISCARD (line 6011) | CLI11_NODISCARD bool parsed() const { return parsed_ > 0; }
method OptionDefaults (line 6014) | OptionDefaults *option_defaults() { return &option_defaults_; }
method Option (line 6044) | Option *add_option(std::string option_name,
method Option (line 6068) | Option *add_option_no_stream(std::string option_name,
method Option (line 6086) | Option *add_option_function(std::string option_name,
method Option (line 6107) | Option *add_option(std::string option_name) {
method Option (line 6115) | Option *add_option(std::string option_name, T &option_description) {
method Option (line 6141) | Option *add_flag(std::string flag_name) { return _add_flag_internal(fl...
method Option (line 6149) | Option *add_flag(std::string flag_name, T &flag_description) {
method Option (line 6159) | Option *add_flag(std::string flag_name,
method Option (line 6175) | Option *add_flag(std::string flag_name,
method Option (line 6204) | Option *add_flag(std::string flag_name,
method T (line 6222) | T *add_option_group(std::string group_name, std::string group_descript...
method App (line 6279) | App *group(std::string group_name) {
method App (line 6285) | App *require_subcommand() {
method App (line 6294) | App *require_subcommand(int value) {
method App (line 6307) | App *require_subcommand(std::size_t min, std::size_t max) {
method App (line 6314) | App *require_option() {
method App (line 6323) | App *require_option(int value) {
method App (line 6336) | App *require_option(std::size_t min, std::size_t max) {
method App (line 6344) | App *fallthrough(bool value = true) {
method pre_callback (line 6360) | virtual void pre_callback() {}
method failure_message (line 6389) | void failure_message(std::function<std::string(const App *, const Erro...
function App (line 6436) | App *excludes(App *app) {
type startup_mode (line 5768) | enum class startup_mode : char { stable, enabled, disabled }
method App (line 5830) | explicit App(std::string app_description = "", std::string app_name = "")
method App (line 5835) | App(const App &) = delete;
method App (line 5836) | App &operator=(const App &) = delete;
method App (line 5847) | App *callback(std::function<void()> app_callback) {
method App (line 5858) | App *final_callback(std::function<void()> app_callback) {
method App (line 5865) | App *parse_complete_callback(std::function<void()> pc_callback) {
method App (line 5872) | App *preparse_callback(std::function<void(std::size_t)> pp_callback) {
method App (line 5884) | App *allow_extras(bool allow = true) {
method App (line 5890) | App *required(bool require = true) {
method App (line 5896) | App *disabled(bool disable = true) {
method App (line 5902) | App *silent(bool silence = true) {
method App (line 5908) | App *disabled_by_default(bool disable = true) {
method App (line 5919) | App *enabled_by_default(bool enable = true) {
method App (line 5933) | App *validate_positionals(bool validate = true) {
method App (line 5939) | App *validate_optional_arguments(bool validate = true) {
method App (line 5945) | App *allow_config_extras(bool allow = true) {
method App (line 5956) | App *allow_config_extras(config_extras_mode mode) {
method App (line 5962) | App *prefix_command(bool allow = true) {
method App (line 5972) | App *allow_windows_style_options(bool value = true) {
method App (line 5978) | App *positionals_at_end(bool value = true) {
method App (line 5984) | App *configurable(bool value = true) {
method App (line 5993) | App *formatter(std::shared_ptr<FormatterBase> fmt) {
method App (line 5999) | App *formatter_fn(std::function<std::string(const App *, std::string, ...
method App (line 6005) | App *config_formatter(std::shared_ptr<Config> fmt) {
method CLI11_NODISCARD (line 6011) | CLI11_NODISCARD bool parsed() const { return parsed_ > 0; }
method OptionDefaults (line 6014) | OptionDefaults *option_defaults() { return &option_defaults_; }
method Option (line 6044) | Option *add_option(std::string option_name,
method Option (line 6068) | Option *add_option_no_stream(std::string option_name,
method Option (line 6086) | Option *add_option_function(std::string option_name,
method Option (line 6107) | Option *add_option(std::string option_name) {
method Option (line 6115) | Option *add_option(std::string option_name, T &option_description) {
method Option (line 6141) | Option *add_flag(std::string flag_name) { return _add_flag_internal(fl...
method Option (line 6149) | Option *add_flag(std::string flag_name, T &flag_description) {
method Option (line 6159) | Option *add_flag(std::string flag_name,
method Option (line 6175) | Option *add_flag(std::string flag_name,
method Option (line 6204) | Option *add_flag(std::string flag_name,
method T (line 6222) | T *add_option_group(std::string group_name, std::string group_descript...
method App (line 6279) | App *group(std::string group_name) {
method App (line 6285) | App *require_subcommand() {
method App (line 6294) | App *require_subcommand(int value) {
method App (line 6307) | App *require_subcommand(std::size_t min, std::size_t max) {
method App (line 6314) | App *require_option() {
method App (line 6323) | App *require_option(int value) {
method App (line 6336) | App *require_option(std::size_t min, std::size_t max) {
method App (line 6344) | App *fallthrough(bool value = true) {
method pre_callback (line 6360) | virtual void pre_callback() {}
method failure_message (line 6389) | void failure_message(std::function<std::string(const App *, const Erro...
function App (line 6451) | App *needs(Option *opt) {
type startup_mode (line 5768) | enum class startup_mode : char { stable, enabled, disabled }
method App (line 5830) | explicit App(std::string app_description = "", std::string app_name = "")
method App (line 5835) | App(const App &) = delete;
method App (line 5836) | App &operator=(const App &) = delete;
method App (line 5847) | App *callback(std::function<void()> app_callback) {
method App (line 5858) | App *final_callback(std::function<void()> app_callback) {
method App (line 5865) | App *parse_complete_callback(std::function<void()> pc_callback) {
method App (line 5872) | App *preparse_callback(std::function<void(std::size_t)> pp_callback) {
method App (line 5884) | App *allow_extras(bool allow = true) {
method App (line 5890) | App *required(bool require = true) {
method App (line 5896) | App *disabled(bool disable = true) {
method App (line 5902) | App *silent(bool silence = true) {
method App (line 5908) | App *disabled_by_default(bool disable = true) {
method App (line 5919) | App *enabled_by_default(bool enable = true) {
method App (line 5933) | App *validate_positionals(bool validate = true) {
method App (line 5939) | App *validate_optional_arguments(bool validate = true) {
method App (line 5945) | App *allow_config_extras(bool allow = true) {
method App (line 5956) | App *allow_config_extras(config_extras_mode mode) {
method App (line 5962) | App *prefix_command(bool allow = true) {
method App (line 5972) | App *allow_windows_style_options(bool value = true) {
method App (line 5978) | App *positionals_at_end(bool value = true) {
method App (line 5984) | App *configurable(bool value = true) {
method App (line 5993) | App *formatter(std::shared_ptr<FormatterBase> fmt) {
method App (line 5999) | App *formatter_fn(std::function<std::string(const App *, std::string, ...
method App (line 6005) | App *config_formatter(std::shared_ptr<Config> fmt) {
method CLI11_NODISCARD (line 6011) | CLI11_NODISCARD bool parsed() const { return parsed_ > 0; }
method OptionDefaults (line 6014) | OptionDefaults *option_defaults() { return &option_defaults_; }
method Option (line 6044) | Option *add_option(std::string option_name,
method Option (line 6068) | Option *add_option_no_stream(std::string option_name,
method Option (line 6086) | Option *add_option_function(std::string option_name,
method Option (line 6107) | Option *add_option(std::string option_name) {
method Option (line 6115) | Option *add_option(std::string option_name, T &option_description) {
method Option (line 6141) | Option *add_flag(std::string flag_name) { return _add_flag_internal(fl...
method Option (line 6149) | Option *add_flag(std::string flag_name, T &flag_description) {
method Option (line 6159) | Option *add_flag(std::string flag_name,
method Option (line 6175) | Option *add_flag(std::string flag_name,
method Option (line 6204) | Option *add_flag(std::string flag_name,
method T (line 6222) | T *add_option_group(std::string group_name, std::string group_descript...
method App (line 6279) | App *group(std::string group_name) {
method App (line 6285) | App *require_subcommand() {
method App (line 6294) | App *require_subcommand(int value) {
method App (line 6307) | App *require_subcommand(std::size_t min, std::size_t max) {
method App (line 6314) | App *require_option() {
method App (line 6323) | App *require_option(int value) {
method App (line 6336) | App *require_option(std::size_t min, std::size_t max) {
method App (line 6344) | App *fallthrough(bool value = true) {
method pre_callback (line 6360) | virtual void pre_callback() {}
method failure_message (line 6389) | void failure_message(std::function<std::string(const App *, const Erro...
function App (line 6459) | App *needs(App *app) {
type startup_mode (line 5768) | enum class startup_mode : char { stable, enabled, disabled }
method App (line 5830) | explicit App(std::string app_description = "", std::string app_name = "")
method App (line 5835) | App(const App &) = delete;
method App (line 5836) | App &operator=(const App &) = delete;
method App (line 5847) | App *callback(std::function<void()> app_callback) {
method App (line 5858) | App *final_callback(std::function<void()> app_callback) {
method App (line 5865) | App *parse_complete_callback(std::function<void()> pc_callback) {
method App (line 5872) | App *preparse_callback(std::function<void(std::size_t)> pp_callback) {
method App (line 5884) | App *allow_extras(bool allow = true) {
method App (line 5890) | App *required(bool require = true) {
method App (line 5896) | App *disabled(bool disable = true) {
method App (line 5902) | App *silent(bool silence = true) {
method App (line 5908) | App *disabled_by_default(bool disable = true) {
method App (line 5919) | App *enabled_by_default(bool enable = true) {
method App (line 5933) | App *validate_positionals(bool validate = true) {
method App (line 5939) | App *validate_optional_arguments(bool validate = true) {
method App (line 5945) | App *allow_config_extras(bool allow = true) {
method App (line 5956) | App *allow_config_extras(config_extras_mode mode) {
method App (line 5962) | App *prefix_command(bool allow = true) {
method App (line 5972) | App *allow_windows_style_options(bool value = true) {
method App (line 5978) | App *positionals_at_end(bool value = true) {
method App (line 5984) | App *configurable(bool value = true) {
method App (line 5993) | App *formatter(std::shared_ptr<FormatterBase> fmt) {
method App (line 5999) | App *formatter_fn(std::function<std::string(const App *, std::string, ...
method App (line 6005) | App *config_formatter(std::shared_ptr<Config> fmt) {
method CLI11_NODISCARD (line 6011) | CLI11_NODISCARD bool parsed() const { return parsed_ > 0; }
method OptionDefaults (line 6014) | OptionDefaults *option_defaults() { return &option_defaults_; }
method Option (line 6044) | Option *add_option(std::string option_name,
method Option (line 6068) | Option *add_option_no_stream(std::string option_name,
method Option (line 6086) | Option *add_option_function(std::string option_name,
method Option (line 6107) | Option *add_option(std::string option_name) {
method Option (line 6115) | Option *add_option(std::string option_name, T &option_description) {
method Option (line 6141) | Option *add_flag(std::string flag_name) { return _add_flag_internal(fl...
method Option (line 6149) | Option *add_flag(std::string flag_name, T &flag_description) {
method Option (line 6159) | Option *add_flag(std::string flag_name,
method Option (line 6175) | Option *add_flag(std::string flag_name,
method Option (line 6204) | Option *add_flag(std::string flag_name,
method T (line 6222) | T *add_option_group(std::string group_name, std::string group_descript...
method App (line 6279) | App *group(std::string group_name) {
method App (line 6285) | App *require_subcommand() {
method App (line 6294) | App *require_subcommand(int value) {
method App (line 6307) | App *require_subcommand(std::size_t min, std::size_t max) {
method App (line 6314) | App *require_option() {
method App (line 6323) | App *require_option(int value) {
method App (line 6336) | App *require_option(std::size_t min, std::size_t max) {
method App (line 6344) | App *fallthrough(bool value = true) {
method pre_callback (line 6360) | virtual void pre_callback() {}
method failure_message (line 6389) | void failure_message(std::function<std::string(const App *, const Erro...
function App (line 6486) | App *footer(std::string footer_string) {
type startup_mode (line 5768) | enum class startup_mode : char { stable, enabled, disabled }
method App (line 5830) | explicit App(std::string app_description = "", std::string app_name = "")
method App (line 5835) | App(const App &) = delete;
method App (line 5836) | App &operator=(const App &) = delete;
method App (line 5847) | App *callback(std::function<void()> app_callback) {
method App (line 5858) | App *final_callback(std::function<void()> app_callback) {
method App (line 5865) | App *parse_complete_callback(std::function<void()> pc_callback) {
method App (line 5872) | App *preparse_callback(std::function<void(std::size_t)> pp_callback) {
method App (line 5884) | App *allow_extras(bool allow = true) {
method App (line 5890) | App *required(bool require = true) {
method App (line 5896) | App *disabled(bool disable = true) {
method App (line 5902) | App *silent(bool silence = true) {
method App (line 5908) | App *disabled_by_default(bool disable = true) {
method App (line 5919) | App *enabled_by_default(bool enable = true) {
method App (line 5933) | App *validate_positionals(bool validate = true) {
method App (line 5939) | App *validate_optional_arguments(bool validate = true) {
method App (line 5945) | App *allow_config_extras(bool allow = true) {
method App (line 5956) | App *allow_config_extras(config_extras_mode mode) {
method App (line 5962) | App *prefix_command(bool allow = true) {
method App (line 5972) | App *allow_windows_style_options(bool value = true) {
method App (line 5978) | App *positionals_at_end(bool value = true) {
method App (line 5984) | App *configurable(bool value = true) {
method App (line 5993) | App *formatter(std::shared_ptr<FormatterBase> fmt) {
method App (line 5999) | App *formatter_fn(std::function<std::string(const App *, std::string, ...
method App (line 6005) | App *config_formatter(std::shared_ptr<Config> fmt) {
method CLI11_NODISCARD (line 6011) | CLI11_NODISCARD bool parsed() const { return parsed_ > 0; }
method OptionDefaults (line 6014) | OptionDefaults *option_defaults() { return &option_defaults_; }
method Option (line 6044) | Option *add_option(std::string option_name,
method Option (line 6068) | Option *add_option_no_stream(std::string option_name,
method Option (line 6086) | Option *add_option_function(std::string option_name,
method Option (line 6107) | Option *add_option(std::string option_name) {
method Option (line 6115) | Option *add_option(std::string option_name, T &option_description) {
method Option (line 6141) | Option *add_flag(std::string flag_name) { return _add_flag_internal(fl...
method Option (line 6149) | Option *add_flag(std::string flag_name, T &flag_description) {
method Option (line 6159) | Option *add_flag(std::string flag_name,
method Option (line 6175) | Option *add_flag(std::string flag_name,
method Option (line 6204) | Option *add_flag(std::string flag_name,
method T (line 6222) | T *add_option_group(std::string group_name, std::string group_descript...
method App (line 6279) | App *group(std::string group_name) {
method App (line 6285) | App *require_subcommand() {
method App (line 6294) | App *require_subcommand(int value) {
method App (line 6307) | App *require_subcommand(std::size_t min, std::size_t max) {
method App (line 6314) | App *require_option() {
method App (line 6323) | App *require_option(int value) {
method App (line 6336) | App *require_option(std::size_t min, std::size_t max) {
method App (line 6344) | App *fallthrough(bool value = true) {
method pre_callback (line 6360) | virtual void pre_callback() {}
method failure_message (line 6389) | void failure_message(std::function<std::string(const App *, const Erro...
function App (line 6491) | App *footer(std::function<std::string()> footer_function) {
type startup_mode (line 5768) | enum class startup_mode : char { stable, enabled, disabled }
method App (line 5830) | explicit App(std::string app_description = "", std::string app_name = "")
method App (line 5835) | App(const App &) = delete;
method App (line 5836) | App &operator=(const App &) = delete;
method App (line 5847) | App *callback(std::function<void()> app_callback) {
method App (line 5858) | App *final_callback(std::function<void()> app_callback) {
method App (line 5865) | App *parse_complete_callback(std::function<void()> pc_callback) {
method App (line 5872) | App *preparse_callback(std::function<void(std::size_t)> pp_callback) {
method App (line 5884) | App *allow_extras(bool allow = true) {
method App (line 5890) | App *required(bool require = true) {
method App (line 5896) | App *disabled(bool disable = true) {
method App (line 5902) | App *silent(bool silence = true) {
method App (line 5908) | App *disabled_by_default(bool disable = true) {
method App (line 5919) | App *enabled_by_default(bool enable = true) {
method App (line 5933) | App *validate_positionals(bool validate = true) {
method App (line 5939) | App *validate_optional_arguments(bool validate = true) {
method App (line 5945) | App *allow_config_extras(bool allow = true) {
method App (line 5956) | App *allow_config_extras(config_extras_mode mode) {
method App (line 5962) | App *prefix_command(bool allow = true) {
method App (line 5972) | App *allow_windows_style_options(bool value = true) {
method App (line 5978) | App *positionals_at_end(bool value = true) {
method App (line 5984) | App *configurable(bool value = true) {
method App (line 5993) | App *formatter(std::shared_ptr<FormatterBase> fmt) {
method App (line 5999) | App *formatter_fn(std::function<std::string(const App *, std::string, ...
method App (line 6005) | App *config_formatter(std::shared_ptr<Config> fmt) {
method CLI11_NODISCARD (line 6011) | CLI11_NODISCARD bool parsed() const { return parsed_ > 0; }
method OptionDefaults (line 6014) | OptionDefaults *option_defaults() { return &option_defaults_; }
method Option (line 6044) | Option *add_option(std::string option_name,
method Option (line 6068) | Option *add_option_no_stream(std::string option_name,
method Option (line 6086) | Option *add_option_function(std::string option_name,
method Option (line 6107) | Option *add_option(std::string option_name) {
method Option (line 6115) | Option *add_option(std::string option_name, T &option_description) {
method Option (line 6141) | Option *add_flag(std::string flag_name) { return _add_flag_internal(fl...
method Option (line 6149) | Option *add_flag(std::string flag_name, T &flag_description) {
method Option (line 6159) | Option *add_flag(std::string flag_name,
method Option (line 6175) | Option *add_flag(std::string flag_name,
method Option (line 6204) | Option *add_flag(std::string flag_name,
method T (line 6222) | T *add_option_group(std::string group_name, std::string group_descript...
method App (line 6279) | App *group(std::string group_name) {
method App (line 6285) | App *require_subcommand() {
method App (line 6294) | App *require_subcommand(int value) {
method App (line 6307) | App *require_subcommand(std::size_t min, std::size_t max) {
method App (line 6314) | App *require_option() {
method App (line 6323) | App *require_option(int value) {
method App (line 6336) | App *require_option(std::size_t min, std::size_t max) {
method App (line 6344) | App *fallthrough(bool value = true) {
method pre_callback (line 6360) | virtual void pre_callback() {}
method failure_message (line 6389) | void failure_message(std::function<std::string(const App *, const Erro...
function CLI11_NODISCARD (line 6497) | CLI11_NODISCARD std::string config_to_str(bool default_also = false, boo...
function CLI11_NODISCARD (line 6512) | CLI11_NODISCARD std::shared_ptr<FormatterBase> get_formatter() const { r...
function CLI11_NODISCARD (line 6515) | CLI11_NODISCARD std::shared_ptr<Config> get_config_formatter() const { r...
function CLI11_NODISCARD (line 6518) | CLI11_NODISCARD std::shared_ptr<ConfigBase> get_config_formatter_base() ...
function CLI11_NODISCARD (line 6528) | CLI11_NODISCARD std::string get_description() const { return description...
function App (line 6531) | App *description(std::string app_description) {
type startup_mode (line 5768) | enum class startup_mode : char { stable, enabled, disabled }
method App (line 5830) | explicit App(std::string app_description = "", std::string app_name = "")
method App (line 5835) | App(const App &) = delete;
method App (line 5836) | App &operator=(const App &) = delete;
method App (line 5847) | App *callback(std::function<void()> app_callback) {
method App (line 5858) | App *final_callback(std::function<void()> app_callback) {
method App (line 5865) | App *parse_complete_callback(std::function<void()> pc_callback) {
method App (line 5872) | App *preparse_callback(std::function<void(std::size_t)> pp_callback) {
method App (line 5884) | App *allow_extras(bool allow = true) {
method App (line 5890) | App *required(bool require = true) {
method App (line 5896) | App *disabled(bool disable = true) {
method App (line 5902) | App *silent(bool silence = true) {
method App (line 5908) | App *disabled_by_default(bool disable = true) {
method App (line 5919) | App *enabled_by_default(bool enable = true) {
method App (line 5933) | App *validate_positionals(bool validate = true) {
method App (line 5939) | App *validate_optional_arguments(bool validate = true) {
method App (line 5945) | App *allow_config_extras(bool allow = true) {
method App (line 5956) | App *allow_config_extras(config_extras_mode mode) {
method App (line 5962) | App *prefix_command(bool allow = true) {
method App (line 5972) | App *allow_windows_style_options(bool value = true) {
method App (line 5978) | App *positionals_at_end(bool value = true) {
method App (line 5984) | App *configurable(bool value = true) {
method App (line 5993) | App *formatter(std::shared_ptr<FormatterBase> fmt) {
method App (line 5999) | App *formatter_fn(std::function<std::string(const App *, std::string, ...
method App (line 6005) | App *config_formatter(std::shared_ptr<Config> fmt) {
method CLI11_NODISCARD (line 6011) | CLI11_NODISCARD bool parsed() const { return parsed_ > 0; }
method OptionDefaults (line 6014) | OptionDefaults *option_defaults() { return &option_defaults_; }
method Option (line 6044) | Option *add_option(std::string option_name,
method Option (line 6068) | Option *add_option_no_stream(std::string option_name,
method Option (line 6086) | Option *add_option_function(std::string option_name,
method Option (line 6107) | Option *add_option(std::string option_name) {
method Option (line 6115) | Option *add_option(std::string option_name, T &option_description) {
method Option (line 6141) | Option *add_flag(std::string flag_name) { return _add_flag_internal(fl...
method Option (line 6149) | Option *add_flag(std::string flag_name, T &flag_description) {
method Option (line 6159) | Option *add_flag(std::string flag_name,
method Option (line 6175) | Option *add_flag(std::string flag_name,
method Option (line 6204) | Option *add_flag(std::string flag_name,
method T (line 6222) | T *add_option_group(std::string group_name, std::string group_descript...
method App (line 6279) | App *group(std::string group_name) {
method App (line 6285) | App *require_subcommand() {
method App (line 6294) | App *require_subcommand(int value) {
method App (line 6307) | App *require_subcommand(std::size_t min, std::size_t max) {
method App (line 6314) | App *require_option() {
method App (line 6323) | App *require_option(int value) {
method App (line 6336) | App *require_option(std::size_t min, std::size_t max) {
method App (line 6344) | App *fallthrough(bool value = true) {
method pre_callback (line 6360) | virtual void pre_callback() {}
method failure_message (line 6389) | void failure_message(std::function<std::string(const App *, const Erro...
function CLI11_NODISCARD (line 6549) | CLI11_NODISCARD const Option *get_option(std::string option_name) const {
function Option (line 6558) | Option *get_option(std::string option_name) {
function Option (line 6567) | const Option *operator[](const std::string &option_name) const { return ...
function Option (line 6570) | const Option *operator[](const char *option_name) const { return get_opt...
function CLI11_NODISCARD (line 6573) | CLI11_NODISCARD bool get_ignore_case() const { return ignore_case_; }
function CLI11_NODISCARD (line 6576) | CLI11_NODISCARD bool get_ignore_underscore() const { return ignore_under...
function CLI11_NODISCARD (line 6579) | CLI11_NODISCARD bool get_fallthrough() const { return fallthrough_; }
function CLI11_NODISCARD (line 6582) | CLI11_NODISCARD bool get_allow_windows_style_options() const { return al...
function CLI11_NODISCARD (line 6585) | CLI11_NODISCARD bool get_positionals_at_end() const { return positionals...
function CLI11_NODISCARD (line 6588) | CLI11_NODISCARD bool get_configurable() const { return configurable_; }
function CLI11_NODISCARD (line 6591) | CLI11_NODISCARD const std::string &get_group() const { return group_; }
function CLI11_NODISCARD (line 6594) | CLI11_NODISCARD std::string get_footer() const {
function CLI11_NODISCARD (line 6599) | CLI11_NODISCARD std::size_t get_require_subcommand_min() const { return ...
function CLI11_NODISCARD (line 6602) | CLI11_NODISCARD std::size_t get_require_subcommand_max() const { return ...
function CLI11_NODISCARD (line 6605) | CLI11_NODISCARD std::size_t get_require_option_min() const { return requ...
function CLI11_NODISCARD (line 6608) | CLI11_NODISCARD std::size_t get_require_option_max() const { return requ...
function CLI11_NODISCARD (line 6611) | CLI11_NODISCARD bool get_prefix_command() const { return prefix_command_; }
function CLI11_NODISCARD (line 6614) | CLI11_NODISCARD bool get_allow_extras() const { return allow_extras_; }
function CLI11_NODISCARD (line 6617) | CLI11_NODISCARD bool get_required() const { return required_; }
function CLI11_NODISCARD (line 6620) | CLI11_NODISCARD bool get_disabled() const { return disabled_; }
function CLI11_NODISCARD (line 6623) | CLI11_NODISCARD bool get_silent() const { return silent_; }
function CLI11_NODISCARD (line 6626) | CLI11_NODISCARD bool get_immediate_callback() const { return immediate_c...
function CLI11_NODISCARD (line 6629) | CLI11_NODISCARD bool get_disabled_by_default() const { return (default_s...
function CLI11_NODISCARD (line 6632) | CLI11_NODISCARD bool get_enabled_by_default() const { return (default_st...
function CLI11_NODISCARD (line 6634) | CLI11_NODISCARD bool get_validate_positionals() const { return validate_...
function CLI11_NODISCARD (line 6636) | CLI11_NODISCARD bool get_validate_optional_arguments() const { return va...
function CLI11_NODISCARD (line 6639) | CLI11_NODISCARD config_extras_mode get_allow_config_extras() const { ret...
function Option (line 6642) | Option *get_help_ptr() { return help_ptr_; }
function CLI11_NODISCARD (line 6645) | CLI11_NODISCARD const Option *get_help_ptr() const { return help_ptr_; }
function CLI11_NODISCARD (line 6648) | CLI11_NODISCARD const Option *get_help_all_ptr() const { return help_all...
function Option (line 6651) | Option *get_config_ptr() { return config_ptr_; }
function CLI11_NODISCARD (line 6654) | CLI11_NODISCARD const Option *get_config_ptr() const { return config_ptr...
function Option (line 6657) | Option *get_version_ptr() { return version_ptr_; }
function CLI11_NODISCARD (line 6660) | CLI11_NODISCARD const Option *get_version_ptr() const { return version_p...
function App (line 6663) | App *get_parent() { return parent_; }
type startup_mode (line 5768) | enum class startup_mode : char { stable, enabled, disabled }
method App (line 5830) | explicit App(std::string app_description = "", std::string app_name = "")
method App (line 5835) | App(const App &) = delete;
method App (line 5836) | App &operator=(const App &) = delete;
method App (line 5847) | App *callback(std::function<void()> app_callback) {
method App (line 5858) | App *final_callback(std::function<void()> app_callback) {
method App (line 5865) | App *parse_complete_callback(std::function<void()> pc_callback) {
method App (line 5872) | App *preparse_callback(std::function<void(std::size_t)> pp_callback) {
method App (line 5884) | App *allow_extras(bool allow = true) {
method App (line 5890) | App *required(bool require = true) {
method App (line 5896) | App *disabled(bool disable = true) {
method App (line 5902) | App *silent(bool silence = true) {
method App (line 5908) | App *disabled_by_default(bool disable = true) {
method App (line 5919) | App *enabled_by_default(bool enable = true) {
method App (line 5933) | App *validate_positionals(bool validate = true) {
method App (line 5939) | App *validate_optional_arguments(bool validate = true) {
method App (line 5945) | App *allow_config_extras(bool allow = true) {
method App (line 5956) | App *allow_config_extras(config_extras_mode mode) {
method App (line 5962) | App *prefix_command(bool allow = true) {
method App (line 5972) | App *allow_windows_style_options(bool value = true) {
method App (line 5978) | App *positionals_at_end(bool value = true) {
method App (line 5984) | App *configurable(bool value = true) {
method App (line 5993) | App *formatter(std::shared_ptr<FormatterBase> fmt) {
method App (line 5999) | App *formatter_fn(std::function<std::string(const App *, std::string, ...
method App (line 6005) | App *config_formatter(std::shared_ptr<Config> fmt) {
method CLI11_NODISCARD (line 6011) | CLI11_NODISCARD bool parsed() const { return parsed_ > 0; }
method OptionDefaults (line 6014) | OptionDefaults *option_defaults() { return &option_defaults_; }
method Option (line 6044) | Option *add_option(std::string option_name,
method Option (line 6068) | Option *add_option_no_stream(std::string option_name,
method Option (line 6086) | Option *add_option_function(std::string option_name,
method Option (line 6107) | Option *add_option(std::string option_name) {
method Option (line 6115) | Option *add_option(std::string option_name, T &option_description) {
method Option (line 6141) | Option *add_flag(std::string flag_name) { return _add_flag_internal(fl...
method Option (line 6149) | Option *add_flag(std::string flag_name, T &flag_description) {
method Option (line 6159) | Option *add_flag(std::string flag_name,
method Option (line 6175) | Option *add_flag(std::string flag_name,
method Option (line 6204) | Option *add_flag(std::string flag_name,
method T (line 6222) | T *add_option_group(std::string group_name, std::string group_descript...
method App (line 6279) | App *group(std::string group_name) {
method App (line 6285) | App *require_subcommand() {
method App (line 6294) | App *require_subcommand(int value) {
method App (line 6307) | App *require_subcommand(std::size_t min, std::size_t max) {
method App (line 6314) | App *require_option() {
method App (line 6323) | App *require_option(int value) {
method App (line 6336) | App *require_option(std::size_t min, std::size_t max) {
method App (line 6344) | App *fallthrough(bool value = true) {
method pre_callback (line 6360) | virtual void pre_callback() {}
method failure_message (line 6389) | void failure_message(std::function<std::string(const App *, const Erro...
function CLI11_NODISCARD (line 6666) | CLI11_NODISCARD const App *get_parent() const { return parent_; }
function CLI11_NODISCARD (line 6669) | CLI11_NODISCARD const std::string &get_name() const { return name_; }
function CLI11_NODISCARD (line 6672) | CLI11_NODISCARD const std::vector<std::string> &get_aliases() const { re...
function App (line 6675) | App *clear_aliases() {
type startup_mode (line 5768) | enum class startup_mode : char { stable, enabled, disabled }
method App (line 5830) | explicit App(std::string app_description = "", std::string app_name = "")
method App (line 5835) | App(const App &) = delete;
method App (line 5836) | App &operator=(const App &) = delete;
method App (line 5847) | App *callback(std::function<void()> app_callback) {
method App (line 5858) | App *final_callback(std::function<void()> app_callback) {
method App (line 5865) | App *parse_complete_callback(std::function<void()> pc_callback) {
method App (line 5872) | App *preparse_callback(std::function<void(std::size_t)> pp_callback) {
method App (line 5884) | App *allow_extras(bool allow = true) {
method App (line 5890) | App *required(bool require = true) {
method App (line 5896) | App *disabled(bool disable = true) {
method App (line 5902) | App *silent(bool silence = true) {
method App (line 5908) | App *disabled_by_default(bool disable = true) {
method App (line 5919) | App *enabled_by_default(bool enable = true) {
method App (line 5933) | App *validate_positionals(bool validate = true) {
method App (line 5939) | App *validate_optional_arguments(bool validate = true) {
method App (line 5945) | App *allow_config_extras(bool allow = true) {
method App (line 5956) | App *allow_config_extras(config_extras_mode mode) {
method App (line 5962) | App *prefix_command(bool allow = true) {
method App (line 5972) | App *allow_windows_style_options(bool value = true) {
method App (line 5978) | App *positionals_at_end(bool value = true) {
method App (line 5984) | App *configurable(bool value = true) {
method App (line 5993) | App *formatter(std::shared_ptr<FormatterBase> fmt) {
method App (line 5999) | App *formatter_fn(std::function<std::string(const App *, std::string, ...
method App (line 6005) | App *config_formatter(std::shared_ptr<Config> fmt) {
method CLI11_NODISCARD (line 6011) | CLI11_NODISCARD bool parsed() const { return parsed_ > 0; }
method OptionDefaults (line 6014) | OptionDefaults *option_defaults() { return &option_defaults_; }
method Option (line 6044) | Option *add_option(std::string option_name,
method Option (line 6068) | Option *add_option_no_stream(std::string option_name,
method Option (line 6086) | Option *add_option_function(std::string option_name,
method Option (line 6107) | Option *add_option(std::string option_name) {
method Option (line 6115) | Option *add_option(std::string option_name, T &option_description) {
method Option (line 6141) | Option *add_flag(std::string flag_name) { return _add_flag_internal(fl...
method Option (line 6149) | Option *add_flag(std::string flag_name, T &flag_description) {
method Option (line 6159) | Option *add_flag(std::string flag_name,
method Option (line 6175) | Option *add_flag(std::string flag_name,
method Option (line 6204) | Option *add_flag(std::string flag_name,
method T (line 6222) | T *add_option_group(std::string group_name, std::string group_descript...
method App (line 6279) | App *group(std::string group_name) {
method App (line 6285) | App *require_subcommand() {
method App (line 6294) | App *require_subcommand(int value) {
method App (line 6307) | App *require_subcommand(std::size_t min, std::size_t max) {
method App (line 6314) | App *require_option() {
method App (line 6323) | App *require_option(int value) {
method App (line 6336) | App *require_option(std::size_t min, std::size_t max) {
method App (line 6344) | App *fallthrough(bool value = true) {
method pre_callback (line 6360) | virtual void pre_callback() {}
method failure_message (line 6389) | void failure_message(std::function<std::string(const App *, const Erro...
function CLI11_NODISCARD (line 6690) | CLI11_NODISCARD const std::vector<Option *> &parse_order() const { retur...
class Option_group (line 6823) | class Option_group : public App {
method Option_group (line 6825) | Option_group(std::string group_description, std::string group_name, Ap...
method Option (line 6832) | Option *add_option(Option *opt) {
method add_options (line 6840) | void add_options(Option *opt) { add_option(opt); }
method add_options (line 6842) | void add_options(Option *opt, Args... args) {
method App (line 6848) | App *add_subcommand(App *subcom) {
function deprecate_option (line 6872) | inline void deprecate_option(App *app, const std::string &option_name, c...
function deprecate_option (line 6878) | inline void deprecate_option(App &app, const std::string &option_name, c...
type detail (line 6895) | namespace detail {
function CLI11_INLINE (line 3943) | CLI11_INLINE std::pair<std::string, std::string> split_program_name(st...
type Classifier (line 5582) | enum class Classifier { NONE, POSITIONAL_MARK, SHORT, LONG, WINDOWS_ST...
type AppFriend (line 5583) | struct AppFriend
method parse_arg (line 6901) | static decltype(auto) parse_arg(App *app, Args &&...args) {
method parse_subcommand (line 6906) | static decltype(auto) parse_subcommand(App *app, Args &&...args) {
method parse_arg (line 6912) | static auto parse_arg(App *app, Args &&...args) ->
method parse_subcommand (line 6919) | static auto parse_subcommand(App *app, Args &&...args) ->
method App (line 6925) | static App *get_fallthrough_parent(App *app) { return app->_get_fall...
function Option (line 5606) | Option *default_flag_modifiers(Option *opt) {
function Option (line 5612) | Option *default_flag_modifiers(Option *opt) {
type AppFriend (line 6897) | struct AppFriend {
method parse_arg (line 6901) | static decltype(auto) parse_arg(App *app, Args &&...args) {
method parse_subcommand (line 6906) | static decltype(auto) parse_subcommand(App *app, Args &&...args) {
method parse_arg (line 6912) | static auto parse_arg(App *app, Args &&...args) ->
method parse_subcommand (line 6919) | static auto parse_subcommand(App *app, Args &&...args) ->
method App (line 6925) | static App *get_fallthrough_parent(App *app) { return app->_get_fall...
function CLI11_INLINE (line 9039) | CLI11_INLINE std::string convert_arg_for_ini(const std::string &arg, c...
function CLI11_INLINE (line 9083) | CLI11_INLINE std::string ini_join(const std::vector<std::string> &args,
function CLI11_INLINE (line 9109) | CLI11_INLINE std::vector<std::string>
function CLI11_INLINE (line 9134) | CLI11_INLINE void
function CLI11_INLINE (line 6965) | CLI11_INLINE App *App::name(std::string app_name) {
function CLI11_INLINE (line 6982) | CLI11_INLINE App *App::alias(std::string app_name) {
function CLI11_INLINE (line 7000) | CLI11_INLINE App *App::immediate_callback(bool immediate) {
function CLI11_INLINE (line 7012) | CLI11_INLINE App *App::ignore_case(bool value) {
function CLI11_INLINE (line 7026) | CLI11_INLINE App *App::ignore_underscore(bool value) {
function CLI11_INLINE (line 7040) | CLI11_INLINE Option *App::add_option(std::string option_name,
function CLI11_INLINE (line 7080) | CLI11_INLINE Option *App::set_help_flag(std::string flag_name, const std...
function CLI11_INLINE (line 7096) | CLI11_INLINE Option *App::set_help_all_flag(std::string help_name, const...
function CLI11_INLINE (line 7112) | CLI11_INLINE Option *
function CLI11_INLINE (line 7130) | CLI11_INLINE Option *
function CLI11_INLINE (line 7147) | CLI11_INLINE Option *App::_add_flag_internal(std::string flag_name, CLI:...
function CLI11_INLINE (line 7172) | CLI11_INLINE Option *App::add_flag_callback(std::string flag_name,
function CLI11_INLINE (line 7188) | CLI11_INLINE Option *
function CLI11_INLINE (line 7204) | CLI11_INLINE Option *App::set_config(std::string option_name,
function CLI11_INLINE (line 7230) | CLI11_INLINE bool App::remove_option(Option *opt) {
function CLI11_INLINE (line 7251) | CLI11_INLINE App *App::add_subcommand(std::string subcommand_name, std::...
function CLI11_INLINE (line 7268) | CLI11_INLINE App *App::add_subcommand(CLI::App_p subcom) {
function CLI11_INLINE (line 7281) | CLI11_INLINE bool App::remove_subcommand(App *subcom) {
function CLI11_INLINE (line 7297) | CLI11_INLINE App *App::get_subcommand(const App *subcom) const {
function CLI11_NODISCARD (line 7306) | CLI11_NODISCARD CLI11_INLINE App *App::get_subcommand(std::string subcom...
function CLI11_NODISCARD (line 7313) | CLI11_NODISCARD CLI11_INLINE App *App::get_subcommand(int index) const {
function CLI11_INLINE (line 7322) | CLI11_INLINE CLI::App_p App::get_subcommand_ptr(App *subcom) const {
function CLI11_NODISCARD (line 7331) | CLI11_NODISCARD CLI11_INLINE CLI::App_p App::get_subcommand_ptr(std::str...
function CLI11_NODISCARD (line 7338) | CLI11_NODISCARD CLI11_INLINE CLI::App_p App::get_subcommand_ptr(int inde...
function CLI11_NODISCARD (line 7347) | CLI11_NODISCARD CLI11_INLINE CLI::App *App::get_option_group(std::string...
function CLI11_NODISCARD (line 7356) | CLI11_NODISCARD CLI11_INLINE std::size_t App::count_all() const {
function CLI11_INLINE (line 7370) | CLI11_INLINE void App::clear() {
function CLI11_INLINE (line 7385) | CLI11_INLINE void App::parse(int argc, const char *const *argv) {
function CLI11_INLINE (line 7399) | CLI11_INLINE void App::parse(std::string commandline, bool program_name_...
function CLI11_INLINE (line 7426) | CLI11_INLINE void App::parse(std::vector<std::string> &args) {
function CLI11_INLINE (line 7445) | CLI11_INLINE void App::parse(std::vector<std::string> &&args) {
function CLI11_INLINE (line 7464) | CLI11_INLINE void App::parse_from_stream(std::istream &input) {
function CLI11_INLINE (line 7475) | CLI11_INLINE int App::exit(const Error &e, std::ostream &out, std::ostre...
function CLI11_INLINE (line 7504) | CLI11_INLINE std::vector<const App *> App::get_subcommands(const std::fu...
function CLI11_INLINE (line 7519) | CLI11_INLINE std::vector<App *> App::get_subcommands(const std::function...
function CLI11_INLINE (line 7533) | CLI11_INLINE bool App::remove_excludes(Option *opt) {
function CLI11_INLINE (line 7542) | CLI11_INLINE bool App::remove_excludes(App *app) {
function CLI11_INLINE (line 7553) | CLI11_INLINE bool App::remove_needs(Option *opt) {
function CLI11_INLINE (line 7562) | CLI11_INLINE bool App::remove_needs(App *app) {
function CLI11_NODISCARD (line 7571) | CLI11_NODISCARD CLI11_INLINE std::string App::help(std::string prev, App...
function CLI11_NODISCARD (line 7585) | CLI11_NODISCARD CLI11_INLINE std::string App::version() const {
function CLI11_INLINE (line 7602) | CLI11_INLINE std::vector<const Option *> App::get_options(const std::fun...
function CLI11_INLINE (line 7617) | CLI11_INLINE std::vector<Option *> App::get_options(const std::function<...
function CLI11_INLINE (line 7631) | CLI11_INLINE Option *App::get_option_no_throw(std::string option_name) n...
function CLI11_NODISCARD (line 7649) | CLI11_NODISCARD CLI11_INLINE const Option *App::get_option_no_throw(std:...
function CLI11_NODISCARD (line 7667) | CLI11_NODISCARD CLI11_INLINE std::string App::get_display_name(bool with...
function CLI11_NODISCARD (line 7683) | CLI11_NODISCARD CLI11_INLINE bool App::check_name(std::string name_to_ch...
function CLI11_NODISCARD (line 7711) | CLI11_NODISCARD CLI11_INLINE std::vector<std::string> App::get_groups() ...
function CLI11_NODISCARD (line 7724) | CLI11_NODISCARD CLI11_INLINE std::vector<std::string> App::remaining(boo...
function CLI11_NODISCARD (line 7750) | CLI11_NODISCARD CLI11_INLINE std::vector<std::string> App::remaining_for...
function CLI11_NODISCARD (line 7756) | CLI11_NODISCARD CLI11_INLINE std::size_t App::remaining_size(bool recurs...
function CLI11_INLINE (line 7770) | CLI11_INLINE void App::_validate() const {
function CLI11_INLINE (line 7805) | CLI11_INLINE void App::_configure() {
function CLI11_INLINE (line 7825) | CLI11_INLINE void App::run_callback(bool final_mode, bool suppress_final...
function CLI11_NODISCARD (line 7852) | CLI11_NODISCARD CLI11_INLINE bool App::_valid_subcommand(const std::stri...
function CLI11_NODISCARD (line 7865) | CLI11_NODISCARD CLI11_INLINE detail::Classifier App::_recognize(const st...
function CLI11_INLINE (line 7890) | CLI11_INLINE void App::_process_config_file() {
function CLI11_INLINE (line 7922) | CLI11_INLINE void App::_process_env() {
function CLI11_INLINE (line 7954) | CLI11_INLINE void App::_process_callbacks() {
function CLI11_INLINE (line 7978) | CLI11_INLINE void App::_process_help_flags(bool trigger_help, bool trigg...
function CLI11_INLINE (line 8000) | CLI11_INLINE void App::_process_requirements() {
function CLI11_INLINE (line 8128) | CLI11_INLINE void App::_process() {
function CLI11_INLINE (line 8150) | CLI11_INLINE void App::_process_extras() {
function CLI11_INLINE (line 8164) | CLI11_INLINE void App::_process_extras(std::vector<std::string> &args) {
function CLI11_INLINE (line 8179) | CLI11_INLINE void App::increment_parsed() {
function CLI11_INLINE (line 8187) | CLI11_INLINE void App::_parse(std::vector<std::string> &args) {
function CLI11_INLINE (line 8215) | CLI11_INLINE void App::_parse(std::vector<std::string> &&args) {
function CLI11_INLINE (line 8231) | CLI11_INLINE void App::_parse_stream(std::istream &input) {
function CLI11_INLINE (line 8242) | CLI11_INLINE void App::_parse_config(const std::vector<ConfigItem> &args) {
function CLI11_INLINE (line 8249) | CLI11_INLINE bool App::_parse_single_config(const ConfigItem &item, std:...
function CLI11_INLINE (line 8344) | CLI11_INLINE bool App::_parse_single(std::vector<std::string> &args, boo...
function CLI11_NODISCARD (line 8386) | CLI11_NODISCARD CLI11_INLINE std::size_t App::_count_remaining_positiona...
function CLI11_NODISCARD (line 8398) | CLI11_NODISCARD CLI11_INLINE bool App::_has_remaining_positionals() const {
function CLI11_INLINE (line 8408) | CLI11_INLINE bool App::_parse_positional(std::vector<std::string> &args,...
function CLI11_NODISCARD (line 8532) | CLI11_NODISCARD CLI11_INLINE App *
function CLI11_INLINE (line 8551) | CLI11_INLINE bool App::_parse_subcommand(std::vector<std::string> &args) {
function CLI11_INLINE (line 8579) | CLI11_INLINE bool App::_parse_arg(std::vector<std::string> &args, detail...
function CLI11_INLINE (line 8750) | CLI11_INLINE void App::_trigger_pre_parse(std::size_t remaining_args) {
function CLI11_INLINE (line 8768) | CLI11_INLINE App *App::_get_fallthrough_parent() {
function CLI11_NODISCARD (line 8779) | CLI11_NODISCARD CLI11_INLINE const std::string &App::_compare_subcommand...
function CLI11_INLINE (line 8830) | CLI11_INLINE void App::_move_to_missing(detail::Classifier val_type, con...
function CLI11_INLINE (line 8846) | CLI11_INLINE void App::_move_option(Option *opt, App *app) {
function CLI11_INLINE (line 8885) | CLI11_INLINE void TriggerOn(App *trigger_app, App *app_to_enable) {
function CLI11_INLINE (line 8891) | CLI11_INLINE void TriggerOn(App *trigger_app, std::vector<App *> apps_to...
function CLI11_INLINE (line 8904) | CLI11_INLINE void TriggerOff(App *trigger_app, App *app_to_enable) {
function CLI11_INLINE (line 8910) | CLI11_INLINE void TriggerOff(App *trigger_app, std::vector<App *> apps_t...
function CLI11_INLINE (line 8923) | CLI11_INLINE void deprecate_option(Option *opt, const std::string &repla...
function CLI11_INLINE (line 8937) | CLI11_INLINE void retire_option(App *app, Option *opt) {
function CLI11_INLINE (line 8961) | CLI11_INLINE void retire_option(App &app, Option *opt) { retire_option(&...
function CLI11_INLINE (line 8963) | CLI11_INLINE void retire_option(App *app, const std::string &option_name) {
function CLI11_INLINE (line 8983) | CLI11_INLINE void retire_option(App &app, const std::string &option_name...
type FailureMessage (line 8985) | namespace FailureMessage {
function CLI11_INLINE (line 8987) | CLI11_INLINE std::string simple(const App *app, const Error &e) {
function CLI11_INLINE (line 9005) | CLI11_INLINE std::string help(const App *app, const Error &e) {
type detail (line 9016) | namespace detail {
function CLI11_INLINE (line 3943) | CLI11_INLINE std::pair<std::string, std::string> split_program_name(st...
type Classifier (line 5582) | enum class Classifier { NONE, POSITIONAL_MARK, SHORT, LONG, WINDOWS_ST...
type AppFriend (line 5583) | struct AppFriend
method parse_arg (line 6901) | static decltype(auto) parse_arg(App *app, Args &&...args) {
method parse_subcommand (line 6906) | static decltype(auto) parse_subcommand(App *app, Args &&...args) {
method parse_arg (line 6912) | static auto parse_arg(App *app, Args &&...args) ->
method parse_subcommand (line 6919) | static auto parse_subcommand(App *app, Args &&...args) ->
method App (line 6925) | static App *get_fallthrough_parent(App *app) { return app->_get_fall...
function Option (line 5606) | Option *default_flag_modifiers(Option *opt) {
function Option (line 5612) | Option *default_flag_modifiers(Option *opt) {
type AppFriend (line 6897) | struct AppFriend {
method parse_arg (line 6901) | static decltype(auto) parse_arg(App *app, Args &&...args) {
method parse_subcommand (line 6906) | static decltype(auto) parse_subcommand(App *app, Args &&...args) {
method parse_arg (line 6912) | static auto parse_arg(App *app, Args &&...args) ->
method parse_subcommand (line 6919) | static auto parse_subcommand(App *app, Args &&...args) ->
method App (line 6925) | static App *get_fallthrough_parent(App *app) { return app->_get_fall...
function CLI11_INLINE (line 9039) | CLI11_INLINE std::string convert_arg_for_ini(const std::string &arg, c...
function CLI11_INLINE (line 9083) | CLI11_INLINE std::string ini_join(const std::vector<std::string> &args,
function CLI11_INLINE (line 9109) | CLI11_INLINE std::vector<std::string>
function CLI11_INLINE (line 9134) | CLI11_INLINE void
type detail (line 9037) | namespace detail {
function CLI11_INLINE (line 3943) | CLI11_INLINE std::pair<std::string, std::string> split_program_name(st...
type Classifier (line 5582) | enum class Classifier { NONE, POSITIONAL_MARK, SHORT, LONG, WINDOWS_ST...
type AppFriend (line 5583) | struct AppFriend
method parse_arg (line 6901) | static decltype(auto) parse_arg(App *app, Args &&...args) {
method parse_subcommand (line 6906) | static decltype(auto) parse_subcommand(App *app, Args &&...args) {
method parse_arg (line 6912) | static auto parse_arg(App *app, Args &&...args) ->
method parse_subcommand (line 6919) | static auto parse_subcommand(App *app, Args &&...args) ->
method App (line 6925) | static App *get_fallthrough_parent(App *app) { return app->_get_fall...
function Option (line 5606) | Option *default_flag_modifiers(Option *opt) {
function Option (line 5612) | Option *default_flag_modifiers(Option *opt) {
type AppFriend (line 6897) | struct AppFriend {
method parse_arg (line 6901) | static decltype(auto) parse_arg(App *app, Args &&...args) {
method parse_subcommand (line 6906) | static decltype(auto) parse_subcommand(App *app, Args &&...args) {
method parse_arg (line 6912) | static auto parse_arg(App *app, Args &&...args) ->
method parse_subcommand (line 6919) | static auto parse_subcommand(App *app, Args &&...args) ->
method App (line 6925) | static App *get_fallthrough_parent(App *app) { return app->_get_fall...
function CLI11_INLINE (line 9039) | CLI11_INLINE std::string convert_arg_for_ini(const std::string &arg, c...
function CLI11_INLINE (line 9083) | CLI11_INLINE std::string ini_join(const std::vector<std::string> &args,
function CLI11_INLINE (line 9109) | CLI11_INLINE std::vector<std::string>
function CLI11_INLINE (line 9134) | CLI11_INLINE void
function CLI11_INLINE (line 9316) | CLI11_INLINE std::string
function CLI11_INLINE (line 9415) | CLI11_INLINE std::string
function CLI11_INLINE (line 9427) | CLI11_INLINE std::string Formatter::make_positionals(const App *app) con...
function CLI11_INLINE (line 9437) | CLI11_INLINE std::string Formatter::make_groups(const App *app, AppForma...
function CLI11_INLINE (line 9461) | CLI11_INLINE std::string Formatter::make_description(const App *app) con...
function CLI11_INLINE (line 9487) | CLI11_INLINE std::string Formatter::make_usage(const App *app, std::stri...
function CLI11_INLINE (line 9529) | CLI11_INLINE std::string Formatter::make_footer(const App *app) const {
function CLI11_INLINE (line 9537) | CLI11_INLINE std::string Formatter::make_help(const App *app, std::strin...
function CLI11_INLINE (line 9561) | CLI11_INLINE std::string Formatter::make_subcommands(const App *app, App...
function CLI11_INLINE (line 9603) | CLI11_INLINE std::string Formatter::make_subcommand(const App *sub) const {
function CLI11_INLINE (line 9609) | CLI11_INLINE std::string Formatter::make_expanded(const App *sub) const {
function CLI11_INLINE (line 9629) | CLI11_INLINE std::string Formatter::make_option_name(const Option *opt, ...
function CLI11_INLINE (line 9636) | CLI11_INLINE std::string Formatter::make_option_opts(const Option *opt) ...
function CLI11_INLINE (line 9671) | CLI11_INLINE std::string Formatter::make_option_desc(const Option *opt) ...
function CLI11_INLINE (line 9673) | CLI11_INLINE std::string Formatter::make_option_usage(const Option *opt)...
FILE: CoerceFunctions.cpp
function callEfsRpcOpenFileRaw (line 12) | long callEfsRpcOpenFileRaw(RPC_BINDING_HANDLE Binding, LPWSTR targetedPi...
function callEfsRpcEncryptFileSrv (line 22) | long callEfsRpcEncryptFileSrv(RPC_BINDING_HANDLE Binding, LPWSTR targete...
function callEfsRpcDecryptFileSrv (line 30) | long callEfsRpcDecryptFileSrv(RPC_BINDING_HANDLE Binding, LPWSTR targete...
function callEfsRpcQueryUsersOnFile (line 39) | long callEfsRpcQueryUsersOnFile(RPC_BINDING_HANDLE Binding, LPWSTR targe...
function callEfsRpcQueryRecoveryAgents (line 48) | long callEfsRpcQueryRecoveryAgents(RPC_BINDING_HANDLE Binding, LPWSTR ta...
function callEfsRpcRemoveUsersFromFile (line 57) | long callEfsRpcRemoveUsersFromFile(RPC_BINDING_HANDLE Binding, LPWSTR ta...
function callEfsRpcAddUsersToFile (line 74) | long callEfsRpcAddUsersToFile(RPC_BINDING_HANDLE Binding, LPWSTR targete...
function callEfsRpcFileKeyInfo (line 91) | long callEfsRpcFileKeyInfo(RPC_BINDING_HANDLE Binding, LPWSTR targetedPi...
function callEfsRpcDuplicateEncryptionInfoFile (line 101) | long callEfsRpcDuplicateEncryptionInfoFile(RPC_BINDING_HANDLE Binding, L...
function callEfsRpcAddUsersToFileEx (line 111) | long callEfsRpcAddUsersToFileEx(RPC_BINDING_HANDLE Binding, LPWSTR targe...
function callEfsRpcFileKeyInfoEx (line 129) | long callEfsRpcFileKeyInfoEx(RPC_BINDING_HANDLE Binding, LPWSTR targeted...
function callEfsRpcGetEncryptedFileMetadata (line 140) | long callEfsRpcGetEncryptedFileMetadata(RPC_BINDING_HANDLE Binding, LPWS...
function callEfsRpcEncryptFileExSrv (line 149) | long callEfsRpcEncryptFileExSrv(RPC_BINDING_HANDLE Binding, LPWSTR targe...
function callEfsRpcQueryProtectors (line 159) | long callEfsRpcQueryProtectors(RPC_BINDING_HANDLE Binding, LPWSTR target...
function callRpcRemoteFindFirstPrinterChangeNotification (line 177) | long callRpcRemoteFindFirstPrinterChangeNotification(wchar_t* targetedPi...
function callRpcRemoteFindFirstPrinterChangeNotificationEx (line 216) | long callRpcRemoteFindFirstPrinterChangeNotificationEx(wchar_t* targeted...
FILE: CoercedPotato.cpp
type NamedPipeThreadArgs (line 32) | struct NamedPipeThreadArgs {
function wchar_t (line 37) | wchar_t* generateRandomString() {
function handleError (line 51) | void handleError(const wchar_t* function, long result) {
function BOOL (line 68) | BOOL createRPCbind(RPC_BINDING_HANDLE& binding_h)
function BOOL (line 104) | BOOL GetSystem(HANDLE hPipe)
function DWORD (line 228) | DWORD WINAPI launchNamedPipeServer(LPVOID lpParam) {
function BOOL (line 268) | BOOL createNamedPipe(wchar_t* namedpipe, wchar_t* commandExecuted) {
function CallEfsrFunctions (line 278) | long CallEfsrFunctions(RPC_BINDING_HANDLE Binding, int exploitID, bool f...
function callRprnFunctions (line 355) | long callRprnFunctions(int exploitID, bool force, std::wstring randomNam...
function BOOL (line 405) | BOOL exploitMsEfsr(wchar_t* command, int exploitId, bool force, std::wst...
function BOOL (line 433) | BOOL exploitMsRprn(wchar_t* command, int exploitId, bool force, std::wst...
function exploitAll (line 450) | void exploitAll(wchar_t* command, int exploitId, bool force, std::wstrin...
function main (line 461) | int main(int argc, char** argv)
function handle_t (line 551) | handle_t __RPC_USER STRING_HANDLE_bind(STRING_HANDLE lpStr)
FILE: lib/ms-efsr_h.h
type EFS_EXIM_PIPE (line 60) | typedef struct pipe_EFS_EXIM_PIPE
type DWORD (line 79) | typedef unsigned long DWORD;
type BOOL (line 85) | typedef int BOOL;
type RPC_SID_IDENTIFIER_AUTHORITY (line 89) | typedef struct _RPC_SID_IDENTIFIER_AUTHORITY
type RPC_SID (line 94) | typedef struct _RPC_SID
type _RPC_SID (line 102) | struct _RPC_SID
type _EFS_RPC_BLOB (line 104) | struct _EFS_RPC_BLOB
type Struct_68_t (line 106) | typedef struct Struct_68_t
type Struct_100_t (line 111) | typedef struct Struct_100_t
type Struct_136_t (line 119) | typedef struct Struct_136_t
type Struct_152_t (line 125) | typedef struct Struct_152_t
type Struct_220_t (line 133) | typedef struct Struct_220_t
type Struct_266_t (line 139) | typedef struct Struct_266_t
type Struct_282_t (line 146) | typedef struct Struct_282_t
type Struct_346_t (line 153) | typedef struct Struct_346_t
type Struct_392_t (line 159) | typedef struct Struct_392_t
type Struct_462_t (line 165) | typedef struct Struct_462_t
type Struct_492_t (line 172) | typedef struct Struct_492_t
type Struct_530_t (line 180) | typedef struct Struct_530_t
type Struct_594_t (line 187) | typedef struct Struct_594_t
type Struct_762_t (line 193) | typedef struct Struct_762_t
type Struct_836_t (line 198) | typedef struct Struct_836_t
type Struct_850_t (line 204) | typedef struct Struct_850_t
type Struct_904_t (line 212) | typedef struct Struct_904_t
type Struct_972_t (line 221) | typedef struct Struct_972_t
type Struct_282_t (line 275) | struct Struct_282_t
type Struct_136_t (line 305) | struct Struct_136_t
type Struct_462_t (line 306) | struct Struct_462_t
type Struct_392_t (line 325) | struct Struct_392_t
type Struct_392_t (line 356) | struct Struct_392_t
type Struct_762_t (line 468) | struct Struct_762_t
type Struct_972_t (line 519) | struct Struct_972_t
FILE: lib/ms-even_h.h
type NTSTATUS (line 62) | typedef long NTSTATUS;
type BOOL (line 66) | typedef int BOOL;
type BYTE (line 72) | typedef unsigned char BYTE;
type BYTE (line 78) | typedef BYTE BOOLEAN;
type BYTE (line 80) | typedef BYTE *PBOOLEAN;
type wchar_t (line 82) | typedef wchar_t WCHAR;
type wchar_t (line 84) | typedef wchar_t *PWCHAR;
type WCHAR (line 86) | typedef WCHAR *BSTR;
type DOUBLE (line 88) | typedef double DOUBLE;
type ULONG (line 90) | typedef unsigned long ULONG;
type DWORD (line 94) | typedef unsigned long DWORD;
type DWORD32 (line 100) | typedef unsigned int DWORD32;
type DWORD64 (line 102) | typedef unsigned __int64 DWORD64;
type ULONGLONG (line 106) | typedef unsigned __int64 ULONGLONG;
type ULONGLONG (line 108) | typedef ULONGLONG DWORDLONG;
type ULONGLONG (line 110) | typedef ULONGLONG *PDWORDLONG;
type error_status_t (line 112) | typedef unsigned long error_status_t;
type FLOAT (line 114) | typedef float FLOAT;
type UCHAR (line 116) | typedef unsigned char UCHAR;
type SHORT (line 120) | typedef short SHORT;
type RPC_UNICODE_STRING (line 122) | typedef struct _RPC_UNICODE_STRING
type _RPC_UNICODE_STRING (line 129) | struct _RPC_UNICODE_STRING
type _FILETIME (line 131) | struct _FILETIME
type _FILETIME (line 133) | struct _FILETIME
type _RPC_SID (line 135) | struct _RPC_SID
type RPC_STRING (line 137) | typedef struct _RPC_STRING
type _RPC_STRING (line 144) | struct _RPC_STRING
type RPC_CLIENT_ID (line 146) | typedef struct _RPC_CLIENT_ID
type _RPC_CLIENT_ID (line 152) | struct _RPC_CLIENT_ID
type wchar_t (line 154) | typedef /* [unique][handle] */ wchar_t *EVENTLOG_HANDLE_W;
type RULONG (line 162) | typedef /* [range] */ unsigned long RULONG;
FILE: lib/ms-par_h.h
type BYTE (line 63) | typedef unsigned char BYTE;
type DWORD (line 69) | typedef unsigned long DWORD;
type wchar_t (line 75) | typedef wchar_t WCHAR;
type wchar_t (line 77) | typedef wchar_t *PWCHAR;
type ULONGLONG (line 79) | typedef unsigned __int64 ULONGLONG;
type ULONGLONG (line 81) | typedef ULONGLONG DWORDLONG;
type ULONGLONG (line 83) | typedef ULONGLONG *PDWORDLONG;
type __int3264 (line 85) | typedef /* [custom] */ __int3264 LONG_PTR;
type WORD (line 87) | typedef unsigned short WORD;
type USHORT (line 93) | typedef unsigned short USHORT;
type UCHAR (line 95) | typedef unsigned char UCHAR;
type LONG (line 99) | typedef long LONG;
type __int64 (line 105) | typedef __int64 LONGLONG;
type LONG (line 107) | typedef LONG HRESULT;
type UUID (line 109) | typedef struct _GUID UUID;
type _GUID (line 111) | struct _GUID
type _RPC_SID (line 113) | struct _RPC_SID
type _ACL (line 115) | struct _ACL
type _FILETIME (line 117) | struct _FILETIME
type _FILETIME (line 119) | struct _FILETIME
type _SYSTEMTIME (line 121) | struct _SYSTEMTIME
type RPC_EPrintPropertyType (line 123) | typedef /* [public][public][public][public][public][public] */
type LANGID (line 133) | typedef unsigned short LANGID;
type wchar_t (line 139) | typedef /* [handle] */ wchar_t *STRING_HANDLE;
type RPC_BINARY_CONTAINER (line 141) | typedef struct _RPC_BINARY_CONTAINER
type RPC_BIDI_DATA (line 147) | typedef struct _RPC_BIDI_DATA
type RPC_BIDI_REQUEST_DATA (line 160) | typedef struct _RPC_BIDI_REQUEST_DATA
type RPC_BIDI_RESPONSE_DATA (line 167) | typedef struct _RPC_BIDI_RESPONSE_DATA
type RPC_BIDI_REQUEST_CONTAINER (line 175) | typedef struct _RPC_BIDI_REQUEST_CONTAINER
type RPC_BIDI_RESPONSE_CONTAINER (line 183) | typedef struct _RPC_BIDI_RESPONSE_CONTAINER
type RPC_V2_NOTIFY_INFO_DATA (line 192) | typedef struct _RPC_V2_NOTIFY_INFO_DATA
type RPC_V2_NOTIFY_INFO (line 201) | typedef struct _RPC_V2_NOTIFY_INFO
type RPC_V2_UREPLY_PRINTER (line 209) | typedef /* [switch_type] */ union _RPC_V2_UREPLY_PRINTER
type NOTIFY_REPLY_CONTAINER (line 216) | typedef struct _NOTIFY_REPLY_CONTAINER
type NOTIFY_OPTIONS_CONTAINER (line 221) | typedef struct _NOTIFY_OPTIONS_CONTAINER
type RpcPrintPropertyValue (line 226) | typedef /* [public][public][public][public][public] */ struct __MIDL_IRe...
type RpcPrintNamedProperty (line 243) | typedef /* [public][public][public][public] */ struct __MIDL_IRemoteWins...
type RpcPrintPropertiesCollection (line 249) | typedef /* [public][public][public][public][public] */ struct __MIDL_IRe...
type RPC_PrintPropertyValue (line 255) | typedef /* [public][public][public][public][public] */ struct __MIDL_IRe...
type RPC_PrintNamedProperty (line 272) | typedef /* [public][public][public] */ struct __MIDL_IRemoteWinspool_0031
FILE: lib/ms-rprn_h.h
type BOOL (line 62) | typedef int BOOL;
type BYTE (line 68) | typedef unsigned char BYTE;
type BYTE (line 74) | typedef BYTE BOOLEAN;
type BYTE (line 76) | typedef BYTE *PBOOLEAN;
type wchar_t (line 78) | typedef wchar_t WCHAR;
type wchar_t (line 80) | typedef wchar_t *PWCHAR;
type WCHAR (line 82) | typedef WCHAR *BSTR;
type DOUBLE (line 84) | typedef double DOUBLE;
type DWORD (line 86) | typedef unsigned long DWORD;
type DWORD32 (line 92) | typedef unsigned int DWORD32;
type DWORD64 (line 94) | typedef unsigned __int64 DWORD64;
type ULONGLONG (line 98) | typedef unsigned __int64 ULONGLONG;
type ULONGLONG (line 100) | typedef ULONGLONG DWORDLONG;
type ULONGLONG (line 102) | typedef ULONGLONG *PDWORDLONG;
type UCHAR (line 104) | typedef unsigned char UCHAR;
type DWORD (line 110) | typedef DWORD HCALL;
type INT (line 112) | typedef int INT;
type INT8 (line 116) | typedef signed char INT8;
type INT16 (line 118) | typedef short INT16;
type INT32 (line 120) | typedef int INT32;
type __int64 (line 122) | typedef __int64 INT64;
type wchar_t (line 126) | typedef const wchar_t *LMCSTR;
type WCHAR (line 128) | typedef WCHAR *LMSTR;
type LONG (line 130) | typedef long LONG;
type __int64 (line 136) | typedef __int64 LONGLONG;
type LONG (line 138) | typedef LONG HRESULT;
type __int3264 (line 140) | typedef /* [custom] */ __int3264 LONG_PTR;
type ULONG_PTR (line 142) | typedef /* [custom] */ unsigned __int3264 ULONG_PTR;
type LONG32 (line 144) | typedef int LONG32;
type __int64 (line 146) | typedef __int64 LONG64;
type __int64 (line 148) | typedef __int64 *PLONG64;
type wchar_t (line 152) | typedef const wchar_t *LPCWSTR;
type UINT (line 154) | typedef unsigned int UINT;
type UINT8 (line 156) | typedef unsigned char UINT8;
type UINT16 (line 158) | typedef unsigned short UINT16;
type UINT32 (line 160) | typedef unsigned int UINT32;
type UINT64 (line 162) | typedef unsigned __int64 UINT64;
type ULONG (line 164) | typedef unsigned long ULONG;
type QWORD (line 168) | typedef unsigned __int64 QWORD;
type UCHAR (line 172) | typedef UCHAR *STRING;
type ULONG_PTR (line 174) | typedef ULONG_PTR DWORD_PTR;
type ULONG_PTR (line 176) | typedef ULONG_PTR SIZE_T;
type ULONG32 (line 178) | typedef unsigned int ULONG32;
type ULONG64 (line 180) | typedef unsigned __int64 ULONG64;
type USHORT (line 182) | typedef unsigned short USHORT;
type WORD (line 188) | typedef unsigned short WORD;
type UUID (line 195) | typedef struct _GUID UUID;
type _GUID (line 197) | struct _GUID
type LANGID (line 199) | typedef unsigned short LANGID;
type wchar_t (line 205) | typedef /* [handle] */ wchar_t *STRING_HANDLE;
type _FILETIME (line 208) | struct _FILETIME
type _FILETIME (line 210) | struct _FILETIME
type _SYSTEMTIME (line 213) | struct _SYSTEMTIME
type RPC_DRIVER_INFO_3 (line 215) | typedef struct _RPC_DRIVER_INFO_3
type RPC_DRIVER_INFO_4 (line 230) | typedef struct _RPC_DRIVER_INFO_4
type RPC_DRIVER_INFO_6 (line 247) | typedef struct _RPC_DRIVER_INFO_6
type RPC_DRIVER_INFO_8 (line 270) | typedef struct _RPC_DRIVER_INFO_8
type RPC_FORM_INFO_2 (line 303) | typedef struct _RPC_FORM_INFO_2
type PORT_INFO_FF (line 317) | typedef struct _PORT_INFO_FF
type PRINTER_INFO_STRESS (line 324) | typedef struct _PRINTER_INFO_STRESS
type SPLCLIENT_INFO_1 (line 358) | typedef struct _SPLCLIENT_INFO_1
type SPLCLIENT_INFO_2 (line 369) | typedef struct _SPLCLIENT_INFO_2
type SPLCLIENT_INFO_3 (line 374) | typedef struct _SPLCLIENT_INFO_3
type DEVMODE_CONTAINER (line 388) | typedef struct _DEVMODE_CONTAINER
type DOC_INFO_CONTAINER (line 394) | typedef struct _DOC_INFO_CONTAINER
type DRIVER_CONTAINER (line 403) | typedef struct _DRIVER_CONTAINER
type FORM_CONTAINER (line 417) | typedef struct _FORM_CONTAINER
type JOB_CONTAINER (line 427) | typedef struct _JOB_CONTAINER
type MONITOR_CONTAINER (line 439) | typedef struct _MONITOR_CONTAINER
type PORT_CONTAINER (line 449) | typedef struct _PORT_CONTAINER
type PORT_VAR_CONTAINER (line 461) | typedef struct _PORT_VAR_CONTAINER
type PRINTER_CONTAINER (line 467) | typedef struct _PRINTER_CONTAINER
type SECURITY_CONTAINER (line 485) | typedef struct SECURITY_CONTAINER
type SPLCLIENT_CONTAINER (line 491) | typedef struct _SPLCLIENT_CONTAINER
type STRING_CONTAINER (line 502) | typedef struct _STRING_CONTAINER
type SYSTEMTIME_CONTAINER (line 508) | typedef struct _SYSTEMTIME_CONTAINER
type RPC_V2_NOTIFY_OPTIONS_TYPE (line 514) | typedef struct _RPC_V2_NOTIFY_OPTIONS_TYPE
type RPC_V2_NOTIFY_OPTIONS (line 524) | typedef struct _RPC_V2_NOTIFY_OPTIONS
type EBranchOfficeJobEventType (line 532) | typedef /* [public][public][public] */
type RPC_BranchOfficeJobDataPrinted (line 543) | typedef /* [public][public][public] */ struct __MIDL_winspool_0012
type RPC_BranchOfficeJobDataRendered (line 555) | typedef /* [public][public][public] */ struct __MIDL_winspool_0013
type RPC_BranchOfficeJobDataError (line 566) | typedef /* [public][public][public] */ struct __MIDL_winspool_0014
type RPC_BranchOfficeJobDataPipelineFailed (line 582) | typedef /* [public][public][public] */ struct __MIDL_winspool_0015
type RPC_BranchOfficeLogOfflineFileFull (line 589) | typedef /* [public][public][public] */ struct __MIDL_winspool_0016
type RPC_BranchOfficeJobData (line 594) | typedef /* [public][public] */ struct __MIDL_winspool_0017
type RPC_BranchOfficeJobDataContainer (line 608) | typedef /* [public] */ struct __MIDL_winspool_0019
FILE: lib/ms-srvsvc_h.h
type BOOL (line 62) | typedef int BOOL;
type BYTE (line 68) | typedef unsigned char BYTE;
type BYTE (line 74) | typedef BYTE BOOLEAN;
type BYTE (line 76) | typedef BYTE *PBOOLEAN;
type wchar_t (line 78) | typedef wchar_t WCHAR;
type wchar_t (line 80) | typedef wchar_t *PWCHAR;
type WCHAR (line 82) | typedef WCHAR *BSTR;
type DOUBLE (line 84) | typedef double DOUBLE;
type DWORD (line 86) | typedef unsigned long DWORD;
type DWORD32 (line 92) | typedef unsigned int DWORD32;
type DWORD64 (line 94) | typedef unsigned __int64 DWORD64;
type ULONGLONG (line 98) | typedef unsigned __int64 ULONGLONG;
type ULONGLONG (line 100) | typedef ULONGLONG DWORDLONG;
type ULONGLONG (line 102) | typedef ULONGLONG *PDWORDLONG;
type UCHAR (line 104) | typedef unsigned char UCHAR;
type DWORD (line 110) | typedef DWORD HCALL;
type INT (line 112) | typedef int INT;
type INT8 (line 116) | typedef signed char INT8;
type INT16 (line 118) | typedef short INT16;
type INT32 (line 120) | typedef int INT32;
type __int64 (line 122) | typedef __int64 INT64;
type wchar_t (line 126) | typedef const wchar_t *LMCSTR;
type WCHAR (line 128) | typedef WCHAR *LMSTR;
type LONG (line 130) | typedef long LONG;
type __int64 (line 136) | typedef __int64 LONGLONG;
type LONG (line 138) | typedef LONG HRESULT;
type __int3264 (line 140) | typedef /* [custom] */ __int3264 LONG_PTR;
type ULONG_PTR (line 142) | typedef /* [custom] */ unsigned __int3264 ULONG_PTR;
type LONG32 (line 144) | typedef int LONG32;
type __int64 (line 146) | typedef __int64 LONG64;
type __int64 (line 148) | typedef __int64 *PLONG64;
type wchar_t (line 152) | typedef wchar_t *LPWSTR;
type wchar_t (line 154) | typedef wchar_t *PWSTR;
type DWORD (line 156) | typedef DWORD NET_API_STATUS;
type NTSTATUS (line 158) | typedef long NTSTATUS;
type PCONTEXT_HANDLE (line 162) | typedef /* [ref] */ PCONTEXT_HANDLE *PPCONTEXT_HANDLE;
type wchar_t (line 164) | typedef const wchar_t *LPCWSTR;
type UINT (line 166) | typedef unsigned int UINT;
type UINT8 (line 168) | typedef unsigned char UINT8;
type UINT16 (line 170) | typedef unsigned short UINT16;
type UINT32 (line 172) | typedef unsigned int UINT32;
type UINT64 (line 174) | typedef unsigned __int64 UINT64;
type ULONG (line 176) | typedef unsigned long ULONG;
type QWORD (line 180) | typedef unsigned __int64 QWORD;
type UCHAR (line 184) | typedef UCHAR *STRING;
type ULONG_PTR (line 186) | typedef ULONG_PTR DWORD_PTR;
type ULONG_PTR (line 188) | typedef ULONG_PTR SIZE_T;
type ULONG32 (line 190) | typedef unsigned int ULONG32;
type ULONG64 (line 192) | typedef unsigned __int64 ULONG64;
type USHORT (line 194) | typedef unsigned short USHORT;
type WORD (line 200) | typedef unsigned short WORD;
type DWORD (line 206) | typedef DWORD SECURITY_INFORMATION;
type DWORD (line 208) | typedef DWORD *PSECURITY_INFORMATION;
type UUID (line 212) | typedef struct _GUID UUID;
type _GUID (line 214) | struct _GUID
type wchar_t (line 216) | typedef /* [string][handle] */ wchar_t *SRVSVC_HANDLE;
type CONNECTION_INFO_0 (line 218) | typedef struct _CONNECTION_INFO_0
type _CONNECTION_INFO_0 (line 223) | struct _CONNECTION_INFO_0
type _CONNECTION_INFO_0 (line 225) | struct _CONNECTION_INFO_0
type CONNECT_INFO_0_CONTAINER (line 227) | typedef struct _CONNECT_INFO_0_CONTAINER
type _CONNECT_INFO_0_CONTAINER (line 233) | struct _CONNECT_INFO_0_CONTAINER
type _CONNECT_INFO_0_CONTAINER (line 235) | struct _CONNECT_INFO_0_CONTAINER
type CONNECTION_INFO_1 (line 237) | typedef struct _CONNECTION_INFO_1
type _CONNECTION_INFO_1 (line 248) | struct _CONNECTION_INFO_1
type _CONNECTION_INFO_1 (line 250) | struct _CONNECTION_INFO_1
type CONNECT_INFO_1_CONTAINER (line 252) | typedef struct _CONNECT_INFO_1_CONTAINER
type _CONNECT_INFO_1_CONTAINER (line 258) | struct _CONNECT_INFO_1_CONTAINER
type _CONNECT_INFO_1_CONTAINER (line 260) | struct _CONNECT_INFO_1_CONTAINER
type CONNECT_ENUM_UNION (line 262) | typedef /* [switch_type] */ union _CONNECT_ENUM_UNION
type CONNECT_ENUM_STRUCT (line 268) | typedef struct _CONNECT_ENUM_STRUCT
type _CONNECT_ENUM_STRUCT (line 274) | struct _CONNECT_ENUM_STRUCT
type _CONNECT_ENUM_STRUCT (line 276) | struct _CONNECT_ENUM_STRUCT
type FILE_INFO_2 (line 278) | typedef struct _FILE_INFO_2
type _FILE_INFO_2 (line 283) | struct _FILE_INFO_2
type _FILE_INFO_2 (line 285) | struct _FILE_INFO_2
type FILE_INFO_2_CONTAINER (line 287) | typedef struct _FILE_INFO_2_CONTAINER
type _FILE_INFO_2_CONTAINER (line 293) | struct _FILE_INFO_2_CONTAINER
type _FILE_INFO_2_CONTAINER (line 295) | struct _FILE_INFO_2_CONTAINER
type FILE_INFO_3 (line 297) | typedef struct _FILE_INFO_3
type _FILE_INFO_3 (line 306) | struct _FILE_INFO_3
type _FILE_INFO_3 (line 308) | struct _FILE_INFO_3
type FILE_INFO_3_CONTAINER (line 310) | typedef struct _FILE_INFO_3_CONTAINER
type _FILE_INFO_3_CONTAINER (line 316) | struct _FILE_INFO_3_CONTAINER
type _FILE_INFO_3_CONTAINER (line 318) | struct _FILE_INFO_3_CONTAINER
type FILE_ENUM_UNION (line 320) | typedef /* [switch_type] */ union _FILE_ENUM_UNION
type FILE_ENUM_STRUCT (line 326) | typedef struct _FILE_ENUM_STRUCT
type _FILE_ENUM_STRUCT (line 332) | struct _FILE_ENUM_STRUCT
type _FILE_ENUM_STRUCT (line 334) | struct _FILE_ENUM_STRUCT
type FILE_INFO (line 336) | typedef /* [switch_type] */ union _FILE_INFO
type SESSION_INFO_0 (line 346) | typedef struct _SESSION_INFO_0
type _SESSION_INFO_0 (line 351) | struct _SESSION_INFO_0
type _SESSION_INFO_0 (line 353) | struct _SESSION_INFO_0
type SESSION_INFO_0_CONTAINER (line 355) | typedef struct _SESSION_INFO_0_CONTAINER
type _SESSION_INFO_0_CONTAINER (line 361) | struct _SESSION_INFO_0_CONTAINER
type _SESSION_INFO_0_CONTAINER (line 363) | struct _SESSION_INFO_0_CONTAINER
type SESSION_INFO_1 (line 365) | typedef struct _SESSION_INFO_1
type _SESSION_INFO_1 (line 375) | struct _SESSION_INFO_1
type _SESSION_INFO_1 (line 377) | struct _SESSION_INFO_1
type SESSION_INFO_1_CONTAINER (line 379) | typedef struct _SESSION_INFO_1_CONTAINER
type _SESSION_INFO_1_CONTAINER (line 385) | struct _SESSION_INFO_1_CONTAINER
type _SESSION_INFO_1_CONTAINER (line 387) | struct _SESSION_INFO_1_CONTAINER
type SESSION_INFO_2 (line 389) | typedef struct _SESSION_INFO_2
type _SESSION_INFO_2 (line 400) | struct _SESSION_INFO_2
type _SESSION_INFO_2 (line 402) | struct _SESSION_INFO_2
type SESSION_INFO_2_CONTAINER (line 404) | typedef struct _SESSION_INFO_2_CONTAINER
type _SESSION_INFO_2_CONTAINER (line 410) | struct _SESSION_INFO_2_CONTAINER
type _SESSION_INFO_2_CONTAINER (line 412) | struct _SESSION_INFO_2_CONTAINER
type SESSION_INFO_10 (line 414) | typedef struct _SESSION_INFO_10
type _SESSION_INFO_10 (line 422) | struct _SESSION_INFO_10
type _SESSION_INFO_10 (line 424) | struct _SESSION_INFO_10
type SESSION_INFO_10_CONTAINER (line 426) | typedef struct _SESSION_INFO_10_CONTAINER
type _SESSION_INFO_10_CONTAINER (line 432) | struct _SESSION_INFO_10_CONTAINER
type _SESSION_INFO_10_CONTAINER (line 434) | struct _SESSION_INFO_10_CONTAINER
type SESSION_INFO_502 (line 436) | typedef struct _SESSION_INFO_502
type _SESSION_INFO_502 (line 448) | struct _SESSION_INFO_502
type _SESSION_INFO_502 (line 450) | struct _SESSION_INFO_502
type SESSION_INFO_502_CONTAINER (line 452) | typedef struct _SESSION_INFO_502_CONTAINER
type _SESSION_INFO_502_CONTAINER (line 458) | struct _SESSION_INFO_502_CONTAINER
type _SESSION_INFO_502_CONTAINER (line 460) | struct _SESSION_INFO_502_CONTAINER
type SESSION_ENUM_UNION (line 462) | typedef /* [switch_type] */ union _SESSION_ENUM_UNION
type SESSION_ENUM_STRUCT (line 471) | typedef struct _SESSION_ENUM_STRUCT
type _SESSION_ENUM_STRUCT (line 477) | struct _SESSION_ENUM_STRUCT
type _SESSION_ENUM_STRUCT (line 479) | struct _SESSION_ENUM_STRUCT
type SHARE_INFO_502_I (line 481) | typedef struct _SHARE_INFO_502_I
type _SHARE_INFO_502_I (line 495) | struct _SHARE_INFO_502_I
type _SHARE_INFO_502_I (line 497) | struct _SHARE_INFO_502_I
type SHARE_INFO_503_I (line 499) | typedef struct _SHARE_INFO_503_I
type _SHARE_INFO_503_I (line 514) | struct _SHARE_INFO_503_I
type _SHARE_INFO_503_I (line 516) | struct _SHARE_INFO_503_I
type SHARE_INFO_503_CONTAINER (line 518) | typedef struct _SHARE_INFO_503_CONTAINER
type _SHARE_INFO_503_CONTAINER (line 524) | struct _SHARE_INFO_503_CONTAINER
type _SHARE_INFO_503_CONTAINER (line 526) | struct _SHARE_INFO_503_CONTAINER
type SHARE_INFO_1501_I (line 528) | typedef struct _SHARE_INFO_1501_I
type _SHARE_INFO_1501_I (line 534) | struct _SHARE_INFO_1501_I
type _SHARE_INFO_1501_I (line 536) | struct _SHARE_INFO_1501_I
type SHARE_INFO_0 (line 538) | typedef struct _SHARE_INFO_0
type _SHARE_INFO_0 (line 543) | struct _SHARE_INFO_0
type _SHARE_INFO_0 (line 545) | struct _SHARE_INFO_0
type SHARE_INFO_0_CONTAINER (line 547) | typedef struct _SHARE_INFO_0_CONTAINER
type SHARE_INFO_1 (line 553) | typedef struct _SHARE_INFO_1
type _SHARE_INFO_1 (line 560) | struct _SHARE_INFO_1
type _SHARE_INFO_1 (line 562) | struct _SHARE_INFO_1
type SHARE_INFO_1_CONTAINER (line 564) | typedef struct _SHARE_INFO_1_CONTAINER
type SHARE_INFO_2 (line 570) | typedef struct _SHARE_INFO_2
type _SHARE_INFO_2 (line 582) | struct _SHARE_INFO_2
type _SHARE_INFO_2 (line 584) | struct _SHARE_INFO_2
type SHARE_INFO_2_CONTAINER (line 586) | typedef struct _SHARE_INFO_2_CONTAINER
type _SHARE_INFO_2_CONTAINER (line 592) | struct _SHARE_INFO_2_CONTAINER
type _SHARE_INFO_2_CONTAINER (line 594) | struct _SHARE_INFO_2_CONTAINER
type SHARE_INFO_501 (line 596) | typedef struct _SHARE_INFO_501
type _SHARE_INFO_501 (line 604) | struct _SHARE_INFO_501
type _SHARE_INFO_501 (line 606) | struct _SHARE_INFO_501
type SHARE_INFO_501_CONTAINER (line 608) | typedef struct _SHARE_INFO_501_CONTAINER
type _SHARE_INFO_501_CONTAINER (line 614) | struct _SHARE_INFO_501_CONTAINER
type _SHARE_INFO_501_CONTAINER (line 616) | struct _SHARE_INFO_501_CONTAINER
type SHARE_INFO_502_CONTAINER (line 618) | typedef struct _SHARE_INFO_502_CONTAINER
type _SHARE_INFO_502_CONTAINER (line 624) | struct _SHARE_INFO_502_CONTAINER
type _SHARE_INFO_502_CONTAINER (line 626) | struct _SHARE_INFO_502_CONTAINER
type SHARE_ENUM_UNION (line 628) | typedef /* [switch_type] */ union _SHARE_ENUM_UNION
type SHARE_ENUM_STRUCT (line 638) | typedef struct _SHARE_ENUM_STRUCT
type _SHARE_ENUM_STRUCT (line 644) | struct _SHARE_ENUM_STRUCT
type _SHARE_ENUM_STRUCT (line 646) | struct _SHARE_ENUM_STRUCT
type SHARE_INFO_1004 (line 648) | typedef struct _SHARE_INFO_1004
type _SHARE_INFO_1004 (line 653) | struct _SHARE_INFO_1004
type _SHARE_INFO_1004 (line 655) | struct _SHARE_INFO_1004
type SHARE_INFO_1006 (line 657) | typedef struct _SHARE_INFO_1006
type _SHARE_INFO_1006 (line 662) | struct _SHARE_INFO_1006
type _SHARE_INFO_1006 (line 664) | struct _SHARE_INFO_1006
type SHARE_INFO_1005 (line 666) | typedef struct _SHARE_INFO_1005
type _SHARE_INFO_1005 (line 671) | struct _SHARE_INFO_1005
type _SHARE_INFO_1005 (line 673) | struct _SHARE_INFO_1005
type SHARE_INFO (line 675) | typedef /* [switch_type] */ union _SHARE_INFO
type SERVER_INFO_100 (line 694) | typedef struct _SERVER_INFO_100
type _SERVER_INFO_100 (line 700) | struct _SERVER_INFO_100
type _SERVER_INFO_100 (line 702) | struct _SERVER_INFO_100
type SERVER_INFO_101 (line 704) | typedef struct _SERVER_INFO_101
type _SERVER_INFO_101 (line 714) | struct _SERVER_INFO_101
type _SERVER_INFO_101 (line 716) | struct _SERVER_INFO_101
type SERVER_INFO_102 (line 718) | typedef struct _SERVER_INFO_102
type _SERVER_INFO_102 (line 735) | struct _SERVER_INFO_102
type _SERVER_INFO_102 (line 737) | struct _SERVER_INFO_102
type SERVER_INFO_103 (line 739) | typedef struct _SERVER_INFO_103
type _SERVER_INFO_103 (line 757) | struct _SERVER_INFO_103
type _SERVER_INFO_103 (line 759) | struct _SERVER_INFO_103
type SERVER_INFO_502 (line 761) | typedef struct _SERVER_INFO_502
type _SERVER_INFO_502 (line 783) | struct _SERVER_INFO_502
type _SERVER_INFO_502 (line 785) | struct _SERVER_INFO_502
type SERVER_INFO_503 (line 787) | typedef struct _SERVER_INFO_503
type _SERVER_INFO_503 (line 833) | struct _SERVER_INFO_503
type _SERVER_INFO_503 (line 835) | struct _SERVER_INFO_503
type SERVER_INFO_599 (line 837) | typedef struct _SERVER_INFO_599
type _SERVER_INFO_599 (line 897) | struct _SERVER_INFO_599
type _SERVER_INFO_599 (line 899) | struct _SERVER_INFO_599
type SERVER_INFO_1005 (line 901) | typedef struct _SERVER_INFO_1005
type _SERVER_INFO_1005 (line 906) | struct _SERVER_INFO_1005
type _SERVER_INFO_1005 (line 908) | struct _SERVER_INFO_1005
type SERVER_INFO_1107 (line 910) | typedef struct _SERVER_INFO_1107
type _SERVER_INFO_1107 (line 915) | struct _SERVER_INFO_1107
type _SERVER_INFO_1107 (line 917) | struct _SERVER_INFO_1107
type SERVER_INFO_1010 (line 919) | typedef struct _SERVER_INFO_1010
type _SERVER_INFO_1010 (line 924) | struct _SERVER_INFO_1010
type _SERVER_INFO_1010 (line 926) | struct _SERVER_INFO_1010
type SERVER_INFO_1016 (line 928) | typedef struct _SERVER_INFO_1016
type _SERVER_INFO_1016 (line 933) | struct _SERVER_INFO_1016
type _SERVER_INFO_1016 (line 935) | struct _SERVER_INFO_1016
type SERVER_INFO_1017 (line 937) | typedef struct _SERVER_INFO_1017
type _SERVER_INFO_1017 (line 942) | struct _SERVER_INFO_1017
type _SERVER_INFO_1017 (line 944) | struct _SERVER_INFO_1017
type SERVER_INFO_1018 (line 946) | typedef struct _SERVER_INFO_1018
type _SERVER_INFO_1018 (line 951) | struct _SERVER_INFO_1018
type _SERVER_INFO_1018 (line 953) | struct _SERVER_INFO_1018
type SERVER_INFO_1501 (line 955) | typedef struct _SERVER_INFO_1501
type _SERVER_INFO_1501 (line 960) | struct _SERVER_INFO_1501
type _SERVER_INFO_1501 (line 962) | struct _SERVER_INFO_1501
type SERVER_INFO_1502 (line 964) | typedef struct _SERVER_INFO_1502
type _SERVER_INFO_1502 (line 969) | struct _SERVER_INFO_1502
type _SERVER_INFO_1502 (line 971) | struct _SERVER_INFO_1502
type SERVER_INFO_1503 (line 973) | typedef struct _SERVER_INFO_1503
type _SERVER_INFO_1503 (line 978) | struct _SERVER_INFO_1503
type _SERVER_INFO_1503 (line 980) | struct _SERVER_INFO_1503
type SERVER_INFO_1506 (line 982) | typedef struct _SERVER_INFO_1506
type _SERVER_INFO_1506 (line 987) | struct _SERVER_INFO_1506
type _SERVER_INFO_1506 (line 989) | struct _SERVER_INFO_1506
type SERVER_INFO_1510 (line 991) | typedef struct _SERVER_INFO_1510
type _SERVER_INFO_1510 (line 996) | struct _SERVER_INFO_1510
type _SERVER_INFO_1510 (line 998) | struct _SERVER_INFO_1510
type SERVER_INFO_1511 (line 1000) | typedef struct _SERVER_INFO_1511
type _SERVER_INFO_1511 (line 1005) | struct _SERVER_INFO_1511
type _SERVER_INFO_1511 (line 1007) | struct _SERVER_INFO_1511
type SERVER_INFO_1512 (line 1009) | typedef struct _SERVER_INFO_1512
type _SERVER_INFO_1512 (line 1014) | struct _SERVER_INFO_1512
type _SERVER_INFO_1512 (line 1016) | struct _SERVER_INFO_1512
type SERVER_INFO_1513 (line 1018) | typedef struct _SERVER_INFO_1513
type _SERVER_INFO_1513 (line 1023) | struct _SERVER_INFO_1513
type _SERVER_INFO_1513 (line 1025) | struct _SERVER_INFO_1513
type SERVER_INFO_1514 (line 1027) | typedef struct _SERVER_INFO_1514
type _SERVER_INFO_1514 (line 1032) | struct _SERVER_INFO_1514
type _SERVER_INFO_1514 (line 1034) | struct _SERVER_INFO_1514
type SERVER_INFO_1515 (line 1036) | typedef struct _SERVER_INFO_1515
type _SERVER_INFO_1515 (line 1041) | struct _SERVER_INFO_1515
type _SERVER_INFO_1515 (line 1043) | struct _SERVER_INFO_1515
type SERVER_INFO_1516 (line 1045) | typedef struct _SERVER_INFO_1516
type _SERVER_INFO_1516 (line 1050) | struct _SERVER_INFO_1516
type _SERVER_INFO_1516 (line 1052) | struct _SERVER_INFO_1516
type SERVER_INFO_1518 (line 1054) | typedef struct _SERVER_INFO_1518
type _SERVER_INFO_1518 (line 1059) | struct _SERVER_INFO_1518
type _SERVER_INFO_1518 (line 1061) | struct _SERVER_INFO_1518
type SERVER_INFO_1523 (line 1063) | typedef struct _SERVER_INFO_1523
type _SERVER_INFO_1523 (line 1068) | struct _SERVER_INFO_1523
type _SERVER_INFO_1523 (line 1070) | struct _SERVER_INFO_1523
type SERVER_INFO_1528 (line 1072) | typedef struct _SERVER_INFO_1528
type _SERVER_INFO_1528 (line 1077) | struct _SERVER_INFO_1528
type _SERVER_INFO_1528 (line 1079) | struct _SERVER_INFO_1528
type SERVER_INFO_1529 (line 1081) | typedef struct _SERVER_INFO_1529
type _SERVER_INFO_1529 (line 1086) | struct _SERVER_INFO_1529
type _SERVER_INFO_1529 (line 1088) | struct _SERVER_INFO_1529
type SERVER_INFO_1530 (line 1090) | typedef struct _SERVER_INFO_1530
type _SERVER_INFO_1530 (line 1095) | struct _SERVER_INFO_1530
type _SERVER_INFO_1530 (line 1097) | struct _SERVER_INFO_1530
type SERVER_INFO_1533 (line 1099) | typedef struct _SERVER_INFO_1533
type _SERVER_INFO_1533 (line 1104) | struct _SERVER_INFO_1533
type _SERVER_INFO_1533 (line 1106) | struct _SERVER_INFO_1533
type SERVER_INFO_1534 (line 1108) | typedef struct _SERVER_INFO_1534
type _SERVER_INFO_1534 (line 1113) | struct _SERVER_INFO_1534
type _SERVER_INFO_1534 (line 1115) | struct _SERVER_INFO_1534
type SERVER_INFO_1535 (line 1117) | typedef struct _SERVER_INFO_1535
type _SERVER_INFO_1535 (line 1122) | struct _SERVER_INFO_1535
type _SERVER_INFO_1535 (line 1124) | struct _SERVER_INFO_1535
type SERVER_INFO_1536 (line 1126) | typedef struct _SERVER_INFO_1536
type _SERVER_INFO_1536 (line 1131) | struct _SERVER_INFO_1536
type _SERVER_INFO_1536 (line 1133) | struct _SERVER_INFO_1536
type SERVER_INFO_1538 (line 1135) | typedef struct _SERVER_INFO_1538
type _SERVER_INFO_1538 (line 1140) | struct _SERVER_INFO_1538
type _SERVER_INFO_1538 (line 1142) | struct _SERVER_INFO_1538
type SERVER_INFO_1539 (line 1144) | typedef struct _SERVER_INFO_1539
type _SERVER_INFO_1539 (line 1149) | struct _SERVER_INFO_1539
type _SERVER_INFO_1539 (line 1151) | struct _SERVER_INFO_1539
type SERVER_INFO_1540 (line 1153) | typedef struct _SERVER_INFO_1540
type _SERVER_INFO_1540 (line 1158) | struct _SERVER_INFO_1540
type _SERVER_INFO_1540 (line 1160) | struct _SERVER_INFO_1540
type SERVER_INFO_1541 (line 1162) | typedef struct _SERVER_INFO_1541
type _SERVER_INFO_1541 (line 1167) | struct _SERVER_INFO_1541
type _SERVER_INFO_1541 (line 1169) | struct _SERVER_INFO_1541
type SERVER_INFO_1542 (line 1171) | typedef struct _SERVER_INFO_1542
type _SERVER_INFO_1542 (line 1176) | struct _SERVER_INFO_1542
type _SERVER_INFO_1542 (line 1178) | struct _SERVER_INFO_1542
type SERVER_INFO_1543 (line 1180) | typedef struct _SERVER_INFO_1543
type _SERVER_INFO_1543 (line 1185) | struct _SERVER_INFO_1543
type _SERVER_INFO_1543 (line 1187) | struct _SERVER_INFO_1543
type SERVER_INFO_1544 (line 1189) | typedef struct _SERVER_INFO_1544
type _SERVER_INFO_1544 (line 1194) | struct _SERVER_INFO_1544
type _SERVER_INFO_1544 (line 1196) | struct _SERVER_INFO_1544
type SERVER_INFO_1545 (line 1198) | typedef struct _SERVER_INFO_1545
type _SERVER_INFO_1545 (line 1203) | struct _SERVER_INFO_1545
type _SERVER_INFO_1545 (line 1205) | struct _SERVER_INFO_1545
type SERVER_INFO_1546 (line 1207) | typedef struct _SERVER_INFO_1546
type _SERVER_INFO_1546 (line 1212) | struct _SERVER_INFO_1546
type _SERVER_INFO_1546 (line 1214) | struct _SERVER_INFO_1546
type SERVER_INFO_1547 (line 1216) | typedef struct _SERVER_INFO_1547
type _SERVER_INFO_1547 (line 1221) | struct _SERVER_INFO_1547
type _SERVER_INFO_1547 (line 1223) | struct _SERVER_INFO_1547
type SERVER_INFO_1548 (line 1225) | typedef struct _SERVER_INFO_1548
type _SERVER_INFO_1548 (line 1230) | struct _SERVER_INFO_1548
type _SERVER_INFO_1548 (line 1232) | struct _SERVER_INFO_1548
type SERVER_INFO_1549 (line 1234) | typedef struct _SERVER_INFO_1549
type _SERVER_INFO_1549 (line 1239) | struct _SERVER_INFO_1549
type _SERVER_INFO_1549 (line 1241) | struct _SERVER_INFO_1549
type SERVER_INFO_1550 (line 1243) | typedef struct _SERVER_INFO_1550
type _SERVER_INFO_1550 (line 1248) | struct _SERVER_INFO_1550
type _SERVER_INFO_1550 (line 1250) | struct _SERVER_INFO_1550
type SERVER_INFO_1552 (line 1252) | typedef struct _SERVER_INFO_1552
type _SERVER_INFO_1552 (line 1257) | struct _SERVER_INFO_1552
type _SERVER_INFO_1552 (line 1259) | struct _SERVER_INFO_1552
type SERVER_INFO_1553 (line 1261) | typedef struct _SERVER_INFO_1553
type _SERVER_INFO_1553 (line 1266) | struct _SERVER_INFO_1553
type _SERVER_INFO_1553 (line 1268) | struct _SERVER_INFO_1553
type SERVER_INFO_1554 (line 1270) | typedef struct _SERVER_INFO_1554
type _SERVER_INFO_1554 (line 1275) | struct _SERVER_INFO_1554
type _SERVER_INFO_1554 (line 1277) | struct _SERVER_INFO_1554
type SERVER_INFO_1555 (line 1279) | typedef struct _SERVER_INFO_1555
type _SERVER_INFO_1555 (line 1284) | struct _SERVER_INFO_1555
type _SERVER_INFO_1555 (line 1286) | struct _SERVER_INFO_1555
type SERVER_INFO_1556 (line 1288) | typedef struct _SERVER_INFO_1556
type _SERVER_INFO_1556 (line 1293) | struct _SERVER_INFO_1556
type _SERVER_INFO_1556 (line 1295) | struct _SERVER_INFO_1556
type SERVER_INFO (line 1297) | typedef /* [switch_type] */ union _SERVER_INFO
type DISK_INFO (line 1356) | typedef struct _DISK_INFO
type _DISK_INFO (line 1361) | struct _DISK_INFO
type _DISK_INFO (line 1363) | struct _DISK_INFO
type DISK_ENUM_CONTAINER (line 1365) | typedef struct _DISK_ENUM_CONTAINER
type SERVER_TRANSPORT_INFO_0 (line 1371) | typedef struct _SERVER_TRANSPORT_INFO_0
type _SERVER_TRANSPORT_INFO_0 (line 1380) | struct _SERVER_TRANSPORT_INFO_0
type _SERVER_TRANSPORT_INFO_0 (line 1382) | struct _SERVER_TRANSPORT_INFO_0
type SERVER_XPORT_INFO_0_CONTAINER (line 1384) | typedef struct _SERVER_XPORT_INFO_0_CONTAINER
type _SERVER_XPORT_INFO_0_CONTAINER (line 1390) | struct _SERVER_XPORT_INFO_0_CONTAINER
type SERVER_TRANSPORT_INFO_1 (line 1392) | typedef struct _SERVER_TRANSPORT_INFO_1
type _SERVER_TRANSPORT_INFO_1 (line 1402) | struct _SERVER_TRANSPORT_INFO_1
type _SERVER_TRANSPORT_INFO_1 (line 1404) | struct _SERVER_TRANSPORT_INFO_1
type SERVER_XPORT_INFO_1_CONTAINER (line 1406) | typedef struct _SERVER_XPORT_INFO_1_CONTAINER
type _SERVER_XPORT_INFO_1_CONTAINER (line 1412) | struct _SERVER_XPORT_INFO_1_CONTAINER
type SERVER_TRANSPORT_INFO_2 (line 1414) | typedef struct _SERVER_TRANSPORT_INFO_2
type _SERVER_TRANSPORT_INFO_2 (line 1425) | struct _SERVER_TRANSPORT_INFO_2
type _SERVER_TRANSPORT_INFO_2 (line 1427) | struct _SERVER_TRANSPORT_INFO_2
type SERVER_XPORT_INFO_2_CONTAINER (line 1429) | typedef struct _SERVER_XPORT_INFO_2_CONTAINER
type _SERVER_XPORT_INFO_2_CONTAINER (line 1435) | struct _SERVER_XPORT_INFO_2_CONTAINER
type SERVER_TRANSPORT_INFO_3 (line 1437) | typedef struct _SERVER_TRANSPORT_INFO_3
type _SERVER_TRANSPORT_INFO_3 (line 1450) | struct _SERVER_TRANSPORT_INFO_3
type _SERVER_TRANSPORT_INFO_3 (line 1452) | struct _SERVER_TRANSPORT_INFO_3
type SERVER_XPORT_INFO_3_CONTAINER (line 1454) | typedef struct _SERVER_XPORT_INFO_3_CONTAINER
type _SERVER_XPORT_INFO_3_CONTAINER (line 1460) | struct _SERVER_XPORT_INFO_3_CONTAINER
type TRANSPORT_INFO (line 1462) | typedef /* [switch_type] */ union _TRANSPORT_INFO
type SERVER_XPORT_ENUM_UNION (line 1474) | typedef /* [switch_type] */ union _SERVER_XPORT_ENUM_UNION
type SERVER_XPORT_ENUM_STRUCT (line 1482) | typedef struct _SERVER_XPORT_ENUM_STRUCT
type _SERVER_XPORT_ENUM_STRUCT (line 1488) | struct _SERVER_XPORT_ENUM_STRUCT
type _SERVER_XPORT_ENUM_STRUCT (line 1490) | struct _SERVER_XPORT_ENUM_STRUCT
type SHARE_DEL_HANDLE (line 1494) | typedef SHARE_DEL_HANDLE *PSHARE_DEL_HANDLE;
type ADT_SECURITY_DESCRIPTOR (line 1496) | typedef struct _ADT_SECURITY_DESCRIPTOR
type _ADT_SECURITY_DESCRIPTOR (line 1502) | struct _ADT_SECURITY_DESCRIPTOR
type STAT_SERVER_0 (line 1504) | typedef struct _STAT_SERVER_0
type _STAT_SERVER_0 (line 1525) | struct _STAT_SERVER_0
type _STAT_SERVER_0 (line 1527) | struct _STAT_SERVER_0
type TIME_OF_DAY_INFO (line 1529) | typedef struct _TIME_OF_DAY_INFO
type _TIME_OF_DAY_INFO (line 1545) | struct _TIME_OF_DAY_INFO
type _TIME_OF_DAY_INFO (line 1547) | struct _TIME_OF_DAY_INFO
type NET_DFS_ENTRY_ID (line 1549) | typedef struct _NET_DFS_ENTRY_ID
type _NET_DFS_ENTRY_ID (line 1555) | struct _NET_DFS_ENTRY_ID
type NET_DFS_ENTRY_ID_CONTAINER (line 1557) | typedef struct _NET_DFS_ENTRY_ID_CONTAINER
type _NET_DFS_ENTRY_ID_CONTAINER (line 1563) | struct _NET_DFS_ENTRY_ID_CONTAINER
type DFS_SITENAME_INFO (line 1565) | typedef struct _DFS_SITENAME_INFO
type _DFS_SITENAME_INFO (line 1571) | struct _DFS_SITENAME_INFO
type _DFS_SITENAME_INFO (line 1573) | struct _DFS_SITENAME_INFO
type DFS_SITELIST_INFO (line 1575) | typedef struct _DFS_SITELIST_INFO
type _DFS_SITELIST_INFO (line 1581) | struct _DFS_SITELIST_INFO
type _DFS_SITELIST_INFO (line 1583) | struct _DFS_SITELIST_INFO
type SERVER_ALIAS_INFO_0 (line 1585) | typedef struct _SERVER_ALIAS_INFO_0
type _SERVER_ALIAS_INFO_0 (line 1593) | struct _SERVER_ALIAS_INFO_0
type _SERVER_ALIAS_INFO_0 (line 1595) | struct _SERVER_ALIAS_INFO_0
type SERVER_ALIAS_INFO_0_CONTAINER (line 1597) | typedef struct _SERVER_ALIAS_INFO_0_CONTAINER
type SERVER_ALIAS_ENUM_STRUCT (line 1603) | typedef struct _SERVER_ALIAS_ENUM_STRUCT
type _SERVER_ALIAS_ENUM_STRUCT (line 1612) | struct _SERVER_ALIAS_ENUM_STRUCT
type _SERVER_ALIAS_ENUM_STRUCT (line 1614) | struct _SERVER_ALIAS_ENUM_STRUCT
type SERVER_ALIAS_INFO (line 1616) | typedef /* [switch_type] */ union _SERVER_ALIAS_INFO
FILE: rpc_interfaces/ms-efsr_c.c
type MS2DEFSR_df1941c52Dfe892D4e792Dbf102D463657acf44d_MIDL_TYPE_FORMAT_STRING (line 38) | typedef struct _MS2DEFSR_df1941c52Dfe892D4e792Dbf102D463657acf44d_MIDL_T...
type MS2DEFSR_df1941c52Dfe892D4e792Dbf102D463657acf44d_MIDL_PROC_FORMAT_STRING (line 44) | typedef struct _MS2DEFSR_df1941c52Dfe892D4e792Dbf102D463657acf44d_MIDL_P...
type MS2DEFSR_df1941c52Dfe892D4e792Dbf102D463657acf44d_MIDL_EXPR_FORMAT_STRING (line 50) | typedef struct _MS2DEFSR_df1941c52Dfe892D4e792Dbf102D463657acf44d_MIDL_E...
function EfsRpcOpenFileRaw (line 157) | long EfsRpcOpenFileRaw(
function EfsRpcReadFileRaw (line 179) | long EfsRpcReadFileRaw(
function EfsRpcWriteFileRaw (line 197) | long EfsRpcWriteFileRaw(
function EfsRpcCloseRaw (line 215) | void EfsRpcCloseRaw(
function EfsRpcEncryptFileSrv (line 228) | long EfsRpcEncryptFileSrv(
function EfsRpcDecryptFileSrv (line 246) | long EfsRpcDecryptFileSrv(
function DWORD (line 266) | DWORD EfsRpcQueryUsersOnFile(
function DWORD (line 286) | DWORD EfsRpcQueryRecoveryAgents(
function DWORD (line 306) | DWORD EfsRpcRemoveUsersFromFile(
function DWORD (line 326) | DWORD EfsRpcAddUsersToFile(
function Proc10_EfsRpcSetFileEncryptionKey (line 346) | long Proc10_EfsRpcSetFileEncryptionKey(
function DWORD (line 368) | DWORD EfsRpcNotSupported(
function DWORD (line 396) | DWORD EfsRpcFileKeyInfo(
function DWORD (line 418) | DWORD EfsRpcDuplicateEncryptionInfoFile(
function Proc14_EfsUsePinForEncryptedFiles (line 446) | long Proc14_EfsUsePinForEncryptedFiles(
function DWORD (line 466) | DWORD EfsRpcAddUsersToFileEx(
function DWORD (line 490) | DWORD EfsRpcFileKeyInfoEx(
function Proc17_EfsRpcFileKeyInfoEx (line 516) | long Proc17_EfsRpcFileKeyInfoEx(
function DWORD (line 534) | DWORD EfsRpcGetEncryptedFileMetadata(
function DWORD (line 554) | DWORD EfsRpcSetEncryptedFileMetadata(
function DWORD (line 578) | DWORD EfsRpcFlushEfsCache(
function EfsRpcEncryptFileExSrv (line 594) | long EfsRpcEncryptFileExSrv(
function DWORD (line 616) | DWORD EfsRpcQueryProtectors(
function Proc23_EfsRpcWriteFileWithHeaderRaw (line 636) | long Proc23_EfsRpcWriteFileWithHeaderRaw(
function Proc24_EdpRpcCredentialCreate (line 677) | long Proc24_EdpRpcCredentialCreate(
function Proc25_EdpRpcCredentialQuery (line 701) | long Proc25_EdpRpcCredentialQuery(
function Proc26_EdpRpcCredentialExists (line 725) | long Proc26_EdpRpcCredentialExists(
function Proc27_EdpRpcCredentialDelete (line 749) | long Proc27_EdpRpcCredentialDelete(
function Proc28_EdpRpcQueryRevokedPolicyOwnerIds (line 775) | long Proc28_EdpRpcQueryRevokedPolicyOwnerIds(
function Proc29_EdpRpcQueryDplEnforcedPolicyOwnerIds (line 797) | long Proc29_EdpRpcQueryDplEnforcedPolicyOwnerIds(
function Proc30_EdpRpcGetLockSessionWrappedKey (line 817) | long Proc30_EdpRpcGetLockSessionWrappedKey(
function Proc31_EdpRpcGetLockSessionUnwrappedKey (line 847) | long Proc31_EdpRpcGetLockSessionUnwrappedKey(
function Proc32_EdpRpcGetCredServiceState (line 877) | long Proc32_EdpRpcGetCredServiceState(
function Proc33_EdpRpcDplUpgradePinInfo (line 911) | long Proc33_EdpRpcDplUpgradePinInfo(
function Proc34_EdpRpcDplUpgradeVerifyUser (line 935) | long Proc34_EdpRpcDplUpgradeVerifyUser(
function Proc35_EdpRpcDplUserCredentialsSet (line 959) | long Proc35_EdpRpcDplUserCredentialsSet(
function Proc36_EdpRpcDplUserUnlockStart (line 983) | long Proc36_EdpRpcDplUserUnlockStart(
function Proc37_EdpRpcDplUserUnlockComplete (line 1007) | long Proc37_EdpRpcDplUserUnlockComplete(
function Proc38_EdpRpcQueueFileForEncryption (line 1029) | long Proc38_EdpRpcQueueFileForEncryption(
function Proc39_EdpRpcServiceFileEncryptionQueue (line 1053) | long Proc39_EdpRpcServiceFileEncryptionQueue(
function Proc40_EdpRpcCredSvcControl (line 1071) | long Proc40_EdpRpcCredSvcControl(
function Proc41_EdpRpcRmsClearKeys (line 1106) | long Proc41_EdpRpcRmsClearKeys(
function Proc42_EdpRpcRmsContainerizeFile (line 1123) | long Proc42_EdpRpcRmsContainerizeFile(
function Proc43_EdpRpcRmsGetContainerIdentity (line 1150) | long Proc43_EdpRpcRmsGetContainerIdentity(
function Proc44_EdpRpcRmsDecontainerizeFile (line 1171) | long Proc44_EdpRpcRmsDecontainerizeFile(
function Proc45_EdpRpcAllowFileAccessForProcess (line 1194) | long Proc45_EdpRpcAllowFileAccessForProcess(
function Proc46_EdpRpcGetTfaCache (line 1217) | long Proc46_EdpRpcGetTfaCache(
type NDR64_FORMAT_CHAR (line 4523) | typedef
type __midl_frag472_t (line 4528) | typedef
type __midl_frag471_t (line 4536) | typedef
type __midl_frag470_t (line 4541) | typedef
type __midl_frag469_t (line 4550) | typedef
type __midl_frag468_t (line 4555) | typedef
type __midl_frag467_t (line 4563) | typedef
type __midl_frag466_t (line 4572) | typedef
type __midl_frag465_t (line 4581) | typedef
type __midl_frag463_t (line 4600) | typedef
type __midl_frag462_t (line 4619) | typedef
type __midl_frag461_t (line 4634) | typedef
type __midl_frag460_t (line 4639) | typedef
type __midl_frag459_t (line 4644) | typedef
type __midl_frag456_t (line 4655) | typedef
type NDR64_FORMAT_CHAR (line 4660) | typedef
type __midl_frag454_t (line 4665) | typedef
type __midl_frag453_t (line 4670) | typedef
type __midl_frag452_t (line 4675) | typedef
type __midl_frag449_t (line 4688) | typedef
type __midl_frag448_t (line 4693) | typedef
type __midl_frag443_t (line 4698) | typedef
type __midl_frag436_t (line 4711) | typedef
type __midl_frag423_t (line 4723) | typedef
type __midl_frag421_t (line 4738) | typedef
type __midl_frag418_t (line 4748) | typedef
type NDR64_FORMAT_CHAR (line 4753) | typedef
type __midl_frag416_t (line 4758) | typedef
type __midl_frag415_t (line 4768) | typedef
type __midl_frag414_t (line 4777) | typedef
type __midl_frag413_t (line 4782) | typedef
type NDR64_FORMAT_CHAR (line 4787) | typedef
type NDR64_FORMAT_CHAR (line 4792) | typedef
type __midl_frag410_t (line 4797) | typedef
type __midl_frag409_t (line 4806) | typedef
type __midl_frag408_t (line 4815) | typedef
type NDR64_FORMAT_CHAR (line 4820) | typedef
type NDR64_FORMAT_CHAR (line 4825) | typedef
type __midl_frag405_t (line 4830) | typedef
type __midl_frag404_t (line 4839) | typedef
type __midl_frag403_t (line 4848) | typedef
type __midl_frag402_t (line 4853) | typedef
type __midl_frag401_t (line 4858) | typedef
type NDR64_FORMAT_CHAR (line 4863) | typedef
type __midl_frag397_t (line 4868) | typedef
type NDR64_FORMAT_CHAR (line 4887) | typedef
type __midl_frag394_t (line 4892) | typedef
type __midl_frag392_t (line 4903) | typedef
type __midl_frag391_t (line 4908) | typedef
type __midl_frag389_t (line 4913) | typedef
type __midl_frag386_t (line 4918) | typedef
type __midl_frag385_t (line 4926) | typedef
type __midl_frag384_t (line 4931) | typedef
type NDR64_FORMAT_CHAR (line 4945) | typedef
type __midl_frag379_t (line 4950) | typedef
type __midl_frag378_t (line 4955) | typedef
type __midl_frag375_t (line 4968) | typedef
type __midl_frag369_t (line 4973) | typedef
type NDR64_FORMAT_CHAR (line 4987) | typedef
type __midl_frag361_t (line 4992) | typedef
type __midl_frag356_t (line 5006) | typedef
type __midl_frag351_t (line 5011) | typedef
type __midl_frag348_t (line 5025) | typedef
type __midl_frag341_t (line 5030) | typedef
type __midl_frag338_t (line 5044) | typedef
type __midl_frag321_t (line 5049) | typedef
type __midl_frag316_t (line 5068) | typedef
type __midl_frag315_t (line 5078) | typedef
type __midl_frag314_t (line 5087) | typedef
type __midl_frag313_t (line 5092) | typedef
type __midl_frag309_t (line 5097) | typedef
type __midl_frag308_t (line 5106) | typedef
type __midl_frag305_t (line 5111) | typedef
type __midl_frag304_t (line 5120) | typedef
type __midl_frag303_t (line 5129) | typedef
type __midl_frag300_t (line 5134) | typedef
type __midl_frag294_t (line 5151) | typedef
type __midl_frag293_t (line 5160) | typedef
type __midl_frag292_t (line 5165) | typedef
type __midl_frag288_t (line 5170) | typedef
type __midl_frag287_t (line 5180) | typedef
type __midl_frag286_t (line 5189) | typedef
type __midl_frag285_t (line 5194) | typedef
type __midl_frag281_t (line 5199) | typedef
type __midl_frag280_t (line 5208) | typedef
type __midl_frag277_t (line 5213) | typedef
type __midl_frag273_t (line 5230) | typedef
type __midl_frag270_t (line 5235) | typedef
type __midl_frag262_t (line 5247) | typedef
type __midl_frag251_t (line 5260) | typedef
type __midl_frag241_t (line 5275) | typedef
type __midl_frag230_t (line 5289) | typedef
type __midl_frag215_t (line 5303) | typedef
type NDR64_PIPE_FORMAT (line 5308) | typedef
type __midl_frag212_t (line 5313) | typedef
type __midl_frag211_t (line 5318) | typedef
type __midl_frag210_t (line 5323) | typedef
type __midl_frag208_t (line 5338) | typedef
type __midl_frag207_t (line 5346) | typedef
type __midl_frag206_t (line 5351) | typedef
type __midl_frag204_t (line 5360) | typedef
type __midl_frag203_t (line 5376) | typedef
type __midl_frag202_t (line 5385) | typedef
type __midl_frag201_t (line 5404) | typedef
type __midl_frag200_t (line 5419) | typedef
type __midl_frag199_t (line 5424) | typedef
type __midl_frag198_t (line 5429) | typedef
type __midl_frag195_t (line 5434) | typedef
type __midl_frag188_t (line 5446) | typedef
type __midl_frag186_t (line 5459) | typedef
type __midl_frag184_t (line 5469) | typedef
type __midl_frag183_t (line 5479) | typedef
type __midl_frag182_t (line 5496) | typedef
type __midl_frag181_t (line 5501) | typedef
type __midl_frag180_t (line 5506) | typedef
type __midl_frag177_t (line 5511) | typedef
type __midl_frag174_t (line 5525) | typedef
type __midl_frag171_t (line 5530) | typedef
type __midl_frag169_t (line 5542) | typedef
type __midl_frag167_t (line 5550) | typedef
type __midl_frag166_t (line 5559) | typedef
type __midl_frag165_t (line 5568) | typedef
type __midl_frag164_t (line 5583) | typedef
type __midl_frag163_t (line 5588) | typedef
type __midl_frag162_t (line 5593) | typedef
type __midl_frag153_t (line 5604) | typedef
type __midl_frag151_t (line 5619) | typedef
type __midl_frag146_t (line 5624) | typedef
type __midl_frag144_t (line 5638) | typedef
type __midl_frag143_t (line 5643) | typedef
type __midl_frag142_t (line 5648) | typedef
type __midl_frag140_t (line 5656) | typedef
type __midl_frag139_t (line 5667) | typedef
type __midl_frag138_t (line 5676) | typedef
type __midl_frag137_t (line 5691) | typedef
type __midl_frag130_t (line 5696) | typedef
type __midl_frag120_t (line 5708) | typedef
type __midl_frag113_t (line 5724) | typedef
type __midl_frag110_t (line 5737) | typedef
type __midl_frag108_t (line 5745) | typedef
type __midl_frag107_t (line 5755) | typedef
type __midl_frag106_t (line 5764) | typedef
type __midl_frag94_t (line 5779) | typedef
type __midl_frag92_t (line 5788) | typedef
type __midl_frag91_t (line 5797) | typedef
type __midl_frag90_t (line 5806) | typedef
type __midl_frag88_t (line 5821) | typedef
type __midl_frag87_t (line 5830) | typedef
type __midl_frag86_t (line 5839) | typedef
type __midl_frag85_t (line 5847) | typedef
type __midl_frag84_t (line 5863) | typedef
type __midl_frag83_t (line 5868) | typedef
type __midl_frag81_t (line 5881) | typedef
type __midl_frag80_t (line 5889) | typedef
type __midl_frag79_t (line 5894) | typedef
type __midl_frag77_t (line 5903) | typedef
type __midl_frag76_t (line 5913) | typedef
type __midl_frag75_t (line 5922) | typedef
type __midl_frag74_t (line 5937) | typedef
type __midl_frag73_t (line 5953) | typedef
type __midl_frag72_t (line 5963) | typedef
type __midl_frag71_t (line 5982) | typedef
type __midl_frag67_t (line 5997) | typedef
type __midl_frag65_t (line 6009) | typedef
type __midl_frag62_t (line 6014) | typedef
type __midl_frag60_t (line 6026) | typedef
type __midl_frag59_t (line 6031) | typedef
type __midl_frag56_t (line 6036) | typedef
type __midl_frag54_t (line 6048) | typedef
type __midl_frag53_t (line 6056) | typedef
type __midl_frag52_t (line 6061) | typedef
type __midl_frag50_t (line 6071) | typedef
type __midl_frag48_t (line 6079) | typedef
type __midl_frag47_t (line 6089) | typedef
type __midl_frag46_t (line 6098) | typedef
type __midl_frag44_t (line 6113) | typedef
type __midl_frag43_t (line 6122) | typedef
type __midl_frag42_t (line 6131) | typedef
type __midl_frag41_t (line 6139) | typedef
type __midl_frag40_t (line 6156) | typedef
type __midl_frag39_t (line 6166) | typedef
type __midl_frag38_t (line 6185) | typedef
type __midl_frag28_t (line 6200) | typedef
type __midl_frag24_t (line 6212) | typedef
type __midl_frag23_t (line 6223) | typedef
type __midl_frag22_t (line 6228) | typedef
type __midl_frag21_t (line 6233) | typedef
type __midl_frag16_t (line 6243) | typedef
type __midl_frag15_t (line 6248) | typedef
type __midl_frag11_t (line 6260) | typedef
type __midl_frag9_t (line 6265) | typedef
type __midl_frag4_t (line 6277) | typedef
type __midl_frag3_t (line 6282) | typedef
type __midl_frag2_t (line 6287) | typedef
type NDR64_FORMAT_UINT32 (line 6300) | typedef
FILE: rpc_interfaces/ms-even_c.c
type ms2Deven_MIDL_TYPE_FORMAT_STRING (line 40) | typedef struct _ms2Deven_MIDL_TYPE_FORMAT_STRING
type ms2Deven_MIDL_PROC_FORMAT_STRING (line 46) | typedef struct _ms2Deven_MIDL_PROC_FORMAT_STRING
type ms2Deven_MIDL_EXPR_FORMAT_STRING (line 52) | typedef struct _ms2Deven_MIDL_EXPR_FORMAT_STRING
function NTSTATUS (line 159) | NTSTATUS ElfrClearELFW(
function NTSTATUS (line 177) | NTSTATUS ElfrBackupELFW(
function NTSTATUS (line 195) | NTSTATUS ElfrCloseEL(
function NTSTATUS (line 211) | NTSTATUS ElfrDeregisterEventSource(
function NTSTATUS (line 227) | NTSTATUS ElfrNumberOfRecords(
function NTSTATUS (line 245) | NTSTATUS ElfrOldestRecord(
function NTSTATUS (line 263) | NTSTATUS ElfrChangeNotify(
function NTSTATUS (line 283) | NTSTATUS ElfrOpenELW(
function NTSTATUS (line 309) | NTSTATUS ElfrRegisterEventSourceW(
function NTSTATUS (line 335) | NTSTATUS ElfrOpenBELW(
function NTSTATUS (line 359) | NTSTATUS ElfrReadELW(
function NTSTATUS (line 387) | NTSTATUS ElfrReportEventW(
function NTSTATUS (line 429) | NTSTATUS ElfrClearELFA(
function NTSTATUS (line 447) | NTSTATUS ElfrBackupELFA(
function NTSTATUS (line 465) | NTSTATUS ElfrOpenELA(
function NTSTATUS (line 491) | NTSTATUS ElfrRegisterEventSourceA(
function NTSTATUS (line 517) | NTSTATUS ElfrOpenBELA(
function NTSTATUS (line 541) | NTSTATUS ElfrReadELA(
function NTSTATUS (line 569) | NTSTATUS ElfrReportEventA(
function Opnum19NotUsedOnWire (line 611) | void Opnum19NotUsedOnWire(
function Opnum20NotUsedOnWire (line 624) | void Opnum20NotUsedOnWire(
function Opnum21NotUsedOnWire (line 637) | void Opnum21NotUsedOnWire(
function NTSTATUS (line 650) | NTSTATUS ElfrGetLogInformation(
function Opnum23NotUsedOnWire (line 674) | void Opnum23NotUsedOnWire(
function NTSTATUS (line 687) | NTSTATUS ElfrReportEventAndSourceW(
function NTSTATUS (line 731) | NTSTATUS ElfrReportEventExW(
function NTSTATUS (line 771) | NTSTATUS ElfrReportEventExA(
type NDR64_FORMAT_CHAR (line 3001) | typedef
type __midl_frag272_t (line 3006) | typedef
type NDR64_FORMAT_CHAR (line 3011) | typedef
type NDR64_FORMAT_CHAR (line 3016) | typedef
type __midl_frag269_t (line 3021) | typedef
type __midl_frag268_t (line 3031) | typedef
type __midl_frag267_t (line 3040) | typedef
type __midl_frag266_t (line 3045) | typedef
type __midl_frag265_t (line 3050) | typedef
type __midl_frag264_t (line 3060) | typedef
type __midl_frag263_t (line 3079) | typedef
type __midl_frag262_t (line 3084) | typedef
type __midl_frag261_t (line 3089) | typedef
type __midl_frag260_t (line 3094) | typedef
type __midl_frag259_t (line 3099) | typedef
type NDR64_FORMAT_CHAR (line 3104) | typedef
type NDR64_FORMAT_CHAR (line 3109) | typedef
type __midl_frag255_t (line 3114) | typedef
type __midl_frag254_t (line 3119) | typedef
type __midl_frag253_t (line 3124) | typedef
type __midl_frag244_t (line 3147) | typedef
type __midl_frag242_t (line 3152) | typedef
type __midl_frag241_t (line 3171) | typedef
type __midl_frag239_t (line 3176) | typedef
type __midl_frag233_t (line 3181) | typedef
type __midl_frag230_t (line 3189) | typedef
type __midl_frag227_t (line 3212) | typedef
type NDR64_FORMAT_CHAR (line 3217) | typedef
type __midl_frag222_t (line 3222) | typedef
type __midl_frag221_t (line 3232) | typedef
type __midl_frag220_t (line 3241) | typedef
type __midl_frag219_t (line 3246) | typedef
type __midl_frag218_t (line 3251) | typedef
type __midl_frag217_t (line 3261) | typedef
type __midl_frag216_t (line 3280) | typedef
type __midl_frag215_t (line 3285) | typedef
type __midl_frag214_t (line 3290) | typedef
type __midl_frag213_t (line 3295) | typedef
type __midl_frag212_t (line 3300) | typedef
type NDR64_FORMAT_CHAR (line 3305) | typedef
type NDR64_FORMAT_CHAR (line 3310) | typedef
type __midl_frag205_t (line 3315) | typedef
type __midl_frag204_t (line 3340) | typedef
type __midl_frag201_t (line 3349) | typedef
type __midl_frag200_t (line 3354) | typedef
type __midl_frag198_t (line 3359) | typedef
type __midl_frag197_t (line 3369) | typedef
type __midl_frag196_t (line 3378) | typedef
type __midl_frag193_t (line 3383) | typedef
type __midl_frag182_t (line 3398) | typedef
type __midl_frag181_t (line 3408) | typedef
type __midl_frag180_t (line 3417) | typedef
type __midl_frag179_t (line 3422) | typedef
type __midl_frag178_t (line 3427) | typedef
type __midl_frag177_t (line 3437) | typedef
type __midl_frag176_t (line 3456) | typedef
type __midl_frag174_t (line 3461) | typedef
type __midl_frag166_t (line 3466) | typedef
type __midl_frag159_t (line 3490) | typedef
type __midl_frag158_t (line 3500) | typedef
type __midl_frag157_t (line 3509) | typedef
type __midl_frag156_t (line 3514) | typedef
type __midl_frag152_t (line 3519) | typedef
type __midl_frag150_t (line 3536) | typedef
type __midl_frag149_t (line 3541) | typedef
type __midl_frag144_t (line 3546) | typedef
type __midl_frag143_t (line 3551) | typedef
type __midl_frag137_t (line 3566) | typedef
type __midl_frag134_t (line 3571) | typedef
type __midl_frag133_t (line 3576) | typedef
type NDR64_FORMAT_CHAR (line 3592) | typedef
type __midl_frag131_t (line 3597) | typedef
type __midl_frag130_t (line 3602) | typedef
type NDR64_FORMAT_CHAR (line 3607) | typedef
type __midl_frag124_t (line 3612) | typedef
type __midl_frag123_t (line 3617) | typedef
type NDR64_FORMAT_CHAR (line 3633) | typedef
type __midl_frag121_t (line 3638) | typedef
type __midl_frag120_t (line 3643) | typedef
type __midl_frag119_t (line 3648) | typedef
type __midl_frag117_t (line 3660) | typedef
type NDR64_FORMAT_CHAR (line 3668) | typedef
type __midl_frag115_t (line 3673) | typedef
type __midl_frag114_t (line 3682) | typedef
type __midl_frag113_t (line 3691) | typedef
type __midl_frag112_t (line 3707) | typedef
type __midl_frag110_t (line 3712) | typedef
type __midl_frag107_t (line 3724) | typedef
type NDR64_FORMAT_CHAR (line 3729) | typedef
type __midl_frag101_t (line 3734) | typedef
type __midl_frag100_t (line 3743) | typedef
type __midl_frag99_t (line 3748) | typedef
type __midl_frag97_t (line 3753) | typedef
type __midl_frag96_t (line 3772) | typedef
type __midl_frag94_t (line 3777) | typedef
type __midl_frag93_t (line 3786) | typedef
type __midl_frag92_t (line 3795) | typedef
type __midl_frag91_t (line 3803) | typedef
type __midl_frag90_t (line 3808) | typedef
type __midl_frag89_t (line 3813) | typedef
type __midl_frag88_t (line 3818) | typedef
type NDR64_FORMAT_CHAR (line 3823) | typedef
type __midl_frag83_t (line 3828) | typedef
type __midl_frag82_t (line 3833) | typedef
type __midl_frag79_t (line 3857) | typedef
type __midl_frag75_t (line 3862) | typedef
type __midl_frag74_t (line 3872) | typedef
type __midl_frag73_t (line 3881) | typedef
type __midl_frag68_t (line 3886) | typedef
type NDR64_FORMAT_CHAR (line 3903) | typedef
type __midl_frag60_t (line 3908) | typedef
type __midl_frag59_t (line 3913) | typedef
type __midl_frag49_t (line 3928) | typedef
type NDR64_FORMAT_CHAR (line 3944) | typedef
type __midl_frag40_t (line 3949) | typedef
type __midl_frag39_t (line 3954) | typedef
type __midl_frag36_t (line 3970) | typedef
type __midl_frag34_t (line 3978) | typedef
type __midl_frag31_t (line 3991) | typedef
type __midl_frag29_t (line 3996) | typedef
type __midl_frag22_t (line 4008) | typedef
type __midl_frag21_t (line 4013) | typedef
type __midl_frag20_t (line 4018) | typedef
type __midl_frag16_t (line 4029) | typedef
type __midl_frag12_t (line 4040) | typedef
type __midl_frag10_t (line 4052) | typedef
type __midl_frag9_t (line 4060) | typedef
type __midl_frag8_t (line 4070) | typedef
type __midl_frag7_t (line 4081) | typedef
type __midl_frag6_t (line 4092) | typedef
type __midl_frag5_t (line 4100) | typedef
type __midl_frag2_t (line 4116) | typedef
type NDR64_FORMAT_UINT32 (line 4128) | typedef
FILE: rpc_interfaces/ms-even_s.c
type ms2Deven_MIDL_TYPE_FORMAT_STRING (line 39) | typedef struct _ms2Deven_MIDL_TYPE_FORMAT_STRING
type ms2Deven_MIDL_PROC_FORMAT_STRING (line 45) | typedef struct _ms2Deven_MIDL_PROC_FORMAT_STRING
type ms2Deven_MIDL_EXPR_FORMAT_STRING (line 51) | typedef struct _ms2Deven_MIDL_EXPR_FORMAT_STRING
type NDR64_FORMAT_CHAR (line 2370) | typedef
type __midl_frag272_t (line 2375) | typedef
type NDR64_FORMAT_CHAR (line 2380) | typedef
type NDR64_FORMAT_CHAR (line 2385) | typedef
type __midl_frag269_t (line 2390) | typedef
type __midl_frag268_t (line 2400) | typedef
type __midl_frag267_t (line 2409) | typedef
type __midl_frag266_t (line 2414) | typedef
type __midl_frag265_t (line 2419) | typedef
type __midl_frag264_t (line 2429) | typedef
type __midl_frag263_t (line 2448) | typedef
type __midl_frag262_t (line 2453) | typedef
type __midl_frag261_t (line 2458) | typedef
type __midl_frag260_t (line 2463) | typedef
type __midl_frag259_t (line 2468) | typedef
type NDR64_FORMAT_CHAR (line 2473) | typedef
type NDR64_FORMAT_CHAR (line 2478) | typedef
type __midl_frag255_t (line 2483) | typedef
type __midl_frag254_t (line 2488) | typedef
type __midl_frag253_t (line 2493) | typedef
type __midl_frag244_t (line 2516) | typedef
type __midl_frag242_t (line 2521) | typedef
type __midl_frag241_t (line 2540) | typedef
type __midl_frag239_t (line 2545) | typedef
type __midl_frag233_t (line 2550) | typedef
type __midl_frag230_t (line 2558) | typedef
type __midl_frag227_t (line 2581) | typedef
type NDR64_FORMAT_CHAR (line 2586) | typedef
type __midl_frag222_t (line 2591) | typedef
type __midl_frag221_t (line 2601) | typedef
type __midl_frag220_t (line 2610) | typedef
type __midl_frag219_t (line 2615) | typedef
type __midl_frag218_t (line 2620) | typedef
type __midl_frag217_t (line 2630) | typedef
type __midl_frag216_t (line 2649) | typedef
type __midl_frag215_t (line 2654) | typedef
type __midl_frag214_t (line 2659) | typedef
type __midl_frag213_t (line 2664) | typedef
type __midl_frag212_t (line 2669) | typedef
type NDR64_FORMAT_CHAR (line 2674) | typedef
type NDR64_FORMAT_CHAR (line 2679) | typedef
type __midl_frag205_t (line 2684) | typedef
type __midl_frag204_t (line 2709) | typedef
type __midl_frag201_t (line 2718) | typedef
type __midl_frag200_t (line 2723) | typedef
type __midl_frag198_t (line 2728) | typedef
type __midl_frag197_t (line 2738) | typedef
type __midl_frag196_t (line 2747) | typedef
type __midl_frag193_t (line 2752) | typedef
type __midl_frag182_t (line 2767) | typedef
type __midl_frag181_t (line 2777) | typedef
type __midl_frag180_t (line 2786) | typedef
type __midl_frag179_t (line 2791) | typedef
type __midl_frag178_t (line 2796) | typedef
type __midl_frag177_t (line 2806) | typedef
type __midl_frag176_t (line 2825) | typedef
type __midl_frag174_t (line 2830) | typedef
type __midl_frag166_t (line 2835) | typedef
type __midl_frag159_t (line 2859) | typedef
type __midl_frag158_t (line 2869) | typedef
type __midl_frag157_t (line 2878) | typedef
type __midl_frag156_t (line 2883) | typedef
type __midl_frag152_t (line 2888) | typedef
type __midl_frag150_t (line 2905) | typedef
type __midl_frag149_t (line 2910) | typedef
type __midl_frag144_t (line 2915) | typedef
type __midl_frag143_t (line 2920) | typedef
type __midl_frag137_t (line 2935) | typedef
type __midl_frag134_t (line 2940) | typedef
type __midl_frag133_t (line 2945) | typedef
type NDR64_FORMAT_CHAR (line 2961) | typedef
type __midl_frag131_t (line 2966) | typedef
type __midl_frag130_t (line 2971) | typedef
type NDR64_FORMAT_CHAR (line 2976) | typedef
type __midl_frag124_t (line 2981) | typedef
type __midl_frag123_t (line 2986) | typedef
type NDR64_FORMAT_CHAR (line 3002) | typedef
type __midl_frag121_t (line 3007) | typedef
type __midl_frag120_t (line 3012) | typedef
type __midl_frag119_t (line 3017) | typedef
type __midl_frag117_t (line 3029) | typedef
type NDR64_FORMAT_CHAR (line 3037) | typedef
type __midl_frag115_t (line 3042) | typedef
type __midl_frag114_t (line 3051) | typedef
type __midl_frag113_t (line 3060) | typedef
type __midl_frag112_t (line 3076) | typedef
type __midl_frag110_t (line 3081) | typedef
type __midl_frag107_t (line 3093) | typedef
type NDR64_FORMAT_CHAR (line 3098) | typedef
type __midl_frag101_t (line 3103) | typedef
type __midl_frag100_t (line 3112) | typedef
type __midl_frag99_t (line 3117) | typedef
type __midl_frag97_t (line 3122) | typedef
type __midl_frag96_t (line 3141) | typedef
type __midl_frag94_t (line 3146) | typedef
type __midl_frag93_t (line 3155) | typedef
type __midl_frag92_t (line 3164) | typedef
type __midl_frag91_t (line 3172) | typedef
type __midl_frag90_t (line 3177) | typedef
type __midl_frag89_t (line 3182) | typedef
type __midl_frag88_t (line 3187) | typedef
type NDR64_FORMAT_CHAR (line 3192) | typedef
type __midl_frag83_t (line 3197) | typedef
type __midl_frag82_t (line 3202) | typedef
type __midl_frag79_t (line 3226) | typedef
type __midl_frag75_t (line 3231) | typedef
type __midl_frag74_t (line 3241) | typedef
type __midl_frag73_t (line 3250) | typedef
type __midl_frag68_t (line 3255) | typedef
type NDR64_FORMAT_CHAR (line 3272) | typedef
type __midl_frag60_t (line 3277) | typedef
type __midl_frag59_t (line 3282) | typedef
type __midl_frag49_t (line 3297) | typedef
type NDR64_FORMAT_CHAR (line 3313) | typedef
type __midl_frag40_t (line 3318) | typedef
type __midl_frag39_t (line 3323) | typedef
type __midl_frag36_t (line 3339) | typedef
type __midl_frag34_t (line 3347) | typedef
type __midl_frag31_t (line 3360) | typedef
type __midl_frag29_t (line 3365) | typedef
type __midl_frag22_t (line 3377) | typedef
type __midl_frag21_t (line 3382) | typedef
type __midl_frag20_t (line 3387) | typedef
type __midl_frag16_t (line 3398) | typedef
type __midl_frag12_t (line 3409) | typedef
type __midl_frag10_t (line 3421) | typedef
type __midl_frag9_t (line 3429) | typedef
type __midl_frag8_t (line 3439) | typedef
type __midl_frag7_t (line 3450) | typedef
type __midl_frag6_t (line 3461) | typedef
type __midl_frag5_t (line 3469) | typedef
type __midl_frag2_t (line 3485) | typedef
type NDR64_FORMAT_UINT32 (line 3497) | typedef
FILE: rpc_interfaces/ms-par_c.c
type ms2Dpar_MIDL_TYPE_FORMAT_STRING (line 40) | typedef struct _ms2Dpar_MIDL_TYPE_FORMAT_STRING
type ms2Dpar_MIDL_PROC_FORMAT_STRING (line 46) | typedef struct _ms2Dpar_MIDL_PROC_FORMAT_STRING
type ms2Dpar_MIDL_EXPR_FORMAT_STRING (line 52) | typedef struct _ms2Dpar_MIDL_EXPR_FORMAT_STRING
function DWORD (line 159) | DWORD RpcAsyncOpenPrinter(
function DWORD (line 187) | DWORD RpcAsyncAddPrinter(
function DWORD (line 215) | DWORD RpcAsyncSetJob(
function DWORD (line 237) | DWORD RpcAsyncGetJob(
function DWORD (line 263) | DWORD RpcAsyncEnumJobs(
function DWORD (line 293) | DWORD RpcAsyncAddJob(
function DWORD (line 317) | DWORD RpcAsyncScheduleJob(
function DWORD (line 335) | DWORD RpcAsyncDeletePrinter(
function DWORD (line 351) | DWORD RpcAsyncSetPrinter(
function DWORD (line 375) | DWORD RpcAsyncGetPrinter(
function DWORD (line 399) | DWORD RpcAsyncStartDocPrinter(
function DWORD (line 419) | DWORD RpcAsyncStartPagePrinter(
function DWORD (line 435) | DWORD RpcAsyncWritePrinter(
function DWORD (line 457) | DWORD RpcAsyncEndPagePrinter(
function DWORD (line 473) | DWORD RpcAsyncEndDocPrinter(
function DWORD (line 489) | DWORD RpcAsyncAbortPrinter(
function DWORD (line 505) | DWORD RpcAsyncGetPrinterData(
function DWORD (line 531) | DWORD RpcAsyncGetPrinterDataEx(
function DWORD (line 559) | DWORD RpcAsyncSetPrinterData(
function DWORD (line 583) | DWORD RpcAsyncSetPrinterDataEx(
function DWORD (line 609) | DWORD RpcAsyncClosePrinter(
function DWORD (line 625) | DWORD RpcAsyncAddForm(
function DWORD (line 643) | DWORD RpcAsyncDeleteForm(
function DWORD (line 661) | DWORD RpcAsyncGetForm(
function DWORD (line 687) | DWORD RpcAsyncSetForm(
function DWORD (line 707) | DWORD RpcAsyncEnumForms(
function DWORD (line 733) | DWORD RpcAsyncGetPrinterDriver(
function DWORD (line 767) | DWORD RpcAsyncEnumPrinterData(
function DWORD (line 799) | DWORD RpcAsyncEnumPrinterDataEx(
function DWORD (line 825) | DWORD RpcAsyncEnumPrinterKey(
function DWORD (line 849) | DWORD RpcAsyncDeletePrinterData(
function DWORD (line 867) | DWORD RpcAsyncDeletePrinterDataEx(
function DWORD (line 887) | DWORD RpcAsyncDeletePrinterKey(
function DWORD (line 905) | DWORD RpcAsyncXcvData(
function DWORD (line 935) | DWORD RpcAsyncSendRecvBidiData(
function DWORD (line 957) | DWORD RpcAsyncCreatePrinterIC(
function DWORD (line 977) | DWORD RpcAsyncPlayGdiScriptOnPrinterIC(
function DWORD (line 1003) | DWORD RpcAsyncDeletePrinterIC(
function DWORD (line 1019) | DWORD RpcAsyncEnumPrinters(
function DWORD (line 1049) | DWORD RpcAsyncAddPrinterDriver(
function DWORD (line 1071) | DWORD RpcAsyncEnumPrinterDrivers(
function DWORD (line 1101) | DWORD RpcAsyncGetPrinterDriverDirectory(
function DWORD (line 1129) | DWORD RpcAsyncDeletePrinterDriver(
function DWORD (line 1151) | DWORD RpcAsyncDeletePrinterDriverEx(
function DWORD (line 1177) | DWORD RpcAsyncAddPrintProcessor(
function DWORD (line 1201) | DWORD RpcAsyncEnumPrintProcessors(
function DWORD (line 1231) | DWORD RpcAsyncGetPrintProcessorDirectory(
function DWORD (line 1259) | DWORD RpcAsyncEnumPorts(
function DWORD (line 1287) | DWORD RpcAsyncEnumMonitors(
function DWORD (line 1315) | DWORD RpcAsyncAddPort(
function DWORD (line 1339) | DWORD RpcAsyncSetPort(
function DWORD (line 1361) | DWORD RpcAsyncAddMonitor(
function DWORD (line 1381) | DWORD RpcAsyncDeleteMonitor(
function DWORD (line 1403) | DWORD RpcAsyncDeletePrintProcessor(
function DWORD (line 1425) | DWORD RpcAsyncEnumPrintProcessorDatatypes(
function DWORD (line 1455) | DWORD RpcAsyncAddPerMachineConnection(
function DWORD (line 1479) | DWORD RpcAsyncDeletePerMachineConnection(
function DWORD (line 1499) | DWORD RpcAsyncEnumPerMachineConnections(
function HRESULT (line 1525) | HRESULT RpcSyncRegisterForRemoteNotifications(
function HRESULT (line 1545) | HRESULT RpcSyncUnRegisterForRemoteNotifications(
function HRESULT (line 1561) | HRESULT RpcSyncRefreshRemoteNotifications(
function HRESULT (line 1581) | HRESULT RpcAsyncGetRemoteNotifications(
function HRESULT (line 1599) | HRESULT RpcAsyncInstallPrinterDriverFromPackage(
function HRESULT (line 1625) | HRESULT RpcAsyncUploadPrinterDriverPackage(
function HRESULT (line 1653) | HRESULT RpcAsyncGetCorePrinterDrivers(
function HRESULT (line 1681) | HRESULT RpcAsyncCorePrinterDriverInstalled(
function HRESULT (line 1709) | HRESULT RpcAsyncGetPrinterDriverPackagePath(
function HRESULT (line 1739) | HRESULT RpcAsyncDeletePrinterDriverPackage(
function DWORD (line 1761) | DWORD RpcAsyncReadPrinter(
function DWORD (line 1783) | DWORD RpcAsyncResetPrinter(
function DWORD (line 1803) | DWORD RpcAsyncGetJobNamedPropertyValue(
function DWORD (line 1825) | DWORD RpcAsyncSetJobNamedProperty(
function DWORD (line 1845) | DWORD RpcAsyncDeleteJobNamedProperty(
function DWORD (line 1865) | DWORD RpcAsyncEnumJobNamedProperties(
function DWORD (line 1887) | DWORD RpcAsyncLogJobInfoForBranchOffice(
type NDR64_FORMAT_CHAR (line 9324) | typedef
type __midl_frag1102_t (line 9329) | typedef
type __midl_frag1101_t (line 9334) | typedef
type __midl_frag1097_t (line 9349) | typedef
type __midl_frag1096_t (line 9370) | typedef
type __midl_frag1088_t (line 9384) | typedef
type __midl_frag1087_t (line 9409) | typedef
type __midl_frag1086_t (line 9417) | typedef
type __midl_frag1080_t (line 9429) | typedef
type __midl_frag1079_t (line 9452) | typedef
type __midl_frag1078_t (line 9461) | typedef
type __midl_frag1077_t (line 9476) | typedef
type __midl_frag1076_t (line 9491) | typedef
type __midl_frag1075_t (line 9500) | typedef
type __midl_frag1074_t (line 9508) | typedef
type __midl_frag1073_t (line 9522) | typedef
type __midl_frag1072_t (line 9527) | typedef
type __midl_frag1071_t (line 9532) | typedef
type __midl_frag1069_t (line 9544) | typedef
type __midl_frag1068_t (line 9554) | typedef
type __midl_frag1067_t (line 9562) | typedef
type __midl_frag1066_t (line 9567) | typedef
type NDR64_FORMAT_CHAR (line 9572) | typedef
type __midl_frag1064_t (line 9577) | typedef
type __midl_frag1061_t (line 9582) | typedef
type __midl_frag1058_t (line 9596) | typedef
type __midl_frag1055_t (line 9601) | typedef
type __midl_frag1053_t (line 9614) | typedef
type __midl_frag1052_t (line 9623) | typedef
type __midl_frag1050_t (line 9638) | typedef
type __midl_frag1049_t (line 9653) | typedef
type __midl_frag1048_t (line 9669) | typedef
type __midl_frag1045_t (line 9674) | typedef
type __midl_frag1043_t (line 9687) | typedef
type NDR64_FORMAT_CHAR (line 9695) | typedef
type __midl_frag1040_t (line 9700) | typedef
type __midl_frag1039_t (line 9709) | typedef
type NDR64_FORMAT_CHAR (line 9724) | typedef
type __midl_frag1034_t (line 9729) | typedef
type __midl_frag1032_t (line 9734) | typedef
type __midl_frag1031_t (line 9749) | typedef
type __midl_frag1030_t (line 9765) | typedef
type __midl_frag1025_t (line 9770) | typedef
type __midl_frag1023_t (line 9784) | typedef
type __midl_frag1022_t (line 9789) | typedef
type __midl_frag1021_t (line 9794) | typedef
type __midl_frag1020_t (line 9799) | typedef
type __midl_frag1019_t (line 9804) | typedef
type NDR64_FORMAT_CHAR (line 9817) | typedef
type __midl_frag1016_t (line 9822) | typedef
type NDR64_FORMAT_CHAR (line 9827) | typedef
type __midl_frag1013_t (line 9832) | typedef
type __midl_frag1012_t (line 9841) | typedef
type __midl_frag1011_t (line 9850) | typedef
type __midl_frag1009_t (line 9855) | typedef
type __midl_frag1006_t (line 9869) | typedef
type __midl_frag1001_t (line 9874) | typedef
type NDR64_FORMAT_CHAR (line 9887) | typedef
type __midl_frag995_t (line 9892) | typedef
type __midl_frag994_t (line 9901) | typedef
type __midl_frag993_t (line 9910) | typedef
type __midl_frag984_t (line 9915) | typedef
type NDR64_FORMAT_CHAR (line 9932) | typedef
type __midl_frag979_t (line 9937) | typedef
type __midl_frag978_t (line 9945) | typedef
type __midl_frag977_t (line 9953) | typedef
type __midl_frag972_t (line 9958) | typedef
type __midl_frag970_t (line 9974) | typedef
type __midl_frag969_t (line 9982) | typedef
type __midl_frag968_t (line 9991) | typedef
type __midl_frag967_t (line 10000) | typedef
type NDR64_FORMAT_CHAR (line 10005) | typedef
type __midl_frag964_t (line 10010) | typedef
type __midl_frag963_t (line 10019) | typedef
type __midl_frag962_t (line 10028) | typedef
type __midl_frag957_t (line 10033) | typedef
type __midl_frag956_t (line 10038) | typedef
type __midl_frag953_t (line 10054) | typedef
type NDR64_FORMAT_CHAR (line 10059) | typedef
type __midl_frag951_t (line 10064) | typedef
type __midl_frag950_t (line 10074) | typedef
type __midl_frag949_t (line 10083) | typedef
type NDR64_FORMAT_CHAR (line 10088) | typedef
type __midl_frag947_t (line 10093) | typedef
type __midl_frag946_t (line 10098) | typedef
type __midl_frag942_t (line 10103) | typedef
type __midl_frag941_t (line 10108) | typedef
type __midl_frag930_t (line 10124) | typedef
type __midl_frag928_t (line 10139) | typedef
type __midl_frag927_t (line 10144) | typedef
type __midl_frag926_t (line 10149) | typedef
type __midl_frag925_t (line 10154) | typedef
type __midl_frag921_t (line 10166) | typedef
type __midl_frag919_t (line 10171) | typedef
type __midl_frag917_t (line 10184) | typedef
type __midl_frag916_t (line 10189) | typedef
type __midl_frag915_t (line 10194) | typedef
type __midl_frag913_t (line 10205) | typedef
type __midl_frag912_t (line 10210) | typedef
type __midl_frag911_t (line 10215) | typedef
type __midl_frag910_t (line 10223) | typedef
type __midl_frag909_t (line 10231) | typedef
type __midl_frag908_t (line 10240) | typedef
type __midl_frag907_t (line 10249) | typedef
type NDR64_FORMAT_CHAR (line 10264) | typedef
type __midl_frag903_t (line 10269) | typedef
type __midl_frag902_t (line 10278) | typedef
type __midl_frag901_t (line 10297) | typedef
type __midl_frag900_t (line 10314) | typedef
type __midl_frag899_t (line 10329) | typedef
type __midl_frag898_t (line 10337) | typedef
type NDR64_FORMAT_CHAR (line 10345) | typedef
type __midl_frag896_t (line 10350) | typedef
type __midl_frag895_t (line 10361) | typedef
type __midl_frag894_t (line 10370) | typedef
type __midl_frag893_t (line 10385) | typedef
type __midl_frag892_t (line 10396) | typedef
type __midl_frag891_t (line 10411) | typedef
type __midl_frag889_t (line 10427) | typedef
type __midl_frag888_t (line 10435) | typedef
type __midl_frag887_t (line 10451) | typedef
type __midl_frag886_t (line 10466) | typedef
type __midl_frag885_t (line 10474
Condensed preview — 30 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (6,843K chars).
[
{
"path": ".gitattributes",
"chars": 2518,
"preview": "###############################################################################\n# Set default behavior to automatically "
},
{
"path": ".gitignore",
"chars": 6205,
"preview": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n##\n## G"
},
{
"path": ".gitmodules",
"chars": 107,
"preview": "[submodule \"win32errorcodes\"]\n\tpath = win32errorcodes\n\turl = https://github.com/p0dalirius/win32errorcodes\n"
},
{
"path": "CLI11.hpp",
"chars": 370620,
"preview": "// CLI11: Version 2.3.2\n// Originally designed by Henry Schreiner\n// https://github.com/CLIUtils/CLI11\n//\n// This is a s"
},
{
"path": "CoerceFunctions.cpp",
"chars": 15957,
"preview": "#include <iostream>\n#include <Windows.h>\n#include <functional>\n#include <rpc.h> \n#include <strsafe.h>\n\n#include \"lib/ms-"
},
{
"path": "CoerceFunctions.h",
"chars": 1852,
"preview": "#pragma once\n#include <iostream>\n#include <Windows.h>\n#include <functional>\n#include <rpc.h> \n#include <strsafe.h>\n\n#inc"
},
{
"path": "CoercedPotato.cpp",
"chars": 24731,
"preview": "#pragma once\n\n#include <iostream>\n#include <Windows.h>\n#include <sddl.h>\n#include <userenv.h>\n#include <thread>\n#include"
},
{
"path": "CoercedPotato.sln",
"chars": 1413,
"preview": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 17\nVisualStudioVersion = 17.7.3400"
},
{
"path": "CoercedPotato.vcxproj",
"chars": 6980,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msb"
},
{
"path": "CoercedPotato.vcxproj.filters",
"chars": 1981,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuil"
},
{
"path": "IDL_FILES/ms-efsr.idl",
"chars": 13129,
"preview": "[\n\tuuid(df1941c5-fe89-4e79-bf10-463657acf44d),\n\t\tversion(1.0),\n]\ninterface efsrpc_through_pipe_efsrpc\n{\n\ttypedef pipe un"
},
{
"path": "IDL_FILES/ms-even.idl",
"chars": 11166,
"preview": "[\n uuid(82273FDC-E32A-18C3-3F78-827929DC23EA),\n version(0.0),\n#ifdef __midl\n ms_union,\n#endif // __midl"
},
{
"path": "IDL_FILES/ms-par.idl",
"chars": 44898,
"preview": "[\n\tuuid(76f03f96-cdfd-44fc-a22c-64950a001209),\n\t\tversion(1.0),\n]\ninterface IRemoteWinspool\n{\n#define TABLE_DWORD "
},
{
"path": "IDL_FILES/ms-rprn.idl",
"chars": 44083,
"preview": "[\n\tuuid(12345678-1234-abcd-ef00-0123456789ab),\n\t\tversion(1.0),\n]\ninterface winspool\n{\n\ttypedef int BOOL, * PBOOL, * LPBO"
},
{
"path": "IDL_FILES/ms-srvsvc.idl",
"chars": 50933,
"preview": "[\n uuid(4B324FC8-1670-01D3-1278-5A47BF6EE188),\n version(3.0),\n ms_union,\n pointer_default(unique"
},
{
"path": "README.md",
"chars": 3377,
"preview": "# Coerced potato\n\nFrom Patate (LOCAL/NETWORK SERVICE) to SYSTEM by abusing `SeImpersonatePrivilege` on Windows 10, Windo"
},
{
"path": "lib/ms-efsr_h.h",
"chars": 15931,
"preview": "/* this ALWAYS GENERATED file contains the definitions for the interfaces */\n\n\n /* File created by MIDL compiler version"
},
{
"path": "lib/ms-even_h.h",
"chars": 11075,
"preview": "\n\n/* this ALWAYS GENERATED file contains the definitions for the interfaces */\n\n\n /* File created by MIDL compiler versi"
},
{
"path": "lib/ms-par_h.h",
"chars": 25026,
"preview": "\n\n/* this ALWAYS GENERATED file contains the definitions for the interfaces */\n\n\n /* File created by MIDL compiler versi"
},
{
"path": "lib/ms-rprn_h.h",
"chars": 36109,
"preview": "\n\n/* this ALWAYS GENERATED file contains the definitions for the interfaces */\n\n\n /* File created by MIDL compiler versi"
},
{
"path": "lib/ms-srvsvc_h.h",
"chars": 54374,
"preview": "\n\n/* this ALWAYS GENERATED file contains the definitions for the interfaces */\n\n\n /* File created by MIDL compiler versi"
},
{
"path": "rpc_interfaces/ms-efsr_c.c",
"chars": 391722,
"preview": "/* this ALWAYS GENERATED file contains the RPC client stubs */\n\n\n /* File created by MIDL compiler version 8.01.0628 */\n"
},
{
"path": "rpc_interfaces/ms-even_c.c",
"chars": 260636,
"preview": "\n\n/* this ALWAYS GENERATED file contains the RPC client stubs */\n\n\n /* File created by MIDL compiler version 8.01.0628 *"
},
{
"path": "rpc_interfaces/ms-even_s.c",
"chars": 245541,
"preview": "\n\n/* this ALWAYS GENERATED file contains the RPC server stubs */\n\n\n /* File created by MIDL compiler version 8.01.0628 *"
},
{
"path": "rpc_interfaces/ms-par_c.c",
"chars": 942396,
"preview": "\n\n/* this ALWAYS GENERATED file contains the RPC client stubs */\n\n\n /* File created by MIDL compiler version 8.01.0628 *"
},
{
"path": "rpc_interfaces/ms-par_s.c",
"chars": 900774,
"preview": "\n\n/* this ALWAYS GENERATED file contains the RPC server stubs */\n\n\n /* File created by MIDL compiler version 8.01.0628 *"
},
{
"path": "rpc_interfaces/ms-rprn_c.c",
"chars": 871632,
"preview": "\n\n/* this ALWAYS GENERATED file contains the RPC client stubs */\n\n\n /* File created by MIDL compiler version 8.01.0628 *"
},
{
"path": "rpc_interfaces/ms-rprn_s.c",
"chars": 827161,
"preview": "\n\n/* this ALWAYS GENERATED file contains the RPC server stubs */\n\n\n /* File created by MIDL compiler version 8.01.0628 *"
},
{
"path": "rpc_interfaces/ms-srvsvc_c.c",
"chars": 660554,
"preview": "\n\n/* this ALWAYS GENERATED file contains the RPC client stubs */\n\n\n /* File created by MIDL compiler version 8.01.0628 *"
},
{
"path": "rpc_interfaces/ms-srvsvc_s.c",
"chars": 635829,
"preview": "\n\n/* this ALWAYS GENERATED file contains the RPC server stubs */\n\n\n /* File created by MIDL compiler version 8.01.0628 *"
}
]
About this extraction
This page contains the full source code of the Prepouce/CoercedPotato GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 30 files (6.2 MB), approximately 1.6M tokens, and a symbol index with 4168 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.