15 #ifndef PAAL_COMPONENTS_REPLACE_HPP
16 #define PAAL_COMPONENTS_REPLACE_HPP
21 namespace data_structures {
30 template <
typename Name,
typename NewType,
typename components>
43 template <
typename Name,
typename NewType,
typename Names,
typename Types>
68 template <
typename Names,
typename Types>
83 template <
typename Name,
typename NewType,
typename Names,
typename Types>
91 : m_comps(comps), m_comp(comp) {}
93 template <
typename ComponentName>
94 const typename detail::type_for_name<ComponentName, Names, NewTypes>::type &
101 template <
typename ComponentName>
103 std::declval<const Comps>().template get<ComponentName>()) {
104 return m_comps.template get<ComponentName>();
111 const Comps &m_comps;
112 const NewType &m_comp;
137 template <
typename Name,
typename NewType,
typename Names,
typename Types>
152 #endif // PAAL_COMPONENTS_REPLACE_HPP
replaced_type< Name, NewType, detail::components< Names, Types > >::type replace(NewType comp, detail::components< Names, Types > components)
This function, for a specific Name, replaces compoonent in the components class. The comonent should ...
replace element at pos to NewType
wraps type to constructible type
returns pos of the element in the TypesVector
Indicates that components constructor is in fact a Copy/Move Constructor.
Generic version of replaced_type.