neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neolib::ecs::shared_component< Data > Class Template Reference

#include <component.hpp>

Inheritance diagram for neolib::ecs::shared_component< Data >:
neolib::ecs::component_base< shared< ecs_data_type_t< Data > >, i_shared_component > neolib::ecs::i_shared_component neolib::ecs::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 neolib::ecs::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

 shared_component (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)
 
shared< mapped_typepopulate (const std::string &aName, const mapped_type &aData)
 
shared< mapped_typepopulate (const std::string &aName, mapped_type &&aData)
 
const voidpopulate (const std::string &aName, const void *aComponentData, std::size_t aComponentDataSize) override
 
- Public Member Functions inherited from neolib::ecs::component_base< shared< ecs_data_type_t< Data > >, i_shared_component >
 component_base (i_ecs &aEcs)
 
 component_base (const self_type &aOther)
 
self_type & operator= (const self_type &aRhs)
 
i_ecsecs () const override
 
const component_idid () const override
 
component_mutex< shared< ecs_data_type_t< Data > > > & mutex () const override
 
bool is_data_optional () const override
 
const neolib::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 neolib::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 neolib::ecs::i_shared_component
template<typename ComponentData >
const voidpopulate (const std::string &aName, ComponentData &&aComponentData)
 
- Public Member Functions inherited from neolib::ecs::i_component_base
virtual ~i_component_base ()=default
 

Detailed Description

template<typename Data>
class neolib::ecs::shared_component< Data >

Definition at line 524 of file component.hpp.

Member Typedef Documentation

◆ component_data_t

Definition at line 535 of file component.hpp.

◆ data_meta_type

Definition at line 533 of file component.hpp.

◆ data_type

Definition at line 532 of file component.hpp.

◆ mapped_type

template<typename Data >
typedef component_data_t::mapped_type neolib::ecs::shared_component< Data >::mapped_type

Definition at line 536 of file component.hpp.

◆ value_type

Definition at line 534 of file component.hpp.

Constructor & Destructor Documentation

◆ shared_component()

template<typename Data >
neolib::ecs::shared_component< Data >::shared_component ( i_ecs aEcs)
inline

Definition at line 538 of file component.hpp.

Member Function Documentation

◆ operator[]() [1/4]

template<typename Data >
mapped_type & neolib::ecs::shared_component< Data >::operator[] ( const std::string &  aName)
inline

Definition at line 568 of file component.hpp.

◆ operator[]() [2/4]

template<typename Data >
const mapped_type & neolib::ecs::shared_component< Data >::operator[] ( const std::string &  aName) const
inline

Definition at line 564 of file component.hpp.

◆ operator[]() [3/4]

template<typename Data >
mapped_type & neolib::ecs::shared_component< Data >::operator[] ( typename component_data_t::size_type  aIndex)
inline

Definition at line 560 of file component.hpp.

◆ operator[]() [4/4]

template<typename Data >
const mapped_type & neolib::ecs::shared_component< Data >::operator[] ( typename component_data_t::size_type  aIndex) const
inline

Definition at line 556 of file component.hpp.

◆ populate() [1/3]

template<typename Data >
shared< mapped_type > neolib::ecs::shared_component< Data >::populate ( const std::string &  aName,
const mapped_type aData 
)
inline

Definition at line 573 of file component.hpp.

◆ populate() [2/3]

template<typename Data >
const void * neolib::ecs::shared_component< Data >::populate ( const std::string &  aName,
const void aComponentData,
std::size_t  aComponentDataSize 
)
inlineoverridevirtual

Implements neolib::ecs::i_shared_component.

Definition at line 589 of file component.hpp.

◆ populate() [3/3]

template<typename Data >
shared< mapped_type > neolib::ecs::shared_component< Data >::populate ( const std::string &  aName,
mapped_type &&  aData 
)
inline

Definition at line 581 of file component.hpp.


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