Gaia-ECS v1.0.0
A simple and powerful entity component system
Loading...
Searching...
No Matches
gaia::ecs::pair< Rel, Tgt > Class Template Reference

Wrapper for two types forming a relationship pair. Depending on what types are used to form a pair it can contain a value. To determine the storage type the following logic is applied: If Rel is non-empty, the storage type is Rel. If Rel is empty and Tgt is non-empty, the storage type is Tgt. More...

#include <id.h>

+ Inheritance diagram for gaia::ecs::pair< Rel, Tgt >:

Public Types

using rel = typename rel_comp_type::TypeFull
 Full relation type, either the relation or a uni wrapper.
 
using tgt = typename tgt_comp_type::TypeFull
 Full target type, either the target or a uni wrapper.
 
using rel_type = typename rel_comp_type::Type
 Raw relation type.
 
using tgt_type = typename tgt_comp_type::Type
 Raw target type.
 
using rel_original = typename rel_comp_type::TypeOriginal
 Original relation template type.
 
using tgt_original = typename tgt_comp_type::TypeOriginal
 Original target template type.
 
using type = std::conditional_t<!std::is_empty_v< rel_type >||std::is_empty_v< tgt_type >, rel, tgt >
 Storage type for the pair value.
 

Detailed Description

template<typename Rel, typename Tgt>
class gaia::ecs::pair< Rel, Tgt >

Wrapper for two types forming a relationship pair. Depending on what types are used to form a pair it can contain a value. To determine the storage type the following logic is applied: If Rel is non-empty, the storage type is Rel. If Rel is empty and Tgt is non-empty, the storage type is Tgt.

Template Parameters
Relrelation part of the relationship
Tgttarget part of the relationship

The documentation for this class was generated from the following file: