Skip to content

Commit f5264d2

Browse files
committed
antora
1 parent ca897b6 commit f5264d2

14 files changed

+47
-548
lines changed

doc/modules/ROOT/nav.adoc

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,14 @@
1-
// * xref:quicklook.adoc[]
2-
// * xref:urls/index.adoc[]
3-
// ** xref:urls/parsing.adoc[]
4-
// ** xref:urls/containers.adoc[]
5-
// ** xref:urls/segments.adoc[]
6-
// ** xref:urls/params.adoc[]
7-
// ** xref:urls/normalization.adoc[]
8-
// ** xref:urls/stringtoken.adoc[]
9-
// ** xref:urls/percent-encoding.adoc[]
10-
// ** xref:urls/formatting.adoc[]
11-
// * xref:grammar/index.adoc[]
12-
// ** xref:grammar/rules.adoc[]
13-
// ** xref:grammar/charset.adoc[]
14-
// ** xref:grammar/combinators.adoc[]
15-
// ** xref:grammar/range.adoc[]
16-
// ** xref:grammar/rfc3986.adoc[]
17-
// * Examples
18-
// ** xref:examples/qrcode.adoc[]
19-
// ** xref:examples/finicky.adoc[]
20-
// ** xref:examples/mailto.adoc[]
21-
// ** xref:examples/magnet-link.adoc[]
22-
// ** xref:examples/file-router.adoc[]
23-
// ** xref:examples/router.adoc[]
24-
// ** xref:examples/sanitize.adoc[]
251
* Tutorials
262
** xref:hello_world.adoc[Hello World]
27-
// * xref:HelpCard.adoc[]
3+
** xref:multiple_dispatch.adoc[Multiple Dispatch]
4+
** xref:headers_namespaces.adoc[Namespaces and Headers]
5+
** xref:friendship.adoc[Friendship]
6+
** xref:performance.adoc[Performance]
7+
** xref:smart_pointers.adoc[Smart Pointers]
8+
** xref:virtual_ptr_alt.adoc[Virtual Pointer Alternatives]
9+
** xref:core_api.adoc[Core API]
10+
** xref:policies.adoc[Registries and Policies]
11+
** xref:error_handling.adoc[Error Handling]
12+
** xref:custom_rtti.adoc[Custom RTTI]
13+
** xref:dynamic_loading.adoc[Dynamic Loading]
2814
* xref:reference:boost/openmethod.adoc[Reference]
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ name can get tedious, so OpenMethod provides a macro for that:
2929

3030
[source,c++]
3131
----
32-
include::{exampledir}/core_api.cpp[tag=method]
32+
include::example$core_api.cpp[tag=method]
3333
----
3434

3535
NOTE: BOOST_OPENMETHOD and associated macros use `BOOST_OPENMETHOD_ID` in
@@ -48,7 +48,7 @@ Overriders are ordinary functions, added to a method using the nested template
4848

4949
[source,c++]
5050
----
51-
include::{exampledir}/core_api.cpp[tag=poke_cat]
51+
include::example$core_api.cpp[tag=poke_cat]
5252
----
5353

5454
NOTE: `override` can register multiple overriders.
@@ -58,14 +58,14 @@ identifier. In the meantime, OpenMethod provides a small convenience macro:
5858

5959
[source,c++]
6060
----
61-
include::{exampledir}/core_api.cpp[tag=poke_dog]
61+
include::example$core_api.cpp[tag=poke_dog]
6262
----
6363

6464
`next` is available from the method's nested `next` template:
6565

6666
[source,c++]
6767
----
68-
include::{exampledir}/core_api.cpp[tag=poke_bulldog]
68+
include::example$core_api.cpp[tag=poke_bulldog]
6969
----
7070

7171
NOTE: Since the function uses itself as a template argument in its body, its
@@ -81,12 +81,12 @@ We register the classes with `use_classes`:
8181

8282
[source,c++]
8383
----
84-
include::{exampledir}/core_api.cpp[tag=use_classes]
84+
include::example$core_api.cpp[tag=use_classes]
8585
----
8686

8787
Finally, we call the method via the static member of the method class `fn`:
8888

