feat(mcp): Finalize C/C++ AST tools with robust testing and bug fixes

This commit is contained in:
2026-05-05 20:08:51 -04:00
parent 584e8e526e
commit 992e206769
10 changed files with 468 additions and 230 deletions
@@ -0,0 +1,26 @@
#include "component_registry.h"
#include <iostream>
namespace gencpp {
namespace registry {
ComponentRegistry& ComponentRegistry::Instance() {
static ComponentRegistry instance;
return instance;
}
void ComponentRegistry::Register(const std::string& type, ComponentCreator creator) {
std::cout << "Registering component type: " << type << std::endl;
m_creators[type] = creator;
}
std::unique_ptr<core::BaseComponent<void*>> ComponentRegistry::Create(const std::string& type) {
auto it = m_creators.find(type);
if (it != m_creators.end()) {
return it->second();
}
return nullptr;
}
} // namespace registry
} // namespace gencpp