21 #ifndef DATATOOLS_UI_IHS_H 22 #define DATATOOLS_UI_IHS_H 36 #include <boost/filesystem.hpp> 81 static bool path_has_scheme(
const std::string & path_,
const std::string & scheme_ =
"");
214 virtual void tree_dump(std::ostream & out_ = std::clog,
215 const std::string & title_ =
"",
216 const std::string & indent_ =
"",
217 bool inherit =
false)
const;
220 void set_trait(
const std::string & trait_label_,
const bool set_ =
true);
223 void reset_trait(
const std::string & trait_label_);
226 bool is_trait(
const std::string & trait_label_)
const;
230 ihs * _ihs_ =
nullptr;
233 std::string _full_path_;
234 std::string _description_;
235 bool _owned_interface_ =
false;
237 bool _owned_command_ =
false;
239 node * _parent_node_;
240 std::set<node *> _children_;
249 ihs(
const std::string & scheme_ =
"");
268 const std::string & interface_name_,
269 const std::string & description_ =
"");
280 void remove_interface(
const std::string & interface_path_,
bool recursive_ =
false);
294 void remove(
const std::string & path_,
bool recursive_ =
false);
297 bool exists(
const std::string & path_)
const;
306 bool is_command(
const std::string & path_)
const;
309 void set_trait(
const std::string & path_,
310 const std::string & trait_label_,
311 const bool set_ =
true);
315 const std::string & trait_label_);
318 bool is_trait(
const std::string & path_,
319 const std::string & trait_label_)
const;
341 std::vector<std::string> & children_paths_)
const;
347 bool has_child(
const std::string & path_,
const std::string & name_)
const;
357 virtual void tree_dump(std::ostream & out_ = std::clog,
358 const std::string & title_ =
"",
359 const std::string & indent_ =
"",
360 bool inherit =
false)
const;
363 void build_path(std::set<std::string> & paths_,
const uint32_t flags_ = 0)
const;
376 void _set_scheme_(
const std::string &);
380 std::string _scheme_;
389 #endif // DATATOOLS_UI_IHS_H
Base class for command line interface command objects.