From 3957dfb9361e864f6362e59655c885f52b39371f Mon Sep 17 00:00:00 2001 From: HampusM Date: Fri, 6 May 2022 18:23:42 +0200 Subject: docs: add tagging to basic example --- examples/basic/src/interfaces/enemy.hpp | 3 +++ examples/basic/src/interfaces/enemy_creator.hpp | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 examples/basic/src/interfaces/enemy_creator.hpp (limited to 'examples/basic/src/interfaces') diff --git a/examples/basic/src/interfaces/enemy.hpp b/examples/basic/src/interfaces/enemy.hpp index 40b6818..5f49ca6 100644 --- a/examples/basic/src/interfaces/enemy.hpp +++ b/examples/basic/src/interfaces/enemy.hpp @@ -4,6 +4,9 @@ #include +constexpr char SMALL_ENEMY_TAG[] = "small"; +constexpr char BIG_ENEMY_TAG[] = "big"; + class IEnemy { public: diff --git a/examples/basic/src/interfaces/enemy_creator.hpp b/examples/basic/src/interfaces/enemy_creator.hpp new file mode 100644 index 0000000..820b636 --- /dev/null +++ b/examples/basic/src/interfaces/enemy_creator.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "interfaces/enemy.hpp" + +#include + +class IEnemyCreator +{ +public: + virtual ~IEnemyCreator() = default; + + virtual std::unique_ptr create_small_enemy() noexcept = 0; + + virtual std::unique_ptr create_big_enemy() noexcept = 0; +}; -- cgit v1.2.3-18-g5258