Bayeux  3.4.1
Core Foundation library for SuperNEMO
shell_tree_command.h
Go to the documentation of this file.
1 //
4 // Copyright (c) 2015 by François Mauger <mauger@lpccaen.in2p3.fr>
5 //
6 // This file is part of datatools.
7 //
8 // datatools is free software: you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation, either version 3 of the License, or
11 // (at your option) any later version.
12 //
13 // datatools is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with datatools. If not, see <http://www.gnu.org/licenses/>.
20 
21 #ifndef DATATOOLS_UI_SHELL_TREE_COMMAND_H
22 #define DATATOOLS_UI_SHELL_TREE_COMMAND_H
23 
24 // This project:
28 
29 namespace datatools {
30 
31  namespace ui {
32 
35  : public const_target_command<basic_shell>
36  {
38  virtual ~shell_tree_command();
39  protected:
40  virtual void _init(const datatools::properties & config_);
41  virtual void _run(datatools::command::returned_info & cri_, uint32_t flags_ = 0);
42 
44  void _tree_print_children(std::ostream & out_,
45  const std::string & path_,
46  const std::string & indent_ = "");
47 
52  };
53 
54  std::string _format_full_path(const std::string & full_path_,
56 
57  private:
58 
59  bool _all_;
60  bool _classify_;
61  bool _longf_;
62  bool _colored_;
63  bool _dirs_only_;
64  bool _dirs_first_;
65  bool _full_path_;
66  bool _prune_empty_dirs_;
67  uint32_t _max_level_;
68  uint32_t _level_;
69 
70  };
71 
72  } // namespace ui
73 
74 } // namespace datatools
75 
76 #endif // DATATOOLS_UI_SHELL_TREE_COMMAND_H
77 
78 // Local Variables: --
79 // mode: c++ --
80 // c-file-style: "gnu" --
81 // tab-width: 2 --
82 // End: --
Definition: shell_tree_command.h:51
virtual void _init(const datatools::properties &config_)
Definition: shell_tree_command.h:49
std::string _format_full_path(const std::string &full_path_, format_mode_type)
void _tree_print_children(std::ostream &out_, const std::string &path_, const std::string &indent_="")
Recursive tree print.
Command returned information.
Definition: command_utils.h:78
A basic generic shell.
Base command for a const target object.
Definition: target_command.h:129
Base command for target objects.
Shell tree command.
Definition: shell_tree_command.h:34
virtual void _run(datatools::command::returned_info &cri_, uint32_t flags_=0)
The Bayeux/datatools library top-level namespace.
Definition: algo.h:13
format_mode_type
Definition: shell_tree_command.h:48
shell_tree_command(const basic_shell &)
Definition: shell_tree_command.h:50
Command line shell interface.
Definition: basic_shell.h:58
A dictionary of arbitrary properties.
Definition: properties.h:125