<commit_before>#include "pixelboost/logic/entity.h"

namespace pb
{

template <class T>T* Scene::GetSystemByType()
{
    SystemMap::iterator it = _Systems.find(T::GetStaticType());
    if (it != _Systems.end())
    {
        return static_cast<T*>(it->second);
    }
    return 0;    
}

template <class T> Scene::EntityMap Scene::GetEntitiesByType()
{
    EntityMap entities;
    
    for (EntityMap::iterator it = _Entities.begin(); it != _Entities.end(); ++it)
    {
        if (it->second->GetType() == T::GetStaticType())
        {
            entities[it->first] = it->second;
        }
    }
    
    return entities;
}

}<commit_msg>Add the ability to query new entities<commit_after>#include "pixelboost/logic/entity.h"

namespace pb
{

template <class T>T* Scene::GetSystemByType()
{
    SystemMap::iterator it = _Systems.find(T::GetStaticType());
    if (it != _Systems.end())
    {
        return static_cast<T*>(it->second);
    }
    return 0;    
}

template <class T> Scene::EntityMap Scene::GetEntitiesByType()
{
    EntityMap entities;
    
    for (EntityMap::iterator it = _Entities.begin(); it != _Entities.end(); ++it)
    {
        if (it->second->GetType() == T::GetStaticType())
        {
            entities[it->first] = it->second;
        }
    }
    
    for (EntityMap::iterator it = _NewEntities.begin(); it != _NewEntities.end(); ++it)
    {
        if (it->second->GetType() == T::GetStaticType())
        {
            entities[it->first] = it->second;
        }
    }
    
    return entities;
}

}
{'fraction_non_alphanumeric': 0.1636245110821382, 'fraction_numerical': 0.001303780964797914, 'mean_word_length': 2.603286384976526, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6329130', 'n_tokens_mistral': 511, 'n_tokens_neox': 512, 'n_words': 96}