17 void SetRefHash(std::string hash) {
18 m_refHash = std::move(hash);
21 std::string GetRefHash()
const {
25 SComponent* GetSComponentByRefHash(
const std::string& hash)
const {
26 const auto& rawData = split(hash,
'?');
27 const auto& hashData = rawData[0];
28 const auto& componentName = rawData[1];
29 if(m_refHash == hashData) {
30 const auto& components = GetComponents();
31 for (
const auto& component : components) {
32 if(componentName == component->GetClassType()) {
39 const auto& children = GetChildren();
40 for(
const auto& child : children) {
42 if(component !=
nullptr)
49 T* GetComponentByRefHash(
const std::string& hash)
const;
51 std::string GetRefID(
const SComponent* component)
const {
52 if (component ==
nullptr)
return "";
55 return object->m_refHash +
"?" + component->GetClassType();
59 std::string m_refHash;