8989
[source,c++]
9090
----
91-
include::{exampledir}/core_api.cpp[tag=main]
91+
include::example$core_api.cpp[tag=main]
9292
----
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Here is the facet implementation:
101101
102102
[source,c++]
103103
----
104-
include::{exampledir}/custom_rtti.cpp[tag=facet]
104+
include::example$custom_rtti.cpp[tag=facet]
105105
----
106106
107107
This facet is quite minimal. It does not support virtual inheritance. It would
@@ -113,15 +113,15 @@ CRTP template:
113113
114114
[source,c++]
115115
----
116-
include::{exampledir}/custom_rtti.cpp[tag=policy]
116+
include::example$custom_rtti.cpp[tag=policy]
117117
----
118118
119119
Next, we include the main header. Because `BOOST_OPENMETHOD_DEFAULT_REGISTRY` is
120120
defined, its value is used for the default policy. Then comes the usual example.
121121
122122
[source,c++]
123123
----
124-
include::{exampledir}/custom_rtti.cpp[tag=example]
124+
include::example$custom_rtti.cpp[tag=example]
125125
----
126126
127127
This programs works even if standard RTTI is disabled.
@@ -141,7 +141,7 @@ This time let's support virtual inheritance as well. First the domain classes:
141141
142142
[source,c++]
143143
----
144-
include::{exampledir}/deferred_custom_rtti.cpp[tag=classes]
144+
include::example$deferred_custom_rtti.cpp[tag=classes]
145145
// ditto for Dog
146146
----
147147
@@ -152,7 +152,7 @@ The rtti facet is the same, with one more function:
152152
struct custom_rtti : bom::policies::rtti {
153153
// as before
154154
155-
include::{exampledir}/deferred_custom_rtti.cpp[tag=dynamic_cast_ref]
155+
include::example$deferred_custom_rtti.cpp[tag=dynamic_cast_ref]
156156
};
157157
----
158158

doc/dynamic_loading.adoc renamed to doc/modules/ROOT/pages/dynamic_loading.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Here is an example:
2121

2222
[source,c++]
2323
----
24-
include::{exampledir}/dl.hpp[tag=header]
24+
include::example$dl.hpp[tag=header]
2525
----
2626

2727
NOTE: The policy must be passed to the method as well as the
@@ -35,34 +35,34 @@ We can now register the classes and and provide an overrider:
3535

3636
[source,c++]
3737
----
38-
include::{exampledir}/dl_main.cpp[tag=main]
38+
include::example$dl_main.cpp[tag=main]
3939
----
4040

4141
At this point we only have one overrider. Animals of all species ignore one
4242
another:
4343

4444
[source,c++]
4545
----
46-
include::{exampledir}/dl_main.cpp[tag=before_dlopen]
46+
include::example$dl_main.cpp[tag=before_dlopen]
4747
----
4848

4949
Let's load a dynamic library containing this code:
5050

5151
[source,c++]
5252
----
53-
include::{exampledir}/dl_shared.cpp[tag=dl_shared]
53+
include::example$dl_shared.cpp[tag=dl_shared]
5454
----
5555

5656
Now back to `main`:
5757

5858
[source,c++]
5959
----
60-
include::{exampledir}/dl_main.cpp[tag=dlopen]
60+
include::example$dl_main.cpp[tag=dlopen]
6161
----
6262

6363
After unloading the library, we must call `initialize` again:
6464

6565
[source,c++]
6666
----
67-
include::{exampledir}/dl_main.cpp[tag=after_dlclose]
67+
include::example$dl_main.cpp[tag=after_dlclose]
6868
----

doc/error_handling.adoc renamed to doc/modules/ROOT/pages/error_handling.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ handler can be set with `set_error_handler`:
1212

1313
[source,c++]
1414
----
15-
include::{exampledir}/default_error_handler.cpp[tag=example]
15+
include::example$default_error_handler.cpp[tag=example]
1616
----
1717

1818
Output:
@@ -29,7 +29,7 @@ We can also replace the `error_handler` facet with our own. For example:
2929

3030
[source,c++]
3131
----
32-
include::{exampledir}/throw_error_handler.cpp[tag=example]
32+
include::example$throw_error_handler.cpp[tag=example]
3333
----
3434

3535
[source,console]
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ We can thus grant friendship to all the overriders of `poke`:
1717

