Skip to content

Commit 154f13e

Browse files
committed
wip
1 parent 1b35790 commit 154f13e

28 files changed

+273
-305
lines changed

doc/basic_policy.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Defined in <boost/openmethod/policies/basic_policy.hpp>. Also available via
4646
### Description
4747

4848
`basic_policy` implements a policy, which consists of a a collection of methods,
49-
classes, dispatch data, and facets, which specify how to obtain a pointer to a
49+
classes, dispatch data, and policys, which specify how to obtain a pointer to a
5050
v-table from an object, how to report errors, whether to perform runtime sanity
5151
checks, etc.
5252

@@ -75,7 +75,7 @@ Creates a new policy from an existing one. _NewPolicy_ does not share static
7575
variables with the original _Policy_. The new policy does not retain any
7676
knowledge of the classes and methods registered in the original.
7777

78-
`fork` forks the facets in the policy as well: any facet instantiated from a
78+
`fork` forks the policys in the policy as well: any policy instantiated from a
7979
class template is assumed to take a policy as its first template argument. The
8080
template is re-instantiated with the new policy as the first arguments, while
8181
the other arguments remain the same.
@@ -87,9 +87,9 @@ template<class... Facets>
8787
using with;
8888
```
8989

90-
Requires:: _Facets_ is a list of classes that derive from `facet`.
90+
Requires:: _Facets_ is a list of classes that derive from `policy`.
9191

92-
Returns:: A new policy containing _Facets_, and the facets from the original
92+
Returns:: A new policy containing _Facets_, and the policys from the original
9393
that do not have the same category as _Facets_.
9494

9595
Examples::
@@ -111,9 +111,9 @@ template<class... Facets>
111111
using without;
112112
```
113113

114-
Requires:: _Facets_ is a list of facet categories.
114+
Requires:: _Facets_ is a list of policy categories.
115115

116-
Returns:: A new policy containing the facets from the original that do not have
116+
Returns:: A new policy containing the policys from the original that do not have
117117
the same category as _Facets_.
118118

119119
Examples::
@@ -130,7 +130,7 @@ Examples::
130130
struct release;
131131
```
132132

133-
A policy that contains facets `std_rtti`, `fast_perfect_hash`, `vptr_vector` and
133+
A policy that contains policys `std_rtti`, `fast_perfect_hash`, `vptr_vector` and
134134
`default_error_handler`.
135135

136136
#### debug
@@ -139,7 +139,7 @@ A policy that contains facets `std_rtti`, `fast_perfect_hash`, `vptr_vector` and
139139
struct debug;
140140
```
141141

142-
The `release` policy with additional facet implementations `runtime_checks`,
142+
The `release` policy with additional policy implementations `runtime_checks`,
143143
`basic_error_output` and basic_trace_output.
144144

145145
NOTE: `debug` extends `release` but it does not a fork it. Both policies use the

doc/default_error_handler.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ static auto error(const Error& error) -> void;
4040
```
4141

4242
Calls the function last set via `set_error_handler` or, if it was never called,
43-
and if _Policy_ contains an `output` facet, use it to print a description
43+
and if _Policy_ contains an `output` policy, use it to print a description
4444
of `error`.
4545

4646
#### error

doc/deferred_static_rtti.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ struct deferred_static_rtti : rtti {};
1515

1616
### Description
1717

18-
`deferred_static_rtti` is a facet that defers collection of static type ids.
18+
`deferred_static_rtti` is a policy that defers collection of static type ids.
1919

2020
Some custom RTTI systems rely on static constructors to assign type ids.
2121
OpenMethod itself relies on static constructors to register classes, methods and
22-
overriders, calling the `static_type` function from the `rtti` facet in the
22+
overriders, calling the `static_type` function from the `rtti` policy in the
2323
process. This can result in collecting the type ids _before_ they have been
24-
initialized. Adding this facet to a policy moves the collection of type ids to
24+
initialized. Adding this policy to a policy moves the collection of type ids to
2525
`initialize`.

doc/error_handler.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ struct type_mismatch_error : openmethod_error {
4242

4343
### Description
4444

45-
`error_handler` is a facet that handles errors.
45+
`error_handler` is a policy that handles errors.
4646

4747
When an error is encountered, either during `initialize` or method dispatch, the
48-
program is terminated via a call to `abort`. If this facet is present in the
48+
program is terminated via a call to `abort`. If this policy is present in the
4949
policy, its `error` function is called with an error object. It can prevent
5050
termination by throwing an exception.
5151

doc/error_output.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ Defined in <boost/openmethod/policies/basic_policy.hpp>.
88
```c++
99
namespace boost::openmethod::policies {
1010

11-
struct output : facet {};
11+
struct output : policy {};
1212

1313
} // boost::openmethod::policies
1414
```
1515

1616
### Description
1717

18-
`output` is a facet that provides a stream for writing error messages.
18+
`output` is a policy that provides a stream for writing error messages.
1919

2020
### Requirements
2121

doc/facet.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
## facet
2+
## policy
33

44
### Synopsis
55

@@ -8,7 +8,7 @@ Defined in <boost/openmethod/policies/basic_policy.hpp>.
88
```c++
99
namespace boost::openmethod::policies {
1010

11-
struct facet {
11+
struct policy {
1212
static auto finalize() -> void;
1313
};
1414

@@ -17,7 +17,7 @@ struct facet {
1717

1818
### Description
1919

20-
`facet` is the base class of all facets. It provides an empty `finalize` static
20+
`policy` is the base class of all policys. It provides an empty `finalize` static
2121
function which can be overriden (via shadowing) by derived classes.
2222

2323
### Members

0 commit comments

Comments
 (0)