get_ctors -> get_constructors

This commit is contained in:
BlackMATov
2022-02-14 16:49:40 +07:00
parent bbcbebd76e
commit 836b404a70
4 changed files with 10 additions and 10 deletions

View File

@@ -156,8 +156,8 @@ namespace meta_hpp
[[nodiscard]] const std::vector<any_type>& get_argument_types() const noexcept;
[[nodiscard]] const class_set& get_bases() const noexcept;
[[nodiscard]] const constructor_map& get_ctors() const noexcept;
[[nodiscard]] const destructor_map& get_dtors() const noexcept;
[[nodiscard]] const constructor_map& get_constructors() const noexcept;
[[nodiscard]] const destructor_map& get_destructors() const noexcept;
[[nodiscard]] const function_map& get_functions() const noexcept;
[[nodiscard]] const member_map& get_members() const noexcept;
[[nodiscard]] const method_map& get_methods() const noexcept;

View File

@@ -77,11 +77,11 @@ namespace meta_hpp
return data_->bases;
}
inline const constructor_map& class_type::get_ctors() const noexcept {
inline const constructor_map& class_type::get_constructors() const noexcept {
return data_->constructors;
}
inline const destructor_map& class_type::get_dtors() const noexcept {
inline const destructor_map& class_type::get_destructors() const noexcept {
return data_->destructors;
}

View File

@@ -183,11 +183,11 @@ TEST_CASE("meta/meta_types/class_type") {
}
}
SUBCASE("get_ctors") {
CHECK(base_clazz_1_type.get_ctors().size() == 1);
CHECK(base_clazz_2_type.get_ctors().size() == 1);
CHECK(derived_clazz_type.get_ctors().size() == 1);
CHECK(final_derived_clazz_type.get_ctors().size() == 1);
SUBCASE("get_constructors") {
CHECK(base_clazz_1_type.get_constructors().size() == 1);
CHECK(base_clazz_2_type.get_constructors().size() == 1);
CHECK(derived_clazz_type.get_constructors().size() == 1);
CHECK(final_derived_clazz_type.get_constructors().size() == 1);
}
SUBCASE("get_bases") {

View File

@@ -54,7 +54,7 @@ TEST_CASE("meta/meta_utilities/hash") {
const meta::class_type ivec2_type = meta::resolve_type<ivec2>();
const meta::constructor ivec2_ctor = ivec2_type.get_constructor_with<int>();
const meta::destructor ivec2_dtor = ivec2_type.get_dtors().begin()->second;
const meta::destructor ivec2_dtor = ivec2_type.get_destructors().begin()->second;
const meta::function ivec2_function = ivec2_type.get_function("iadd");
const meta::argument ivec2_function_arg = ivec2_function.get_argument(0);
const meta::member ivec2_member = ivec2_type.get_member("x");