Skip to main content

BindingComponent.ixx File

Included Headers

#include <concepts>

Namespaces Index

namespacehelios
namespaceecs
namespacecomponents

Classes Index

classBindingComponent<TOwnerHandle, TTargetHandle>

Generic component that stores a handle reference to another entity. More...

File Listing

The file content with the documentation metadata removed is:

1module;
2
3#include <concepts>
4
5export module helios.ecs.components.BindingComponent;
6
7export namespace helios::ecs::components {
8
20 template<typename TOwnerHandle, typename TTargetHandle>
22
23 TTargetHandle targetHandle_{};
24
25 public:
26
32 explicit BindingComponent(const TTargetHandle targetHandle) : targetHandle_(targetHandle) {};
33
43 template<typename TTargetEntity>
44 requires std::same_as<TTargetHandle, typename TTargetEntity::Handle_type>
45 explicit BindingComponent(const TTargetEntity targetEntity) : targetHandle_(targetEntity.handle()) {};
46
52 [[nodiscard]] TTargetHandle targetHandle() const noexcept {
53 return targetHandle_;
54 }
55 };
56}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.