Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:54:44

0001 // Copyright (c) 2017-2023, University of Cincinnati, developed by Henry Schreiner
0002 // under NSF AWARD 1414736 and by the respective contributors.
0003 // All rights reserved.
0004 //
0005 // SPDX-License-Identifier: BSD-3-Clause
0006 
0007 #pragma once
0008 
0009 // [CLI11:public_includes:set]
0010 #include <string>
0011 #include <tuple>
0012 #include <utility>
0013 #include <vector>
0014 // [CLI11:public_includes:end]
0015 
0016 #include "Macros.hpp"
0017 
0018 namespace CLI {
0019 // [CLI11:split_hpp:verbatim]
0020 
0021 namespace detail {
0022 
0023 // Returns false if not a short option. Otherwise, sets opt name and rest and returns true
0024 CLI11_INLINE bool split_short(const std::string &current, std::string &name, std::string &rest);
0025 
0026 // Returns false if not a long option. Otherwise, sets opt name and other side of = and returns true
0027 CLI11_INLINE bool split_long(const std::string &current, std::string &name, std::string &value);
0028 
0029 // Returns false if not a windows style option. Otherwise, sets opt name and value and returns true
0030 CLI11_INLINE bool split_windows_style(const std::string &current, std::string &name, std::string &value);
0031 
0032 // Splits a string into multiple long and short names
0033 CLI11_INLINE std::vector<std::string> split_names(std::string current);
0034 
0035 /// extract default flag values either {def} or starting with a !
0036 CLI11_INLINE std::vector<std::pair<std::string, std::string>> get_default_flag_values(const std::string &str);
0037 
0038 /// Get a vector of short names, one of long names, and a single name
0039 CLI11_INLINE std::tuple<std::vector<std::string>, std::vector<std::string>, std::string>
0040 get_names(const std::vector<std::string> &input);
0041 
0042 }  // namespace detail
0043 // [CLI11:split_hpp:end]
0044 }  // namespace CLI
0045 
0046 #ifndef CLI11_COMPILE
0047 #include "impl/Split_inl.hpp"
0048 #endif