rotor
Event loop friendly C++ actor micro-framework
 
Loading...
Searching...
No Matches
address_maker.h
1#pragma once
2
3//
4// Copyright (c) 2019-2023 Ivan Baidakou (basiliscos) (the dot dmol at gmail dot com)
5//
6// Distributed under the MIT Software License
7//
8
9#include "plugin_base.h"
10
11namespace rotor::plugin {
12
24struct ROTOR_API address_maker_plugin_t : public plugin_base_t {
25 using plugin_base_t::plugin_base_t;
26
28 static const std::type_index class_identity;
29
30 const std::type_index &identity() const noexcept override;
31
32 void activate(actor_base_t *actor) noexcept override;
33 void deactivate() noexcept override;
34
42 void set_identity(std::string_view name, bool append_addr = true) noexcept;
43
49 virtual address_ptr_t create_address() noexcept;
50
52 virtual void generate_identity() noexcept;
53};
54
55} // namespace rotor::plugin
intrusive_ptr_t< address_t > address_ptr_t
intrusive pointer for address
Definition address.hpp:57
universal primitive of concurrent computation
Definition actor_base.h:47
create actor's addresses
Definition address_maker.h:24
static const std::type_index class_identity
Definition address_maker.h:28
const std::type_index & identity() const noexcept override
returns pointer, which uniquely identifiess plugin type
base class for all actor plugins
Definition plugin_base.h:23