Engine → Modules → module_service.h
service_table
| Type | Class |
| Namespace | conjure::modules |
| Include File Path | engine/include/conjure/modules/module_service.h |
| Source File Path | engine/src/modules/module_service.cpp |
| API ↗ | Writing a module |
Syntax
Constructors
| Access | Signature | Description |
|---|---|---|
| public | service_table(); |
Important
Copy constructor and assignment has been deleted.
Destructors
| Access | Signature | Description |
|---|---|---|
| public | ~service_table(); |
Variables
| Access | Name | Type | Default | Description |
|---|---|---|---|---|
| private | mServices | core:: | {} |
Functions
Public
clear
clearvoid clear() noexcept;Forgets every service.
contains
contains[[nodiscard]] bool contains(
service_id id) const noexcept;True when a service is registered under the id.
find
findtemplate <typename ServiceType> [[nodiscard]] ServiceType *find() const noexcept;The object provided for ServiceType, or nullptr.
provide
providetemplate <typename ServiceType> void provide(
ServiceType &service);Registers a host object under ServiceType::SERVICE_ID. Providing the same service twice asserts and keeps the first.
Private
find_raw
find_raw[[nodiscard]] void *find_raw(
service_id id) const noexcept;provide_raw
provide_rawvoid provide_raw(
service_id id,
void *service,
std::string_view name);