aboutsummaryrefslogtreecommitdiff
path: root/examples/basic/src/interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'examples/basic/src/interfaces')
-rw-r--r--examples/basic/src/interfaces/enemy.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/basic/src/interfaces/enemy.hpp b/examples/basic/src/interfaces/enemy.hpp
index 45e004f..40b6818 100644
--- a/examples/basic/src/interfaces/enemy.hpp
+++ b/examples/basic/src/interfaces/enemy.hpp
@@ -1,5 +1,9 @@
#pragma once
+#include <yacppdic/factory.hpp>
+
+#include <memory>
+
class IEnemy
{
public:
@@ -9,3 +13,5 @@ public:
virtual void do_damage(int damage) noexcept = 0;
};
+
+using IEnemyFactory = yacppdic::Factory<std::unique_ptr<IEnemy>()>;