Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #84

Merged
merged 32 commits into from
Feb 8, 2024
Merged

Dev #84

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
3158d1c
cmake doxygen target
BlackMATov Feb 5, 2024
a688f21
cleanup policies api
BlackMATov Feb 6, 2024
8467317
cleanup and simplify basic type concepts
BlackMATov Feb 6, 2024
5db1923
remove some redundant noexcepts
BlackMATov Feb 6, 2024
928221e
delete uvalue::try_as for rvalue values
BlackMATov Feb 6, 2024
fea2ddc
install doxygen on CI
BlackMATov Feb 6, 2024
121008c
fix member object/function uvalue/uarg casting
BlackMATov Feb 6, 2024
ed7ddce
cleanup uvalue api
BlackMATov Feb 6, 2024
e638fb2
cleanup uresult api
BlackMATov Feb 6, 2024
3efb47e
cleanup ucast api
BlackMATov Feb 6, 2024
4be5845
move type_kinds from base to detail
BlackMATov Feb 7, 2024
cccda1b
cleanup and simplify internal hash calculations
BlackMATov Feb 7, 2024
9a1afce
little meta_base cleanup
BlackMATov Feb 7, 2024
0dcd1b8
remove redundant argument bind functions
BlackMATov Feb 7, 2024
aaeca48
remove redundant bind functions
BlackMATov Feb 7, 2024
5ce1f5e
Merge branch 'dev' into feature/manuals
BlackMATov Feb 7, 2024
dc36a21
draft api structure
BlackMATov Feb 7, 2024
145f0d9
add some missed nodiscard
BlackMATov Feb 7, 2024
176ecd9
raw basics api
BlackMATov Feb 7, 2024
80d0b93
raw indices api
BlackMATov Feb 7, 2024
e218ac2
raw registry api
BlackMATov Feb 7, 2024
6e43f17
raw types api
BlackMATov Feb 7, 2024
9bc7333
raw states api
BlackMATov Feb 7, 2024
3e3e5b9
raw policies api
BlackMATov Feb 7, 2024
7db429b
raw invoke api
BlackMATov Feb 7, 2024
b682861
raw binds api
BlackMATov Feb 7, 2024
422d351
cleanup argument and metadata binds
BlackMATov Feb 8, 2024
9673a2a
cleanup type flags
BlackMATov Feb 8, 2024
4b30a1d
raw type flags api
BlackMATov Feb 8, 2024
db52c66
cleanup examples
BlackMATov Feb 8, 2024
b5a4628
delete doxygen cmake target
BlackMATov Feb 8, 2024
c1788f5
fix clang warnings
BlackMATov Feb 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,6 @@ target_link_libraries(your_project_target PUBLIC meta.hpp::meta.hpp)

Or just use the single-header version of the library, which you can find [here](develop/singles/headers/meta.hpp/meta_all.hpp).

## Manuals

- [class](develop/manuals/meta_manuals/class_manual.cpp)
- [enum](develop/manuals/meta_manuals/enum_manual.cpp)
- [function](develop/manuals/meta_manuals/function_manual.cpp)
- [inplace](develop/manuals/meta_manuals/inplace_manual.cpp)
- [member](develop/manuals/meta_manuals/member_manual.cpp)
- [metadata](develop/manuals/meta_manuals/metadata_manual.cpp)
- [method](develop/manuals/meta_manuals/method_manual.cpp)
- [scopes](develop/manuals/meta_manuals/scopes_manual.cpp)
- [ucast](develop/manuals/meta_manuals/ucast_manual.cpp)
- [uvalue](develop/manuals/meta_manuals/uvalue_manual.cpp)
- [variable](develop/manuals/meta_manuals/variable_manual.cpp)

## Features

- can reflect:
Expand All @@ -83,9 +69,23 @@ Or just use the single-header version of the library, which you can find [here](
- doesn't contain 3rd-party dependencies
- can be used without rtti and exceptions

## API
## Documentation

- [API Reference](./manuals/api.md)

### Examples

> coming soon
- [class](develop/manuals/meta_examples/class_example.cpp)
- [enum](develop/manuals/meta_examples/enum_example.cpp)
- [function](develop/manuals/meta_examples/function_example.cpp)
- [inplace](develop/manuals/meta_examples/inplace_example.cpp)
- [member](develop/manuals/meta_examples/member_example.cpp)
- [metadata](develop/manuals/meta_examples/metadata_example.cpp)
- [method](develop/manuals/meta_examples/method_example.cpp)
- [scopes](develop/manuals/meta_examples/scopes_example.cpp)
- [ucast](develop/manuals/meta_examples/ucast_example.cpp)
- [uvalue](develop/manuals/meta_examples/uvalue_example.cpp)
- [variable](develop/manuals/meta_examples/variable_example.cpp)

## Alternatives

Expand Down
1 change: 1 addition & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- type conversions
- fix all includes to work with the library more flexible
- remove ctor_type and dtor_type?
- add variadic variant of invoking to meta_invoke

## Version 1.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace
};
}

