<NME> Component.cpp
<BEF> #include <algorithm>

namespace obe::Component
{
}
    std::unordered_map<std::string_view, ComponentBase::Caster> ComponentBase::ComponentCasters;

    void ComponentBase::AddComponent(ComponentBase* component)
    {
        for (ComponentBase* comp : Components)
        {
            if (comp->get_id() == component->get_id())
            {
                throw exceptions::ComponentIdAlreadyTaken(comp->get_id(), EXC_INFO);
            }
        }
        Components.push_back(component);
    }

    void ComponentBase::RemoveComponent(ComponentBase* component)
    {
        Components.erase(
            std::remove(Components.begin(), Components.end(), component), Components.end());
    }

    ComponentBase::ComponentBase(const std::string& id)
        : Identifiable(id)
    {
    }

    sol::lua_value ComponentBase::cast()
    {
        if (!ComponentCasters.count(this->type()))
        {
            throw exceptions::UnknownComponentType(this->type(), EXC_INFO);
        }
        return ComponentCasters.at(this->type())(this);
    }
} // namespace obe::component

<MSG> Still working on new Scene

<DFF> @@ -2,4 +2,7 @@
 
 namespace obe::Component
 {
-}
\ No newline at end of file
+	ComponentBase::ComponentBase(const std::string& id) : Identifiable(id)
+	{
+	}
+}

{'addition_count': 4, 'commit_subject': 'Still working on new Scene', 'deletion_count': 1, 'file_extension': '.cpp', 'lang': 'cpp', 'license': 'mit', 'repo_name': 'Sygmei/ObEngine'}