1818
[source,c++]
1919
----
20-
include::{exampledir}/friendship.cpp[tag=friend_all]
20+
include::example$friendship.cpp[tag=friend_all]
2121
----
2222

2323
Be aware, though, that the overriders of _any_ method called `poke` - with any
@@ -27,5 +27,5 @@ We can also befriend individual overriders:
2727

2828
[source,c++]
2929
----
30-
include::{exampledir}/friendship.cpp[tag=friend]
30+
include::example$friendship.cpp[tag=friend]
3131
----

doc/headers_namespaces.adoc renamed to doc/modules/ROOT/pages/headers_namespaces.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Let's break the Animals example into headers and namespaces. First we put
1111

1212
[source,c++]
1313
----
14-
include::{exampledir}/headers_namespaces/animal.hpp[]
14+
include::example$headers_namespaces/animal.hpp[]
1515
----
1616

1717
`BOOST_OPENMETHOD` can be placed in a header file. It adds several constructs to
@@ -32,12 +32,12 @@ Next, let's implement the `Cat` class, and a derived class, `Cheetah`, in the
3232

3333
[source,c++]
3434
----
35-
include::{exampledir}/headers_namespaces/cat.hpp[]
35+
include::example$headers_namespaces/cat.hpp[]
3636
----
3737

3838
[source,c++]
3939
----
40-
include::{exampledir}/headers_namespaces/cat.cpp[]
40+
include::example$headers_namespaces/cat.cpp[]
4141
----
4242

4343
`BOOST_OPENMETHOD_CLASSES` should be placed in an implementation file. It can
@@ -83,7 +83,7 @@ the static function `fn` just yet.
8383

8484
[source,c++]
8585
----
86-
include::{exampledir}/headers_namespaces/dog.hpp[]
86+
include::example$headers_namespaces/dog.hpp[]
8787
----
8888

8989
Unlike function declarations, which can occur multiple times in a TU, an
@@ -101,15 +101,15 @@ Now we use `BOOST_OPENMETHOD_DEFINE_OVERRIDER` to define the overrider:
101101

102102
[source,c++]
103103
----
104-
include::{exampledir}/headers_namespaces/dog.cpp[]
104+
include::example$headers_namespaces/dog.cpp[]
105105
----
106106

107107
Let's look at the main program now. It derived `Bulldog` from `Dog` and provides
108108
an overrider for the new class:
109109

110110
[source,c++]
111111
----
112-
include::{exampledir}/headers_namespaces/main.cpp[]
112+
include::example$headers_namespaces/main.cpp[]
113113
----
114114

115115
Again ADL plays a role: it helps the overrider (and `main`) to locate the `poke`

doc/multiple_dispatch.adoc renamed to doc/modules/ROOT/pages/multiple_dispatch.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ A method can have more than one `virtual_ptr` parameter. For example:
55

66
[source,c++]
77
----
8-
include::{exampledir}/hello_world.cpp[tag=multi]
8+
include::example$hello_world.cpp[tag=multi]
99
----
1010

1111
[source,c++]
1212
----
13-
include::{exampledir}/hello_world.cpp[tag=multi_call,indent=0]
13+
include::example$hello_world.cpp[tag=multi_call,indent=0]
1414
----
1515

1616
The appropriate overrider is selected using a process similar to overload
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ clang compiles the following code:
88

99
[source,c++]
1010
----
11-
include::{exampledir}/hello_world.cpp[tag=call_poke_via_ref]
11+
include::example$hello_world.cpp[tag=call_poke_via_ref]
1212
----
1313

1414
...to this on the x64 architecture (variable names have been shortened for
@@ -48,7 +48,7 @@ Let's look at another example: an AST for an arithmetic calculator:
4848

4949
[source,c++]
5050
----
51-
include::{exampledir}/ast.cpp[tag=ast]
51+
include::example$ast.cpp[tag=ast]
5252
----
5353

5454
The `Negate` overrider compiles to:
@@ -79,7 +79,7 @@ instruction. For example:
7979

8080
[source,c++]
8181
----
82-
include::{exampledir}/ast.cpp[tag=final,indent=0]
82+
include::example$ast.cpp[tag=final,indent=0]
8383
----
8484

8585
...compiles to:
File renamed without changes.

0 commit comments

Comments
 (0)