neoGFX
Cross-platform C++ app/game engine
neogfx::game::static_shared_component< Data > Class Template Reference

#include <component.hpp>

Inheritance diagram for neogfx::game::static_shared_component< Data >:
neogfx::game::static_component_base< shared< ecs_data_type_t< Data > >, i_shared_component > neogfx::game::i_shared_component neogfx::game::i_component_base

Public Types

typedef base_type::data_type data_type
 
typedef base_type::data_meta_type data_meta_type
 
typedef base_type::value_type value_type
 
typedef base_type::component_data_t component_data_t
 
typedef component_data_t::mapped_type mapped_type
 
- Public Types inherited from neogfx::game::static_component_base< shared< ecs_data_type_t< Data > >, i_shared_component >
typedef detail::crack_component_data< shared< ecs_data_type_t< Data > > >::data_type data_type
 
typedef data_type::meta data_meta_type
 
typedef detail::crack_component_data< shared< ecs_data_type_t< Data > > >::value_type value_type
 
typedef detail::crack_component_data< shared< ecs_data_type_t< Data > > >::container_type component_data_t
 

Public Member Functions

 static_shared_component (game::i_ecs &aEcs)
 
const mapped_typeoperator[] (typename component_data_t::size_type aIndex) const
 
mapped_typeoperator[] (typename component_data_t::size_type aIndex)
 
const mapped_typeoperator[] (const std::string &aName) const
 
mapped_typeoperator[] (const std::string &aName)
 
mapped_typepopulate (const std::string &aName, const mapped_type &aData)
 
mapped_typepopulate (const std::string &aName, mapped_type &&aData)
 
void * populate (const std::string &aName, const void *aComponentData, std::size_t aComponentDataSize) override
 
- Public Member Functions inherited from neogfx::game::static_component_base< shared< ecs_data_type_t< Data > >, i_shared_component >
 static_component_base (game::i_ecs &aEcs)
 
 static_component_base (const self_type &aOther)
 
self_typeoperator= (const self_type &aRhs)
 
game::i_ecsecs () const override
 
const component_idid () const override
 
std::recursive_mutex & mutex () const
 
bool is_data_optional () const override
 
const i_stringname () const override
 
uint32_t field_count () const override
 
component_data_field_type field_type (uint32_t aFieldIndex) const override
 
neolib::uuid field_type_id (uint32_t aFieldIndex) const override
 
const i_stringfield_name (uint32_t aFieldIndex) const override
 
const component_data_tcomponent_data () const
 
component_data_tcomponent_data ()
 
const value_typeoperator[] (typename component_data_t::size_type aIndex) const
 
value_typeoperator[] (typename component_data_t::size_type aIndex)
 
- Public Member Functions inherited from neogfx::game::i_shared_component
template<typename ComponentData >
void * populate (const std::string &aName, ComponentData &&aComponentData)
 
- Public Member Functions inherited from neogfx::game::i_component_base
virtual ~i_component_base ()=default
 

Detailed Description

template<typename Data>
class neogfx::game::static_shared_component< Data >

Definition at line 464 of file component.hpp.

Member Typedef Documentation

◆ component_data_t

Definition at line 475 of file component.hpp.

◆ data_meta_type

Definition at line 473 of file component.hpp.

◆ data_type

template<typename Data >
typedef base_type::data_type neogfx::game::static_shared_component< Data >::data_type

Definition at line 472 of file component.hpp.

◆ mapped_type

template<typename Data >
typedef component_data_t::mapped_type neogfx::game::static_shared_component< Data >::mapped_type

Definition at line 476 of file component.hpp.

◆ value_type

template<typename Data >
typedef base_type::value_type neogfx::game::static_shared_component< Data >::value_type

Definition at line 474 of file component.hpp.

Constructor & Destructor Documentation

◆ static_shared_component()

template<typename Data >
neogfx::game::static_shared_component< Data >::static_shared_component ( game::i_ecs aEcs)
inline

Definition at line 478 of file component.hpp.

Member Function Documentation

◆ operator[]() [1/4]

template<typename Data >
const mapped_type& neogfx::game::static_shared_component< Data >::operator[] ( typename component_data_t::size_type  aIndex) const
inline

Definition at line 496 of file component.hpp.

◆ operator[]() [2/4]

template<typename Data >
mapped_type& neogfx::game::static_shared_component< Data >::operator[] ( typename component_data_t::size_type  aIndex)
inline

Definition at line 500 of file component.hpp.

◆ operator[]() [3/4]

template<typename Data >
const mapped_type& neogfx::game::static_shared_component< Data >::operator[] ( const std::string &  aName) const
inline

Definition at line 504 of file component.hpp.

◆ operator[]() [4/4]

template<typename Data >
mapped_type& neogfx::game::static_shared_component< Data >::operator[] ( const std::string &  aName)
inline

Definition at line 508 of file component.hpp.

◆ populate() [1/3]

template<typename Data >
mapped_type& neogfx::game::static_shared_component< Data >::populate ( const std::string &  aName,
const mapped_type aData 
)
inline

Definition at line 513 of file component.hpp.

◆ populate() [2/3]

template<typename Data >
mapped_type& neogfx::game::static_shared_component< Data >::populate ( const std::string &  aName,
mapped_type &&  aData 
)
inline

Definition at line 521 of file component.hpp.

◆ populate() [3/3]

template<typename Data >
void* neogfx::game::static_shared_component< Data >::populate ( const std::string &  aName,
const void *  aComponentData,
std::size_t  aComponentDataSize 
)
inlineoverridevirtual

Implements neogfx::game::i_shared_component.

Definition at line 529 of file component.hpp.


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