77
88The following headers are sufficient for most basic uses of the library.
99
10- * xref:#main[` boost/openmethod.hpp`] to define open-methods and overriders using
10+ * xref:#openmethod[`< boost/openmethod.hpp> `] to define open-methods and overriders using
1111convenient macros.
1212
13- * xref:#initialize[`boost/openmethod/initialize.hpp`] to initialize the library.
13+ * xref:#initialize[`< boost/openmethod/initialize.hpp> `] to initialize the library.
1414Typically only included in the translation unit containing `main` .
1515
1616 The following headers make it possible to use standard smart pointers in virtual
1717parameters:
1818
19- * xref:#std_shared_ptr[`boost/openmethod/interop/std_shared_ptr.hpp`] to use
19+ * xref:#std_shared_ptr[`< boost/openmethod/interop/std_shared_ptr.hpp> `] to use
2020`std::shared_ptr` in virtual parameters.
2121
22- * xref:#std_unique_ptr[`boost/openmethod/interop/std_unique_ptr.hpp`] to use
22+ * xref:#std_unique_ptr[`< boost/openmethod/interop/std_unique_ptr.hpp> `] to use
2323`std::unique_ptr` in virtual parameters.
2424
25+ ## High-level Headers
26+
27+ [#core]
28+ ### link:{{BASE_URL}}/include/boost/openmethod/core.hpp[<boost/openmethod/core.hpp>]
29+
30+ Defines the main constructs of the library: methods, overriders and virtual
31+ pointers, and mechanisms to implement them. Does not define any public macros
32+ apart from `BOOST_OPENMETHOD_DEFAULT_REGISTRY` , if it is not defined already.
33+
34+ [#macros]
35+ ### link:{{BASE_URL}}/include/boost/openmethod/macros.hpp[<boost/openmethod/macros.hpp>]
36+
37+ Defines the public macros of the library, such as `BOOST_OPENMETHOD` ,
38+ `BOOST_OPENMETHOD_CLASSES` , etc.
39+
40+ There is little point in including this header directly, as this has the same
41+ effect as including `boost/openmethod.hpp` , which is shorter.
42+
43+ [#openmethod]
44+ ### link:{{BASE_URL}}/include/boost/openmethod.hpp[<boost/openmethod.hpp>]
45+
46+ Includes `core.hpp` and `macros.hpp` .
47+
48+ [#initialize]
49+ ### link:{{BASE_URL}}/include/boost/initialize.hpp[<boost/initialize.hpp>]
50+
51+ Provides the cpp:initialize[] and cpp:finalize[] functions. This header is
52+ typically included in the translation unit containing `main` . Translation units
53+ that dynamically load or unload shared libraries may also need to call those
54+ functions.
55+
56+ [#std_shared_ptr]
57+ ### link:{{BASE_URL}}/include/boost/openmethod/interop/std_shared_ptr.hpp[<boost/openmethod/interop/std_shared_ptr.hpp>]
58+
59+ Provides a `virtual_traits` specialization that make it possible to use a
60+ `std::shared_ptr` in place of a raw pointer or reference in virtual parameters.
61+
62+ [#std_unique_ptr]
63+ ### link:{{BASE_URL}}/include/boost/openmethod/interop/std_unique_ptr.hpp[<boost/openmethod/interop/std_unique_ptr.hpp>]
64+
65+ Provides a `virtual_traits` specialization that make it possible to use a
66+ `std::unique_ptr` in place of a raw pointer or reference in virtual parameters.
67+
2568*The headers below are for advanced use* .
2669
2770## Pre-Core Headers
@@ -30,82 +73,52 @@ The following headers can be included before `core.hpp` to define custom
3073registries and policies, and override the default registry by defining
3174xref:BOOST_OPENMETHOD_DEFAULT_REGISTRY.adoc[`BOOST_OPENMETHOD_DEFAULT_REGISTRY`].
3275
33- ### boost/openmethod/preamble.hpp
76+ ### link:{{BASE_URL}}/include/ boost/openmethod/preamble.hpp[<boost/openmethod/preamble.hpp>]
3477
3578Defines `registry` and stock policy categories. Also defines all types and
3679functions necessary for the definition of `registry` .
3780
38- ### boost/openmethod/policies/std_rtti.hpp
81+ ### link:{{BASE_URL}}/include/ boost/openmethod/policies/std_rtti.hpp[<boost/openmethod/policies/std_rtti.hpp>]
3982
4083Provides an implementation of the `rtti` policy using standard RTTI.
4184
42- ### boost/openmethod/policies/fast_perfect_hash.hpp
85+ ### link:{{BASE_URL}}/include/ boost/openmethod/policies/fast_perfect_hash.hpp[<boost/openmethod/policies/fast_perfect_hash.hpp>]
4386
4487Provides an implementation of the `hash` policy using a fast perfect hash
4588function.
4689
47- ### boost/openmethod/policies/vptr_vector.hpp
90+ ### link:{{BASE_URL}}/include/ boost/openmethod/policies/vptr_vector.hpp[<boost/openmethod/policies/vptr_vector.hpp>]
4891
4992Provides an implementation of the `vptr` policy that stores the v-table pointers
5093in a `std::vector` indexed by type ids, possibly hashed.
5194
52- ### boost/openmethod/policies/default_error_handler.hpp
95+ ### link:{{BASE_URL}}/include/ boost/openmethod/policies/default_error_handler.hpp[<boost/openmethod/policies/default_error_handler.hpp>]
5396
5497Provides an implementation of the `error_handler` policy that calls a
5598`std::function<void(openmethod_error)>` when an error is encountered, and before
5699the library aborts the program.
57100
58- ### boost/openmethod/policies/stderr_output.hpp
101+ ### link:{{BASE_URL}}/include/ boost/openmethod/policies/stderr_output.hpp[<boost/openmethod/policies/stderr_output.hpp>]
59102
60103Provides an implementation of the `output` policy that writes diagnostics to
61104the C standard error stream (not using iostreams).
62105
63- ### boost/openmethod/default_registry.hpp
106+ ### link:{{BASE_URL}}/include/ boost/openmethod/default_registry.hpp[<boost/openmethod/default_registry.hpp>]
64107
65108Defines the default registry, which contains all the stock policies listed
66- above. Includes all the headers listed in the preamble section so far.
109+ above. Includes all the headers listed in this section so far.
67110
68- ### boost/openmethod/policies/static_rtti.hpp
111+ ### link:{{BASE_URL}}/include/ boost/openmethod/policies/static_rtti.hpp[<boost/openmethod/policies/static_rtti.hpp>]
69112
70113Provides a minimal implementation of the `rtti` policy that does not depend on
71114standard RTTI.
72115
73- ### boost/openmethod/policies/throw_error_handler.hpp
116+ ### link:{{BASE_URL}}/include/ boost/openmethod/policies/throw_error_handler.hpp[<boost/openmethod/policies/throw_error_handler.hpp>]
74117
75118Provides an implementation of the `error_handler` policy that throws errors as
76119exceptions.
77120
78- ### boost/openmethod/policies/vptr_map.hpp
121+ ### link:{{BASE_URL}}/include/ boost/openmethod/policies/vptr_map.hpp[<boost/openmethod/policies/vptr_map.hpp>]
79122
80123Provides an implementation of the `vptr` policy that stores the v-table pointers
81124in a map (by default a `std::map` ) indexed by type ids.
82-
83- ## High-level Headers
84-
85- ### boost/openmethod/core.hpp
86-
87- Defines the main constructs of the library: methods, overriders and virtual
88- pointers, and mechanisms to implement them. Does not define any public macros
89- apart from `BOOST_OPENMETHOD_DEFAULT_REGISTRY` , if it is not defined already.
90-
91- ### boost/openmethod/macros.hpp
92-
93- Defines the public macros of the library, such as `BOOST_OPENMETHOD` ,
94- `BOOST_OPENMETHOD_CLASSES` , etc.
95-
96- There is little point in including this header directly, as this has the same
97- effect as including `boost/openmethod.hpp` , which is shorter.
98-
99- ### boost/openmethod.hpp
100-
101- Includes `core.hpp` and `macros.hpp` .
102-
103- ### boost/openmethod/interop/std_shared_ptr.hpp
104-
105- Provides a `virtual_traits` specialization that make it possible to use a
106- `std::shared_ptr` in place of a raw pointer or reference in virtual parameters.
107-
108- ### boost/openmethod/interop/std_unique_ptr.hpp
109-
110- Provides a `virtual_traits` specialization that make it possible to use a
111- `std::unique_ptr` in place of a raw pointer or reference in virtual parameters.
0 commit comments