3#include "TypeDatabase.h"
11 template<
template<
typename>
class T,
typename U>
13 : Attribute(TypeDatabase::getType<T<U>>().getTypeId(), TypeDatabase::getType<U>().getTypeId(), runtime)
19 inline RegularAttribute<T>::RegularAttribute(
bool runtime)
20 : Attribute(TypeDatabase::getType<T>().getTypeId(),
NoType, runtime)
26 inline const Attribute * Attributes::getAttribute(RegularAttribute<T> *)
const
28 return getAttributeByTypeId(TypeDatabase::getType<T>().getTypeId());
31 template<
template<
typename>
class T,
typename U>
32 inline const Attribute * Attributes::getAttribute(GenericAttribute<T, U> *)
const
34 return getAttributeByTypeId(TypeDatabase::getType<T<U>>().getTypeId(), TypeDatabase::getType<U>().getTypeId());
37 inline const Attribute * Attributes::getAttributeByTypeId(TypeId typeId, TypeId genericTypeId)
const
39 for (
auto & a : attributes) {
40 if (a.getType() == typeId && a.getGenericType() == genericTypeId) {
constexpr TypeId NoType
Definition of no type.
Contains all Cogs related functionality.
GenericAttribute(bool runtime=true)
Construct a generic attribute. True if runtime attribute.