Skip to content

Commit e4597f3

Browse files
committed
Update documentation
1 parent f90bbf0 commit e4597f3

36 files changed

Lines changed: 543 additions & 59 deletions

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.28)
22

3-
project(msft_proxy4 VERSION 4.0.2 LANGUAGES CXX)
3+
project(msft_proxy4 VERSION 4.1.0 LANGUAGES CXX)
44
add_library(msft_proxy4 INTERFACE)
55
set_target_properties(msft_proxy4 PROPERTIES EXPORT_NAME proxy)
66
add_library(msft_proxy4::proxy ALIAS msft_proxy4)

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module(
22
name = "proxy",
3-
version = "4.0.2",
3+
version = "4.1.0",
44
)
55

66
bazel_dep(name = "platforms", version = "1.1.0")

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ The "Proxy" library is a self-contained solution for runtime polymorphism in C++
216216
- **Concepts**: To facilitate template programming with "Proxy", 3 concepts are exported from a facade type. Namely, [`proxiable`](https://ngcpp.github.io/proxy/spec/proxiable), [`proxiable_target`](https://ngcpp.github.io/proxy/spec/proxiable_target) and [`inplace_proxiable_target`](https://ngcpp.github.io/proxy/spec/inplace_proxiable_target).
217217
- **Allocator awareness**: [function template `allocate_proxy`](https://ngcpp.github.io/proxy/spec/allocate_proxy) is able to create a `proxy` from a value with any custom allocator. In C++11, [`std::function`](https://en.cppreference.com/w/cpp/utility/functional/function) and [`std::packaged_task`](https://en.cppreference.com/w/cpp/thread/packaged_task) had constructors that accepted custom allocators for performance tuning, but these were [removed in C++17](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0302r1.html) because "the semantics are unclear, and there are technical issues with storing an allocator in a type-erased context and then recovering that allocator later for any allocations needed during copy assignment". These issues do not apply to `allocate_proxy`.
218218
- **Configurable constraints**: [`facade_builder`](https://ngcpp.github.io/proxy/spec/basic_facade_builder) provides full support for constraints configuration, including memory layout (by [`restrict_layout`](https://ngcpp.github.io/proxy/spec/basic_facade_builder/restrict_layout)), copyability (by [`support_copy`](https://ngcpp.github.io/proxy/spec/basic_facade_builder/support_copy)), relocatability (by [`support_relocation`](https://ngcpp.github.io/proxy/spec/basic_facade_builder/support_relocation)), and destructibility (by [`support_destruction`](https://ngcpp.github.io/proxy/spec/basic_facade_builder/support_destruction)).
219-
- **Reflection**: `proxy` supports type-based compile-time reflection for runtime queries. Please refer to [`facade_builder::add_reflection`](https://ngcpp.github.io/proxy/spec/basic_facade_builder/add_reflection) and [function template `proxy_reflect`](https://ngcpp.github.io/proxy/spec/proxy_reflect) for more details.
219+
- **Reflection**: `proxy` supports type-based compile-time reflection for runtime queries. Please refer to [`facade_builder::add_reflection`](https://ngcpp.github.io/proxy/spec/basic_facade_builder/add_reflection) and [function template `reflect`](https://ngcpp.github.io/proxy/spec/proxy_indirect_accessor/reflect) for more details.
220220
- **Non-owning proxy**: Although `proxy` can manage the lifetime of an object effectively, similar to a smart pointer, we sometimes want to dereference it before passing to a non-owning context. This has been implemented as an extension since 3.2.0. Please refer to [function template `make_proxy_view`](https://ngcpp.github.io/proxy/spec/make_proxy_view), [alias template `proxy_view`, class template `observer_facade`](https://ngcpp.github.io/proxy/spec/proxy_view) and [`skills::as_view`](https://ngcpp.github.io/proxy/spec/skills_as_view) for more details.
221221
- **RTTI**: [RTTI (run-time type information)](https://en.wikipedia.org/wiki/Run-time_type_information) provides "weak" reflection capability in C++ since the last century. Although it is not as powerful as reflection in some other languages (like `Object.GetType()` in C# or `Object.getClass()` in Java), it offers the basic infrastructure for type-safe casting at runtime. Since 4.0.0, "RTTI for `proxy`" has been implemented as an extension and allows users to opt-in for each facade definition. Please refer to [`skills::rtti`](https://ngcpp.github.io/proxy/spec/skills_rtti) for more details.
222222
- **Shared and weak ownership**: Although `proxy` can be created from a [`std::shared_ptr`](https://en.cppreference.com/w/cpp/memory/shared_ptr), extensions are available to create `proxy` objects with shared and weak ownership in a more efficient way since 3.3.0. Please refer to [function template `make_proxy_shared`](https://ngcpp.github.io/proxy/spec/make_proxy_shared), [`allocate_proxy_shared`](https://ngcpp.github.io/proxy/spec/allocate_proxy_shared), [alias template `weak_proxy`, class template `weak_facade`](https://ngcpp.github.io/proxy/spec/weak_proxy) and [`skills::as_weak`](https://ngcpp.github.io/proxy/spec/skills_as_weak) for more details.
@@ -243,7 +243,7 @@ Fetch via [CPM](https://github.com/cpm-cmake/CPM.cmake) (a thin wrapper over CMa
243243
```cmake
244244
CPMAddPackage(
245245
NAME msft_proxy4
246-
GIT_TAG 4.0.2
246+
GIT_TAG 4.1.0
247247
GIT_REPOSITORY https://github.com/ngcpp/proxy.git
248248
)
249249
@@ -259,7 +259,7 @@ Place a wrap file at `subprojects/proxy.wrap` and Meson will fetch the source au
259259
```ini
260260
[wrap-git]
261261
url = https://github.com/ngcpp/proxy.git
262-
revision = 4.0.2
262+
revision = 4.1.0
263263

264264
[provide]
265265
dependency_names = msft_proxy4

docs/spec/.pages

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ nav:
1515
- is_bitwise_trivially_relocatable: is_bitwise_trivially_relocatable.md
1616
- not_implemented: not_implemented.md
1717
- operator_dispatch: operator_dispatch
18-
- proxy_indirect_accessor: proxy_indirect_accessor.md
18+
- proxy_indirect_accessor: proxy_indirect_accessor
1919
- proxy_view<br />observer_facade: proxy_view.md
2020
- proxy: proxy
2121
- substitution_dispatch: substitution_dispatch

docs/spec/PRO_DEF_FREE_AS_MEM_DISPATCH.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct dispatch_name {
4242
template <class P, class D, class R, class... Args>
4343
struct accessor<P, D, R(Args...) cv ref noex> {
4444
R accessibility_func_name(Args... args) cv ref noex {
45-
return pro::proxy_invoke<D, R(Args...) cv ref noex>(static_cast<P cv <ref ? ref : &>>(*this), std::forward<Args>(args)...);
45+
return invoke<D, R(Args...) cv ref noex>(static_cast<P cv <ref ? ref : &>>(*this), std::forward<Args>(args)...);
4646
}
4747
};
4848
}

docs/spec/PRO_DEF_FREE_DISPATCH.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ struct dispatch_name {
3939
template <class P, class D, class R, class... Args>
4040
struct accessor<P, D, R(Args...) cv ref noex> {
4141
friend R accessibility_func_name(P cv <ref ? ref : &> self, Args... args) noex {
42-
return pro::proxy_invoke<D, R(Args...) cv ref noex>(static_cast<P cv <ref ? ref : &>>(self), std::forward<Args>(args)...);
42+
return invoke<D, R(Args...) cv ref noex>(static_cast<P cv <ref ? ref : &>>(self), std::forward<Args>(args)...);
4343
}
4444
};
4545
}

docs/spec/PRO_DEF_MEM_DISPATCH.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct dispatch_name {
4141
template <class P, class D, class R, class... Args>
4242
struct accessor<P, D, R(Args...) cv ref noex> {
4343
R accessibility_func_name(Args... args) cv ref noex {
44-
return pro::proxy_invoke<D, R(Args...) cv ref noex>(static_cast<P cv <ref ? ref : &>>(*this), std::forward<Args>(args)...);
44+
return invoke<D, R(Args...) cv ref noex>(static_cast<P cv <ref ? ref : &>>(*this), std::forward<Args>(args)...);
4545
}
4646
};
4747
}

docs/spec/ProAccessible.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ A type `T` meets the *ProAccessible* requirements of types `Args...` if the foll
99
## See Also
1010

1111
- [class template `proxy`](proxy/README.md)
12-
- [class template `proxy_indirect_accessor`](proxy_indirect_accessor.md)
12+
- [class template `proxy_indirect_accessor`](proxy_indirect_accessor/README.md)

docs/spec/README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This document provides the API specifications for the C++ library Proxy (version
2828
| [`is_bitwise_trivially_relocatable`](is_bitwise_trivially_relocatable.md) | Specifies whether a type is bitwise trivially relocatable |
2929
| [`not_implemented` ](not_implemented.md) | Exception thrown by `weak_dispatch` for the default implementation |
3030
| [`operator_dispatch`](operator_dispatch/README.md) | Dispatch type for operator expressions with accessibility |
31-
| [`proxy_indirect_accessor`](proxy_indirect_accessor.md) | Provides indirection accessibility for `proxy` |
31+
| [`proxy_indirect_accessor`](proxy_indirect_accessor/README.md) | Provides indirection accessibility for `proxy` |
3232
| [`proxy_view`<br />`observer_facade`](proxy_view.md) | Non-owning `proxy` optimized for raw pointer types |
3333
| [`proxy`](proxy/README.md) | Wraps a pointer object matching specified facade |
3434
| [`substitution_dispatch`](substitution_dispatch/README.md) | Dispatch type for `proxy` substitution with accessibility |
@@ -55,8 +55,18 @@ This document provides the API specifications for the C++ library Proxy (version
5555
| [`make_proxy_shared`](make_proxy_shared.md) | Creates a `proxy` object with shared ownership |
5656
| [`make_proxy_view`](make_proxy_view.md) | Creates a `proxy_view` object |
5757
| [`make_proxy`](make_proxy.md) | Creates a `proxy` object potentially with heap allocation |
58-
| [`proxy_invoke`](proxy_invoke.md) | Invokes a `proxy` with a specified convention |
59-
| [`proxy_reflect`](proxy_reflect.md) | Acquires reflection information of a contained type |
58+
| [`proxy_invoke`](proxy_invoke.md) | (Deprecated since 4.1.0; use [`invoke`](proxy_indirect_accessor/invoke.md)) Invokes a `proxy` with a specified convention |
59+
| [`proxy_reflect`](proxy_reflect.md) | (Deprecated since 4.1.0; use [`reflect`](proxy_indirect_accessor/reflect.md)) Acquires reflection information of a contained type |
60+
61+
### Non-Member Functions
62+
63+
The following are not namespace-scope functions; each is a non-member function of [`proxy`](proxy/README.md) and [`proxy_indirect_accessor`](proxy_indirect_accessor/README.md), found only via [argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl). Each is documented separately for the two classes.
64+
65+
| Name | For `proxy<F>` | For `proxy_indirect_accessor<F>` |
66+
| -------------------- | ----------------------------------------------- | ----------------------------------------------------------------- |
67+
| `invoke` | [direct](proxy/invoke.md) | [indirect](proxy_indirect_accessor/invoke.md) |
68+
| `reflect` | [direct](proxy/reflect.md) | [indirect](proxy_indirect_accessor/reflect.md) |
69+
| `reinterpret_invoke` | [direct](proxy/reinterpret_invoke.md) | [indirect](proxy_indirect_accessor/reinterpret_invoke.md) |
6070

6171
## Header `<proxy_macros.h>`
6272

docs/spec/basic_facade_builder/.pages

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
nav:
22
- basic_facade_builder: README.md
33
- add_convention<br />add_indirect_convention<br />add_direct_convention: add_convention.md
4+
- add_facade_with_substitution: add_facade_with_substitution.md
45
- add_facade: add_facade.md
56
- add_reflection<br />add_indirect_reflection<br />add_direct_reflection: add_reflection.md
67
- add_skill: add_skill.md

0 commit comments

Comments
 (0)