feat: projects & replace builtins.list with 'base_packs' project property
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#include "Project.hpp"
|
||||
|
||||
#include "data/dv_util.hpp"
|
||||
|
||||
dv::value Project::serialize() const {
|
||||
return dv::object({
|
||||
{"name", name},
|
||||
{"title", title},
|
||||
{"base_packs", dv::to_value(basePacks)},
|
||||
});
|
||||
}
|
||||
|
||||
void Project::deserialize(const dv::value& src) {
|
||||
src.at("name").get(name);
|
||||
src.at("title").get(title);
|
||||
dv::get(src, "base_packs", basePacks);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "interfaces/Serializable.hpp"
|
||||
|
||||
struct Project : Serializable {
|
||||
std::string name;
|
||||
std::string title;
|
||||
std::vector<std::string> basePacks;
|
||||
|
||||
dv::value serialize() const override;
|
||||
void deserialize(const dv::value& src) override;
|
||||
};
|
||||
Reference in New Issue
Block a user