feat(mcp): Validate C++ tools against real-world gencpp components and improve enum support

This commit is contained in:
2026-05-05 20:40:21 -04:00
parent a809a6e213
commit 904dabe6a1
12 changed files with 6643 additions and 53 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