@@ -128,7 +128,7 @@ class App {
128128 Option *help_all_ptr_{nullptr };
129129
130130 // / This is the formatter for help printing. Default provided. INHERITABLE (same pointer)
131- std::shared_ptr<FormatterBase> formatter_{new Formatter ()};
131+ // / std::shared_ptr<FormatterBase> formatter_{new Formatter()};
132132
133133 // / The error message printing function INHERITABLE
134134 std::function<std::string(const App *, const Error &e)> failure_message_ = FailureMessage::simple;
@@ -204,7 +204,7 @@ class App {
204204 Option *config_ptr_{nullptr };
205205
206206 // / This is the formatter for help printing. Default provided. INHERITABLE (same pointer)
207- std::shared_ptr<Config> config_formatter_{new ConfigINI ()};
207+ // / std::shared_ptr<Config> config_formatter_{new ConfigINI()};
208208
209209 // /@}
210210
@@ -233,8 +233,8 @@ class App {
233233 allow_windows_style_options_ = parent_->allow_windows_style_options_ ;
234234 group_ = parent_->group_ ;
235235 footer_ = parent_->footer_ ;
236- formatter_ = parent_->formatter_ ;
237- config_formatter_ = parent_->config_formatter_ ;
236+ // / formatter_ = parent_->formatter_;
237+ // / config_formatter_ = parent_->config_formatter_;
238238 require_subcommand_max_ = parent_->require_subcommand_max_ ;
239239 }
240240 }
@@ -319,22 +319,22 @@ class App {
319319 }
320320
321321 // / Set the help formatter
322- App *formatter (std::shared_ptr<FormatterBase> fmt) {
323- formatter_ = fmt;
324- return this ;
325- }
322+ // / App *formatter(std::shared_ptr<FormatterBase> fmt) {
323+ // / formatter_ = fmt;
324+ // / return this;
325+ // / }
326326
327327 // / Set the help formatter
328- App *formatter_fn (std::function<std::string(const App *, std::string, AppFormatMode)> fmt) {
329- formatter_ = std::make_shared<FormatterLambda>(fmt);
330- return this ;
331- }
328+ // / App *formatter_fn(std::function<std::string(const App *, std::string, AppFormatMode)> fmt) {
329+ // / formatter_ = std::make_shared<FormatterLambda>(fmt);
330+ // / return this;
331+ // / }
332332
333333 // / Set the config formatter
334- App *config_formatter (std::shared_ptr<Config> fmt) {
335- config_formatter_ = fmt;
336- return this ;
337- }
334+ // / App *config_formatter(std::shared_ptr<Config> fmt) {
335+ // / config_formatter_ = fmt;
336+ // / return this;
337+ // / }
338338
339339 // / Check to see if this subcommand was parsed, true only if received on command line.
340340 bool parsed () const { return parsed_ > 0 ; }
@@ -1367,9 +1367,9 @@ class App {
13671367
13681368 // / Produce a string that could be read in as a config of the current values of the App. Set default_also to
13691369 // / include default arguments. Prefix will add a string to the beginning of each option.
1370- std::string config_to_str (bool default_also = false , bool write_description = false ) const {
1371- return config_formatter_->to_config (this , default_also, write_description, " " );
1372- }
1370+ // / std::string config_to_str(bool default_also = false, bool write_description = false) const {
1371+ // / return config_formatter_->to_config(this, default_also, write_description, "");
1372+ // / }
13731373
13741374 // / Makes a help message, using the currently configured formatter
13751375 // / Will only do one subcommand at a time
@@ -1383,19 +1383,19 @@ class App {
13831383 auto selected_subcommands = get_subcommands ();
13841384 if (!selected_subcommands.empty ())
13851385 return selected_subcommands.at (0 )->help (prev, mode);
1386- else
1387- return formatter_->make_help (this , prev, mode);
1386+ // / else
1387+ // / return formatter_->make_help(this, prev, mode);
13881388 }
13891389
13901390 // /@}
13911391 // / @name Getters
13921392 // /@{
13931393
13941394 // / Access the formatter
1395- std::shared_ptr<FormatterBase> get_formatter () const { return formatter_; }
1395+ // / std::shared_ptr<FormatterBase> get_formatter() const { return formatter_; }
13961396
13971397 // / Access the config formatter
1398- std::shared_ptr<Config> get_config_formatter () const { return config_formatter_; }
1398+ // / std::shared_ptr<Config> get_config_formatter() const { return config_formatter_; }
13991399
14001400 // / Get the app or subcommand description
14011401 std::string get_description () const { return description_; }
@@ -1624,24 +1624,24 @@ class App {
16241624 // The parse function is now broken into several parts, and part of process
16251625
16261626 // / Read and process an ini file (main app only)
1627- void _process_ini () {
1628- // Process an INI file
1629- if (config_ptr_ != nullptr ) {
1630- if (*config_ptr_) {
1631- config_ptr_->run_callback ();
1632- config_required_ = true ;
1633- }
1634- if (!config_name_.empty ()) {
1635- try {
1636- std::vector<ConfigItem> values = config_formatter_->from_file (config_name_);
1637- _parse_config (values);
1638- } catch (const FileError &) {
1639- if (config_required_)
1640- throw ;
1641- }
1642- }
1643- }
1644- }
1627+ // / void _process_ini() {
1628+ // / // Process an INI file
1629+ // / if(config_ptr_ != nullptr) {
1630+ // / if(*config_ptr_) {
1631+ // / config_ptr_->run_callback();
1632+ // / config_required_ = true;
1633+ // / }
1634+ // / if(!config_name_.empty()) {
1635+ // / try {
1636+ // / std::vector<ConfigItem> values = config_formatter_->from_file(config_name_);
1637+ // / _parse_config(values);
1638+ // / } catch(const FileError &) {
1639+ // / if(config_required_)
1640+ // / throw;
1641+ // / }
1642+ // / }
1643+ // / }
1644+ // / }
16451645
16461646 // / Get envname options if not yet passed. Runs on *all* subcommands.
16471647 void _process_env () {
@@ -1751,8 +1751,8 @@ class App {
17511751
17521752 // / Process callbacks and such.
17531753 void _process () {
1754- _process_ini ();
1755- _process_env ();
1754+ // / _process_ini();
1755+ // / _process_env();
17561756 _process_callbacks ();
17571757 _process_help_flags ();
17581758 _process_requirements ();
@@ -1835,7 +1835,7 @@ class App {
18351835 if (op->empty ()) {
18361836 // Flag parsing
18371837 if (op->get_type_size () == 0 ) {
1838- op->set_results (config_formatter_->to_flag (item));
1838+ // / op->set_results(config_formatter_->to_flag(item));
18391839 } else {
18401840 op->set_results (item.inputs );
18411841 op->run_callback ();
0 commit comments