aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/argument_parser.hpp12
-rw-r--r--src/interfaces/cursor.hpp8
-rw-r--r--src/interfaces/game.hpp6
-rw-r--r--src/interfaces/input.hpp7
-rw-r--r--src/interfaces/publisher.hpp11
-rw-r--r--src/interfaces/randomization.hpp4
-rw-r--r--src/interfaces/scene.hpp3
-rw-r--r--src/interfaces/status_updater.hpp3
-rw-r--r--src/interfaces/statusline.hpp9
9 files changed, 37 insertions, 26 deletions
diff --git a/src/interfaces/argument_parser.hpp b/src/interfaces/argument_parser.hpp
index 8769698..d2dfb03 100644
--- a/src/interfaces/argument_parser.hpp
+++ b/src/interfaces/argument_parser.hpp
@@ -18,9 +18,11 @@ class IArgumentParser
public:
virtual ~IArgumentParser() noexcept = default;
- virtual auto parse(const std::vector<option> &options,
- const std::string_view &short_options, const int &argc,
- char *const *argv) noexcept
- -> ParsedArguments = 0; // NOLINT(cppcoreguidelines-avoid-c-arrays,
- // modernize-avoid-c-arrays)
+ virtual auto parse(
+ const std::vector<option> &options,
+ const std::string_view &short_options,
+ const int &argc,
+ char *const *argv
+ ) noexcept -> ParsedArguments = 0; // NOLINT(cppcoreguidelines-avoid-c-arrays,
+ // modernize-avoid-c-arrays)
};
diff --git a/src/interfaces/cursor.hpp b/src/interfaces/cursor.hpp
index f6521cb..053ff40 100644
--- a/src/interfaces/cursor.hpp
+++ b/src/interfaces/cursor.hpp
@@ -35,9 +35,9 @@ public:
virtual void show() noexcept = 0;
- void subscribe(const Event &event,
- const Subscriber &subscriber) noexcept override = 0;
+ void
+ subscribe(const Event &event, const Subscriber &subscriber) noexcept override = 0;
- void notify_subscribers(const Event &event,
- const Context &context) const noexcept override = 0;
+ void notify_subscribers(const Event &event, const Context &context)
+ const noexcept override = 0;
};
diff --git a/src/interfaces/game.hpp b/src/interfaces/game.hpp
index 0f5c895..6d247d9 100644
--- a/src/interfaces/game.hpp
+++ b/src/interfaces/game.hpp
@@ -33,5 +33,7 @@ using IGameFactory = std::unique_ptr<IGame> (*)(
*/
using IGameFactory = Factory<std::unique_ptr<IGame>(
- const std::shared_ptr<IWindow> &window, const std::shared_ptr<IScene> &scene,
- const std::shared_ptr<ICursorController> &cursor_controller)>;
+ const std::shared_ptr<IWindow> &window,
+ const std::shared_ptr<IScene> &scene,
+ const std::shared_ptr<ICursorController> &cursor_controller
+)>;
diff --git a/src/interfaces/input.hpp b/src/interfaces/input.hpp
index b71de67..df4abb8 100644
--- a/src/interfaces/input.hpp
+++ b/src/interfaces/input.hpp
@@ -19,10 +19,11 @@ public:
void subscribe(
const Event &event,
- const std::shared_ptr<ISubscriber<Context>> &subscriber) noexcept override = 0;
+ const std::shared_ptr<ISubscriber<Context>> &subscriber
+ ) noexcept override = 0;
- void notify_subscribers(const Event &event,
- const Context &context) const noexcept override = 0;
+ void notify_subscribers(const Event &event, const Context &context)
+ const noexcept override = 0;
virtual void enter_raw_mode() noexcept = 0;
diff --git a/src/interfaces/publisher.hpp b/src/interfaces/publisher.hpp
index ef1e61c..4e66d64 100644
--- a/src/interfaces/publisher.hpp
+++ b/src/interfaces/publisher.hpp
@@ -12,10 +12,11 @@ class IPublisher
public:
virtual ~IPublisher() noexcept = default;
- virtual void
- subscribe(const Event &event,
- const std::shared_ptr<ISubscriber<Context>> &subscriber) noexcept = 0;
+ virtual void subscribe(
+ const Event &event,
+ const std::shared_ptr<ISubscriber<Context>> &subscriber
+ ) noexcept = 0;
- virtual void notify_subscribers(const Event &event,
- const Context &context) const noexcept = 0;
+ virtual void
+ notify_subscribers(const Event &event, const Context &context) const noexcept = 0;
};
diff --git a/src/interfaces/randomization.hpp b/src/interfaces/randomization.hpp
index 4abad1d..26426e3 100644
--- a/src/interfaces/randomization.hpp
+++ b/src/interfaces/randomization.hpp
@@ -25,8 +25,8 @@ public:
* @param a A number lower than b
* @param b A number greater than a
*/
- [[nodiscard]] virtual auto in_range(const uint32_t &a,
- const uint32_t &b) const noexcept -> uint32_t = 0;
+ [[nodiscard]] virtual auto
+ in_range(const uint32_t &a, const uint32_t &b) const noexcept -> uint32_t = 0;
};
using IRandomNumberGeneratorFactory =
diff --git a/src/interfaces/scene.hpp b/src/interfaces/scene.hpp
index 0a51b6e..88cb3b1 100644
--- a/src/interfaces/scene.hpp
+++ b/src/interfaces/scene.hpp
@@ -24,4 +24,5 @@ public:
using ISceneFactory = Factory<std::unique_ptr<IScene>(
const std::shared_ptr<ICursorController> &cursor_controller,
- const std::shared_ptr<IWindow> &window)>;
+ const std::shared_ptr<IWindow> &window
+)>;
diff --git a/src/interfaces/status_updater.hpp b/src/interfaces/status_updater.hpp
index e5081ef..83b2bf2 100644
--- a/src/interfaces/status_updater.hpp
+++ b/src/interfaces/status_updater.hpp
@@ -18,4 +18,5 @@ public:
using IStatusUpdaterFactory = Factory<std::unique_ptr<IStatusUpdater>(
const std::shared_ptr<IStatusLine> &statusline,
- const std::shared_ptr<IGenerationTracker> &generation_tracker)>;
+ const std::shared_ptr<IGenerationTracker> &generation_tracker
+)>;
diff --git a/src/interfaces/statusline.hpp b/src/interfaces/statusline.hpp
index bbd8e4a..c104fad 100644
--- a/src/interfaces/statusline.hpp
+++ b/src/interfaces/statusline.hpp
@@ -21,10 +21,13 @@ public:
virtual void initialize_background() noexcept = 0;
- virtual void set_status(StatusLineSection section,
- const std::string_view &str) noexcept = 0;
+ virtual void set_status(
+ StatusLineSection section,
+ const std::string_view &status_str
+ ) noexcept = 0;
};
using IStatusLineFactory = Factory<std::unique_ptr<IStatusLine>(
const std::shared_ptr<ICursorController> &cursor_controller,
- const std::shared_ptr<IWindow> &window)>;
+ const std::shared_ptr<IWindow> &window
+)>;