feat(mcp): Validate C++ tools against real-world gencpp components and improve enum support
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace gencpp {
|
||||
namespace core {
|
||||
|
||||
/**
|
||||
* @brief Base class for all components in the system.
|
||||
*/
|
||||
template <typename T>
|
||||
class BaseComponent {
|
||||
public:
|
||||
virtual ~BaseComponent() = default;
|
||||
|
||||
virtual void Initialize() = 0;
|
||||
virtual void Shutdown() = 0;
|
||||
|
||||
virtual const std::string& GetName() const = 0;
|
||||
|
||||
struct Config {
|
||||
std::string name;
|
||||
int priority;
|
||||
bool enabled;
|
||||
|
||||
class Metadata {
|
||||
public:
|
||||
std::string author;
|
||||
std::string version;
|
||||
};
|
||||
Metadata metadata;
|
||||
};
|
||||
|
||||
protected:
|
||||
BaseComponent(const Config& config) : m_config(config) {}
|
||||
Config m_config;
|
||||
};
|
||||
|
||||
} // namespace core
|
||||
} // namespace gencpp
|
||||
Reference in New Issue
Block a user