aboutsummaryrefslogtreecommitdiff
path: root/src/entry.h
diff options
context:
space:
mode:
authorYour Name <you@example.com>2021-05-05 09:44:50 -0400
committerYour Name <you@example.com>2021-05-05 09:44:50 -0400
commit2a9f262e6db5906db445d465e500d7ba8c90fab3 (patch)
tree34f850754b0c9114ede9d7b2bb8da90dffddc4fe /src/entry.h
parent8614137f7f32f2c9f3c11419110cd70dd7f3b505 (diff)
downloaddmtool-2a9f262e6db5906db445d465e500d7ba8c90fab3.tar.gz
dmtool-2a9f262e6db5906db445d465e500d7ba8c90fab3.tar.bz2
dmtool-2a9f262e6db5906db445d465e500d7ba8c90fab3.zip
Implemented additional commands
Diffstat (limited to 'src/entry.h')
-rw-r--r--src/entry.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/entry.h b/src/entry.h
index e354c82..ced8544 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -36,7 +36,9 @@ namespace entry {
}
protected:
- Entry(const nlohmann::json& data) : entry(data["entry"]), name(data["name"]), type(data["type"]), text(data["text"]) {};
+ Entry(const nlohmann::json& data) : Entry(data["entry"], data["name"], data["type"], data["text"]) {};
+ // Can also be instantiated programmatically
+ Entry(const std::string& entry, const std::string& name, const std::string& type, const std::string& text) : entry(entry), name(name), type(type), text(text) {};
private:
const std::string entry;