Skip to content

Commit

Permalink
Change name to 'Sender'.
Browse files Browse the repository at this point in the history
  • Loading branch information
nealkruis committed Feb 15, 2024
1 parent b5e232e commit 2b78974
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions include/courier/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,17 @@ class DefaultCourier : public Courier {
}
};

class Dispatcher {
class Sender {
public:
Dispatcher() = default;
explicit Dispatcher(
std::string name_in,
const std::shared_ptr<Courier>& courier_in = std::make_shared<DefaultCourier>())
Sender() = default;
explicit Sender(std::string name_in,
const std::shared_ptr<Courier>& courier_in = std::make_shared<DefaultCourier>())
: name(std::move(name_in)), courier(courier_in) {};
std::string name;

protected:
std::shared_ptr<Courier> courier;
Dispatcher* parent_pointer {nullptr};
Sender* parent_pointer {nullptr};
std::string class_name;
std::string message_format {"{} '{}': {}"};
[[nodiscard]] std::string make_message(const std::string& message) const // NOLINT
Expand Down
4 changes: 2 additions & 2 deletions test/library.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
#include <courier/helpers.h>
#include <fmt/format.h>

class LibraryClass : Courier::Dispatcher {
class LibraryClass : Courier::Sender {
public:
explicit LibraryClass(std::string name_in,
const std::shared_ptr<Courier::Courier>& courier_in =
std::make_shared<Courier::DefaultCourier>())
: Courier::Dispatcher(std::move(name_in), courier_in)
: Courier::Sender(std::move(name_in), courier_in)
{
class_name = "LibraryClass";
}
Expand Down

0 comments on commit 2b78974

Please sign in to comment.