mirror of
https://github.com/BlackMATov/meta.hpp.git
synced 2025-12-13 03:08:49 +07:00
8.3 KiB
8.3 KiB
API Binds
Classes
array_bind
template < array_kind Array >
class array_bind final : public type_bind_base<array_type> {
public:
explicit array_bind(metadata_map metadata);
};
class_bind
template < class_kind Class >
class class_bind final : public type_bind_base<class_type> {
public:
explicit class_bind(metadata_map metadata);
template < typename... Args, typename... Opts >
requires class_constructor_kind<Class, Args...>
class_bind& constructor_(Opts&&... opts);
template < typename... Opts >
requires class_destructor_kind<Class>
class_bind& destructor_(Opts&&... opts);
template < function_pointer_kind Function, typename... Opts >
class_bind& function_(std::string name, Function function_ptr, Opts&&... opts);
template < class_member_pointer_kind<Class> Member, typename... Opts >
class_bind& member_(std::string name, Member member_ptr, Opts&&... opts);
template < class_method_pointer_kind<Class> Method, typename... Opts >
class_bind& method_(std::string name, Method method_ptr, Opts&&... opts);
template < typename Type >
class_bind& typedef_(std::string name);
template < pointer_kind Pointer, typename... Opts >
class_bind& variable_(std::string name, Pointer variable_ptr, Opts&&... opts);
};
enum_bind
template < enum_kind Enum >
class enum_bind final : public type_bind_base<enum_type> {
public:
explicit enum_bind(metadata_map metadata);
template < typename... Opts >
enum_bind& evalue_(std::string name, Enum value, Opts&&... opts);
};
function_bind
template < function_kind Function >
class function_bind final : public type_bind_base<function_type> {
public:
explicit function_bind(metadata_map metadata);
};
member_bind
template < member_pointer_kind Member >
class member_bind final : public type_bind_base<member_type> {
public:
explicit member_bind(metadata_map metadata);
};
method_bind
template < method_pointer_kind Method >
class method_bind final : public type_bind_base<method_type> {
public:
explicit method_bind(metadata_map metadata);
};
nullptr_bind
template < nullptr_kind Nullptr >
class nullptr_bind final : public type_bind_base<nullptr_type> {
public:
explicit nullptr_bind(metadata_map metadata);
};
number_bind
template < number_kind Number >
class number_bind final : public type_bind_base<number_type> {
public:
explicit number_bind(metadata_map metadata);
};
pointer_bind
template < pointer_kind Pointer >
class pointer_bind final : public type_bind_base<pointer_type> {
public:
explicit pointer_bind(metadata_map metadata);
};
reference_bind
template < reference_kind Reference >
class reference_bind final : public type_bind_base<reference_type> {
public:
explicit reference_bind(metadata_map metadata);
};
void_bind
template < void_kind Void >
class void_bind final : public type_bind_base<void_type> {
public:
explicit void_bind(metadata_map metadata);
};
scope_bind
class scope_bind final : public state_bind_base<scope> {
public:
explicit scope_bind(const scope& scope, metadata_map metadata);
template < function_pointer_kind Function, typename... Opts >
scope_bind& function_(std::string name, Function function_ptr, Opts&&... opts);
template < typename Type >
scope_bind& typedef_(std::string name);
template < pointer_kind Pointer, typename... Opts >
scope_bind& variable_(std::string name, Pointer variable_ptr, Opts&&... opts);
};
arguments_bind
class arguments_bind final {
public:
arguments_bind() = default;
~arguments_bind() = default;
arguments_bind(arguments_bind&&) = default;
arguments_bind& operator=(arguments_bind&&) = default;
arguments_bind(const arguments_bind&) = delete;
arguments_bind& operator=(const arguments_bind&) = delete;
arguments_bind& operator()(std::string name) &;
arguments_bind operator()(std::string name) &&;
arguments_bind& operator()(std::string name, metadata_map metadata) &;
arguments_bind operator()(std::string name, metadata_map metadata) &&;
arguments_bind& operator()(arguments_bind bind) &;
arguments_bind operator()(arguments_bind bind) &&;
private:
values_t values_;
};
metadata_bind
class metadata_bind final {
public:
metadata_bind() = default;
~metadata_bind() = default;
metadata_bind(metadata_bind&&) = default;
metadata_bind& operator=(metadata_bind&&) = default;
metadata_bind(const metadata_bind&) = delete;
metadata_bind& operator=(const metadata_bind&) = delete;
metadata_bind& operator()(std::string name, uvalue value) &;
metadata_bind operator()(std::string name, uvalue value) &&;
metadata_bind& operator()(metadata_bind bind) &;
metadata_bind operator()(metadata_bind bind) &&;
};
Functions
bind_
template < typename T >
auto bind_(metadata_map metadata = {});
array_
template < array_kind Array >
array_bind<Array> array_(metadata_map metadata = {});
class_
template < class_kind Class >
class_bind<Class> class_(metadata_map metadata = {});
enum_
template < enum_kind Enum >
enum_bind<Enum> enum_(metadata_map metadata = {});
function_
template < function_kind Function >
function_bind<Function> function_(metadata_map metadata = {});
member_
template < member_pointer_kind Member >
member_bind<Member> member_(metadata_map metadata = {});
method_
template < method_pointer_kind Method >
method_bind<Method> method_(metadata_map metadata = {});
nullptr_
template < nullptr_kind Nullptr >
nullptr_bind<Nullptr> nullptr_(metadata_map metadata = {});
number_
template < number_kind Number >
number_bind<Number> number_(metadata_map metadata = {});
pointer_
template < pointer_kind Pointer >
pointer_bind<Pointer> pointer_(metadata_map metadata = {});
reference_
template < reference_kind Reference >
reference_bind<Reference> reference_(metadata_map metadata = {});
void_
template < void_kind Void >
void_bind<Void> void_(metadata_map metadata = {});
local_scope_
scope_bind local_scope_(std::string name, metadata_map metadata = {});
static_scope_
scope_bind static_scope_(std::string_view name, metadata_map metadata = {});
extend_scope_
scope_bind extend_scope_(const scope& scope, metadata_map metadata = {});
purge_
template < type_family Type >
void purge_(const Type& type);
template < state_family State >
void purge_(const State& state);
purge_binds_
template < type_family Type >
void purge_binds_(const Type& type);
template < state_family State >
void purge_binds_(const State& state);
purge_metadata_
template < type_family Type >
void purge_metadata_(const Type& type);
template < state_family State >
void purge_metadata_(const State& state);
arguments_
arguments_bind arguments_();
metadata_
metadata_bind metadata_();