Gaia-ECS v0.9.3
A simple and powerful entity component system
Loading...
Searching...
No Matches
gaia::ecs::ComponentSetter Struct Reference
+ Inheritance diagram for gaia::ecs::ComponentSetter:

Public Member Functions

template<typename T >
decltype(auto) mut ()
 Returns a mutable reference to component.
 
template<typename T , typename U = typename actual_type_t<T>::Type>
ComponentSetterset (U &&value)
 Sets the value of the component.
 
template<typename T >
decltype(auto) mut (Entity type)
 Returns a mutable reference to component.
 
template<typename T >
ComponentSetterset (Entity type, T &&value)
 Sets the value of the component type.
 
template<typename T >
decltype(auto) smut ()
 Returns a mutable reference to component without triggering a world version update.
 
template<typename T , typename U = typename actual_type_t<T>::Type>
ComponentSettersset (U &&value)
 Sets the value of the component without triggering a world version update.
 
template<typename T >
decltype(auto) smut (Entity type)
 Returns a mutable reference to component without triggering a world version update.
 
template<typename T >
ComponentSettersset (Entity type, T &&value)
 Sets the value of the component without triggering a world version update.
 
- Public Member Functions inherited from gaia::ecs::ComponentGetter
template<typename T >
GAIA_NODISCARD decltype(auto) get () const
 Returns the value stored in the component T on entity.
 

Additional Inherited Members

- Public Attributes inherited from gaia::ecs::ComponentGetter
const Chunkm_pChunk
 
uint16_t m_row
 

Member Function Documentation

◆ mut() [1/2]

template<typename T >
decltype(auto) gaia::ecs::ComponentSetter::mut ( )
inline

Returns a mutable reference to component.

Template Parameters
TComponent or pair
Returns
Reference to data for AoS, or mutable accessor for SoA types

◆ mut() [2/2]

template<typename T >
decltype(auto) gaia::ecs::ComponentSetter::mut ( Entity  type)
inline

Returns a mutable reference to component.

Template Parameters
TComponent or pair
Returns
Reference to data for AoS, or mutable accessor for SoA types

◆ set() [1/2]

template<typename T >
ComponentSetter & gaia::ecs::ComponentSetter::set ( Entity  type,
T &&  value 
)
inline

Sets the value of the component type.

Template Parameters
TComponent or pair
Parameters
typeEntity associated with the type
valueValue to set for the component
Returns
ComponentSetter

◆ set() [2/2]

template<typename T , typename U = typename actual_type_t<T>::Type>
ComponentSetter & gaia::ecs::ComponentSetter::set ( U &&  value)
inline

Sets the value of the component.

Template Parameters
T.
TComponent or pair
Parameters
valueValue to set for the component
Returns
ComponentSetter

◆ smut() [1/2]

template<typename T >
decltype(auto) gaia::ecs::ComponentSetter::smut ( )
inline

Returns a mutable reference to component without triggering a world version update.

Template Parameters
TComponent or pair
Returns
Reference to data for AoS, or mutable accessor for SoA types

◆ smut() [2/2]

template<typename T >
decltype(auto) gaia::ecs::ComponentSetter::smut ( Entity  type)
inline

Returns a mutable reference to component without triggering a world version update.

Template Parameters
TComponent or pair
Parameters
typeEntity associated with the type
Returns
Reference to data for AoS, or mutable accessor for SoA types

◆ sset() [1/2]

template<typename T >
ComponentSetter & gaia::ecs::ComponentSetter::sset ( Entity  type,
T &&  value 
)
inline

Sets the value of the component without triggering a world version update.

Template Parameters
TComponent or pair
Parameters
typeEntity associated with the type
valueValue to set for the component
Returns
ComponentSetter

◆ sset() [2/2]

template<typename T , typename U = typename actual_type_t<T>::Type>
ComponentSetter & gaia::ecs::ComponentSetter::sset ( U &&  value)
inline

Sets the value of the component without triggering a world version update.

Template Parameters
TComponent or pair
Parameters
valueValue to set for the component
Returns
ComponentSetter

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