aboutsummaryrefslogtreecommitdiff
path: root/src/entry.cc
diff options
context:
space:
mode:
authorYour Name <you@example.com>2021-04-16 11:23:27 -0400
committerYour Name <you@example.com>2021-04-16 11:23:27 -0400
commit4618763c0e3a723bf4bb43c7b9edbce87240e0af (patch)
treea18aa4bf7da05ac02b4e37b199aeeb82da977aea /src/entry.cc
parentdfce4d0398a8bafbb7ad7a31345af181c0269c09 (diff)
downloaddmtool-4618763c0e3a723bf4bb43c7b9edbce87240e0af.tar.gz
dmtool-4618763c0e3a723bf4bb43c7b9edbce87240e0af.tar.bz2
dmtool-4618763c0e3a723bf4bb43c7b9edbce87240e0af.zip
Rebased feature/item on entry
Diffstat (limited to 'src/entry.cc')
-rw-r--r--src/entry.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/entry.cc b/src/entry.cc
new file mode 100644
index 0000000..b6431f0
--- /dev/null
+++ b/src/entry.cc
@@ -0,0 +1,15 @@
+#include "entry.h"
+
+namespace creature {
+ class Creature;
+}
+
+namespace entry {
+ std::string genText(const Entry& e, const creature::Creature& c) {
+ return e.getName() + " (" + e.getType() + ")";
+ }
+
+ std::string Entry::getText(const creature::Creature& c) const {
+ return genText(*this, c);
+ }
+}