summaryrefslogtreecommitdiff
path: root/traveler/AsciiTraveler.hh
blob: 11c39f04e7b43a58090e3ad9f9a490a7603e6305 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef PCC_ASCIITRAVELER_HH
#define PCC_ASCIITRAVELER_HH

#include <stack>
#include <string>

#include "Traveler.hh"

namespace pcc {
class AsciiTraveler : public Traveler {
  public:
    AsciiTraveler(std::ostream& out);
    virtual Traveler& operator<<(TravelPart part);

  protected:
    int level_;
    std::string prefix_;
    std::stack<bool> IsLastChild_;

    static const std::string MiddleLevelPrefix_;
    static const std::string LastLevelPrefix_;
    static const std::string MiddleChildPrefix_;
    static const std::string LastChildPrefix_;
    static const size_t LevelWidth_;
};
} // namespace pcc

#endif // !PCC_ASCIITRAVELER_HH