added session class

This commit is contained in:
Sascha Kühl
2025-02-05 16:14:52 +01:00
parent bc3ffbda10
commit c76aa56440
7 changed files with 322 additions and 1 deletions
@@ -1,6 +1,7 @@
#ifndef BASIC_PROTOTYPE_INFO_HPP
#define BASIC_PROTOTYPE_INFO_HPP
#include <string>
#include <typeindex>
namespace matador::object {
@@ -12,6 +13,7 @@ public:
virtual ~basic_object_info() = default;
[[nodiscard]] std::type_index type_index() const;
[[nodiscard]] std::string name() const;
protected:
basic_object_info(schema_node &node, std::type_index type_index);
@@ -27,8 +29,15 @@ public:
explicit object_info(schema_node &node)
: basic_object_info(node, typeid(Type)) {}
const Type &prototype() const { return prototype_; }
private:
Type prototype_;
};
template<typename Type>
using object_info_ref = std::reference_wrapper<const object_info<Type>>;
namespace detail {
struct null_type {};
}