aboutsummaryrefslogtreecommitdiff
path: root/src/item.h
blob: 096513e7ddc280d81754e4e11685d1592b693b58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once
#include "json.hpp"
#include "entry.h"
#include <memory>

namespace entry {
    class Item : public Entry {
        public:
            static std::shared_ptr<Item> create(const nlohmann::json& data);

        protected:
            Item(const nlohmann::json& data) : Entry(data) {};
    };

    class Substantial {
        public:
            virtual int getCost(void) const = 0;
            virtual double getWeight(void) const = 0;
    };

    std::string genText(const Substantial& s);
}