added session class
This commit is contained in:
@@ -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 {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user