TEST_CASE("meta/meta_manuals/class/type") {
TEST_CASE("meta/meta_examples/class/type") {
namespace meta = meta_hpp;

// 'shape' class type registration
Expand Down Expand Up @@ -75,7 +75,7 @@ TEST_CASE("meta/meta_manuals/class/type") {
// + get_width/0
}

TEST_CASE("meta/meta_manuals/class/usage") {
TEST_CASE("meta/meta_examples/class/usage") {
namespace meta = meta_hpp;

// resolves a class type by static class type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace
};
}

TEST_CASE("meta/meta_manuals/enum/type") {
TEST_CASE("meta/meta_examples/enum/type") {
namespace meta = meta_hpp;

// 'align' enumeration type registration
Expand Down Expand Up @@ -51,7 +51,7 @@ TEST_CASE("meta/meta_manuals/enum/type") {
// - right/1
}

TEST_CASE("meta/meta_manuals/enum/usage") {
TEST_CASE("meta/meta_examples/enum/usage") {
namespace meta = meta_hpp;

const align e = align::center;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace
}
}

TEST_CASE("meta/meta_manuals/function/type") {
TEST_CASE("meta/meta_examples/function/type") {
namespace meta = meta_hpp;

// resolves a function type by reference
Expand All @@ -40,7 +40,7 @@ TEST_CASE("meta/meta_manuals/function/type") {
CHECK(add_function_type.get_argument_type(1) == meta::resolve_type<int>());
}

TEST_CASE("meta/meta_manuals/function/usage") {
TEST_CASE("meta/meta_examples/function/usage") {
namespace meta = meta_hpp;

// 'math' local scope declaration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace
};
}

TEST_CASE("meta/meta_manuals/inplace") {
TEST_CASE("meta/meta_examples/inplace") {
namespace meta = meta_hpp;

// 'ivec2' class type registration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace
};
}

TEST_CASE("meta/meta_manuals/member/type") {
TEST_CASE("meta/meta_examples/member/type") {
namespace meta = meta_hpp;

// 'ivec2' class type registration
Expand All @@ -38,7 +38,7 @@ TEST_CASE("meta/meta_manuals/member/type") {
CHECK(x_member_type.get_value_type() == meta::resolve_type<int>());
}

TEST_CASE("meta/meta_manuals/member/usage") {
TEST_CASE("meta/meta_examples/member/usage") {
namespace meta = meta_hpp;

ivec2 v{42, 21};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace
}
}

TEST_CASE("meta/meta_manuals/metadata") {
TEST_CASE("meta/meta_examples/metadata") {
namespace meta = meta_hpp;
using namespace std::literals;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace
};
}

TEST_CASE("meta/meta_manuals/method/type") {
TEST_CASE("meta/meta_examples/method/type") {
namespace meta = meta_hpp;

// 'ivec2' class type registration
Expand All @@ -53,7 +53,7 @@ TEST_CASE("meta/meta_manuals/method/type") {
CHECK(add_method_type.get_argument_type(0) == meta::resolve_type<const ivec2&>());
}

TEST_CASE("meta/meta_manuals/method/usage") {
TEST_CASE("meta/meta_examples/method/usage") {
namespace meta = meta_hpp;

ivec2 v{20, 10};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace
}
}

TEST_CASE("meta/meta_manuals/scopes/local") {
TEST_CASE("meta/meta_examples/scopes/local") {
namespace meta = meta_hpp;

// creates new local scope
Expand Down Expand Up @@ -85,18 +85,18 @@ TEST_CASE("meta/meta_manuals/scopes/local") {
CHECK(dot3_function(unit3_variable.get(), unit3_variable.get()).as<int>() == 3);
}

TEST_CASE("meta/meta_manuals/scopes/global") {
TEST_CASE("meta/meta_examples/scopes/global") {
namespace meta = meta_hpp;

// also, we can create global scopes
meta::static_scope_("meta/meta_manuals/scopes/global/math")
meta::static_scope_("meta/meta_examples/scopes/global/math")
.function_("dot2", &dot2)
.function_("dot3", &dot3)
.variable_("unit2", &unit2)
.variable_("unit3", &unit3);

// finds our global scope by name
const meta::scope math_scope = meta::resolve_scope("meta/meta_manuals/scopes/global/math");
const meta::scope math_scope = meta::resolve_scope("meta/meta_examples/scopes/global/math");

// and uses it in the same way
const meta::function dot2_function = math_scope.get_function("dot2");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace
};
}

TEST_CASE("meta/meta_manuals/ucast") {
TEST_CASE("meta/meta_examples/ucast") {
namespace meta = meta_hpp;

C c{};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace
};
}

TEST_CASE("meta/meta_manuals/uvalue") {
TEST_CASE("meta/meta_examples/uvalue/bind") {
namespace meta = meta_hpp;

// 'shape' class type registration
Expand All @@ -59,7 +59,7 @@ TEST_CASE("meta/meta_manuals/uvalue") {
.method_("get_height", &rectangle::get_height);
}

TEST_CASE("meta/meta_manuals/uvalue/usage") {
TEST_CASE("meta/meta_examples/uvalue/usage") {
namespace meta = meta_hpp;

// the 'uvalue' class allows to store any typed value inside
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace
const double sqrt2_v{1.4142135624};
}

TEST_CASE("meta/meta_manuals/variable/usage") {
TEST_CASE("meta/meta_examples/variable/usage") {
namespace meta = meta_hpp;

// 'constants' local scope declaration
Expand Down
Loading