#pragma once #include #include #include #include "type.hpp" namespace lily { class type_manager { private: int next_id; std::vector> types; std::map type_names; public: type_manager(); type_internal* create_int_type(); type_internal* create_str_type(); type_data* create_data_type(const std::string& name); template T* create_type(Args...as) { auto new_type = std::make_unique(as...); T* raw_ptr = new_type.get(); types.push_back(std::move(new_type)); return raw_ptr; } type* require_type(const std::string& name) const; }; }