summaryrefslogtreecommitdiff
path: root/graphs/cpp/path/path.hh
blob: 0a09d05f5e70abe16cf0db06df3d6eab274a7ffc (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
#pragma once

#include <string>
#include <vector>

class Path
{
public:
    Path() = default;
    virtual ~Path() = default;

    /*
    ** Return the complete path as a string.
    */
    virtual std::string to_string() const = 0;

    /*
    ** Add a directory or a file at the end of the path.
    */
    virtual Path& join(const std::string& tail, bool is_file = false);

protected:
    std::vector<std::string> path_;
    bool final_ = false;
};