Skip to content

Repository files navigation

wsjcpp-print-tree

Build StatusGithub StarsGithub StarsGithub ForksTotal alertsLanguage grade: C/C++

Helper class for print tree like a for filesystems

How to integrate to your project

First way:

wsjcpp install https://github.com/wsjcpp/wsjcpp-print-tree:master

Second way integrate files:

  • src.wsjcpp/wsjcpp_core/wsjcpp_core.h
  • src.wsjcpp/wsjcpp_core/wsjcpp_core.cpp
  • wsjcpp_print_tree.h
  • wsjcpp_print_tree.cpp

Example of usage

WsjcppPrintTree tree("Example Of Tree");
tree
.addChild("Hello1")
.switchToLatestChild()
.addChild("Hello2")
.switchToLatestChild()
.switchToParent() .addChild("Hello2")
.switchToParent()
.addChild("Hello3")
.switchToLatestChild()
.switchToParent()
.addChild("Hello4") // .switchToLatestChild()
.addChild("Hello123")
.switchToParent()
;
std::cout << tree.printTree() << std::endl;

Result will be like this:

Example Of Tree
├─ Hello1
│ ├─ Hello2
│ └─ Hello2
├─ Hello3
└─ Hello4
└─ Hello123

About

Helper class for print tree like a for filesystems

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages