23#ifndef VCL_MESH_CONTAINERS_BASE_BASE_H
24#define VCL_MESH_CONTAINERS_BASE_BASE_H
26#include <vclib/mesh/components/concepts/component.h>
28#include <vclib/base.h>
45template<uint ELEM_ID,
typename... Containers>
46struct ContainerOfElementPred
49 template<
typename Cont>
52 static constexpr bool value = Cont::ELEMENT_ID == ELEM_ID;
58 typename FilterTypesByCondition<SameElPred, Containers...>::type;
59 static constexpr bool value = NumberOfTypes<type>::value == 1;
63template<uint ELEM_ID,
typename... Containers>
64struct ContainerOfElementPred<ELEM_ID, TypeWrapper<Containers...>> :
65 public ContainerOfElementPred<ELEM_ID, Containers...>
82 static const bool value =
83 std::is_base_of<ElementContainerTriggerer, RemoveRef<T>>::value;
105template<u
int ELEM_ID,
typename MeshType>
132template<u
int ELEM_ID,
typename MeshType>
133using ContainerOfElementType =
136template<
typename El,
typename MeshType>
139 static constexpr bool value = detail::ContainerOfElementPred<
144template<u
int ELEM_ID,
typename MeshType>
147 static constexpr bool value = detail::ContainerOfElementPred<
152template<
typename MeshType, u
int ELEM_ID>
154 HasContainerOfElementPred<ELEM_ID, MeshType>::value;
156template<
typename MeshType, u
int ELEM_ID, u
int COMP_ID>
160 typename ContainerOfElementType<ELEM_ID, MeshType>::ElementType,
163template<
typename MeshType, u
int ELEM_ID, u
int COMP_ID>
167 typename ContainerOfElementType<ELEM_ID, MeshType>::ElementType,
A class representing a box in N-dimensional space.
Definition box.h:46
The HasComponentOfType concept checks whether a type T (that may be a Mesh or a MeshElement) has a co...
Definition component.h:248
The HasOptionalComponentOfType concept checks whether a type T (that should be a MeshElement) has an ...
Definition component.h:290
typename FirstType< Args... >::type FirstTypeT
Alias for the type of the first type in a pack of types.
Definition variadic_templates.h:63
std::remove_reference_t< T > RemoveRef
Utility alias to get a type type without the reference. e.g. If T is int&, the resulting type is int.
Definition pointers.h:55
The ContainerOfElement structure exposes the type of the container of the given MeshType having eleme...
Definition base.h:107
The predicate IsElementContainerPred sets its bool value to true when the type T satisfies the Elemen...
Definition base.h:81