#include <ComponentReflection.h>
|
| ComponentReflection () |
| ~ComponentReflection ()=default |
const std::unordered_map< std::string, ComponentInfo > & | getComponentInfos () const |
bool | hasComponent (entt::registry ®istry, entt::entity entity, const std::string &componentName) const |
ComponentValue | getComponentField (entt::registry ®istry, entt::entity entity, const std::string &componentName, const std::string &fieldName) const |
void | setComponentField (entt::registry ®istry, entt::entity entity, const std::string &componentName, const std::string &fieldName, const ComponentValue &value) const |
void | addComponent (entt::registry ®istry, entt::entity entity, const std::string &componentName) const |
void | removeComponent (entt::registry ®istry, entt::entity entity, const std::string &componentName) const |
std::vector< std::string > | getComponentFieldNames (const std::string &componentName) const |
std::string | getComponentFieldType (const std::string &componentName, const std::string &fieldName) const |
std::vector< std::string > | getRegisteredComponentNames () const |
◆ ComponentReflection()
MQEngine::ComponentReflection::ComponentReflection |
( |
| ) |
|
◆ ~ComponentReflection()
MQEngine::ComponentReflection::~ComponentReflection |
( |
| ) |
|
|
default |
◆ addComponent()
void MQEngine::ComponentReflection::addComponent |
( |
entt::registry & | registry, |
|
|
entt::entity | entity, |
|
|
const std::string & | componentName ) const |
◆ getComponentField()
ComponentValue MQEngine::ComponentReflection::getComponentField |
( |
entt::registry & | registry, |
|
|
entt::entity | entity, |
|
|
const std::string & | componentName, |
|
|
const std::string & | fieldName ) const |
◆ getComponentFieldNames()
std::vector< std::string > MQEngine::ComponentReflection::getComponentFieldNames |
( |
const std::string & | componentName | ) |
const |
◆ getComponentFieldType()
std::string MQEngine::ComponentReflection::getComponentFieldType |
( |
const std::string & | componentName, |
|
|
const std::string & | fieldName ) const |
◆ getComponentInfos()
const std::unordered_map< std::string, ComponentInfo > & MQEngine::ComponentReflection::getComponentInfos |
( |
| ) |
const |
◆ getRegisteredComponentNames()
std::vector< std::string > MQEngine::ComponentReflection::getRegisteredComponentNames |
( |
| ) |
const |
◆ hasComponent()
bool MQEngine::ComponentReflection::hasComponent |
( |
entt::registry & | registry, |
|
|
entt::entity | entity, |
|
|
const std::string & | componentName ) const |
◆ registerComponent()
template<typename T>
void MQEngine::ComponentReflection::registerComponent |
( |
const std::string & | name | ) |
|
|
private |
◆ removeComponent()
void MQEngine::ComponentReflection::removeComponent |
( |
entt::registry & | registry, |
|
|
entt::entity | entity, |
|
|
const std::string & | componentName ) const |
◆ setComponentField()
void MQEngine::ComponentReflection::setComponentField |
( |
entt::registry & | registry, |
|
|
entt::entity | entity, |
|
|
const std::string & | componentName, |
|
|
const std::string & | fieldName, |
|
|
const ComponentValue & | value ) const |
◆ m_componentInfos
std::unordered_map<std::string, ComponentInfo> MQEngine::ComponentReflection::m_componentInfos |
|
private |
该类的文档由以下文件生成: