Gaia-ECS v0.9.3
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. More...

#include <id.h>

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

Public Types

using rel = typename rel_comp_type::TypeFull
 
using tgt = typename tgt_comp_type::TypeFull
 
using rel_type = typename rel_comp_type::Type
 
using tgt_type = typename tgt_comp_type::Type
 
using rel_original = typename rel_comp_type::TypeOriginal
 
using tgt_original = typename tgt_comp_type::TypeOriginal
 
using type = std::conditional_t<!std::is_empty_v< rel_type >||std::is_empty_v< tgt_type >, rel, tgt >
 

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.

Template Parameters
Relis non-empty, the storage type is Rel. If
Relis empty and
Tgtis non-empty, the storage type is Tgt.
Relrelation part of the relationship
Tgttarget part of the relationship

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