aboutsummaryrefslogtreecommitdiff
path: root/include/Path.hpp
blob: 351fd5d3ccaac57df56ce86ae85db58521e5f8ef (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
#pragma once

#include <string>

namespace QuickMedia {
    class Path {
    public:
        Path() = default;
        ~Path() = default;
        Path(const Path &other) = default;
        Path& operator=(const Path &other) = default;
        Path(const char *path) : data(path) {}
        Path(const std::string &path) : data(path) {}
        Path(Path &&other) {
            data = std::move(other.data);
        }

        Path& join(const Path &other) {
            data += "/";
            data += other.data;
            return *this;
        }

        std::string data;
    };
}