@@ -46,22 +46,17 @@ that the selection happens at runtime.
4646
4747## API Overview
4848
49- The library is normally used via a collection of macros, and a single template, ->virtual_ , that denotes virtual parameters.
50-
51- The library can also be used through the public API, without resorting on the
52- macros.
53-
54- The main construct are:
55-
56- * ->method, a class template that contains:
57- * a static function object [ fn] ( method.md#fn ) , to call the method
58- * nested class templates [ add_function] ( method.md#add_function ) and
59- [ add_definition] ( method.md#add_definition ) , to add definitions to a method
60- * [ next_type] ( method.md#next_type ) and [ use_next] ( method.md#use_next ) , to call
61- the next most specialised method
62- * ->use_classes, a class template, provides the class and inheritance information.
63- * ->update_methods, a function that calculates the method dispatch tables, using
64- the method, definition, and class information.
49+ The library is normally used via the _ keyword interface_ , provided by the
50+ ` <yorel/yomm2/keywords.hpp> ` header. It attempts to present open methods as a
51+ language feature. It consists of a collection of macros, which are, of course,
52+ global, but so are keywords. The ->virtual_ template, used to specify
53+ virtual parameters, is also aliases in the global namespace.
54+
55+ The library can also be used through the _ core interface_ , which is almost
56+ entirely free of macros. The primary use of this interface is to support
57+ templatized classes, methods and definitions - something that macros are
58+ incapable of. See [ the templates tutorial] ( tutorials/templates_tutorial.md ) for
59+ more details and examples.
6560
6661## Exceptions
6762
@@ -74,9 +69,10 @@ exceptions.
7469
7570### ` <yorel/yomm2/keywords.hpp> `
7671
77- Since version 1.3.0, this is the recommended main header for normal usage of the
78- library. It is used in all the examples and tutorials. The header makes it look
79- like the library's features are part of the language:
72+ This header provides the _ keyword interface_ . Since version 1.3.0, this is the
73+ recommended main header for normal usage of the library. It is used in most
74+ examples and tutorials. The header makes it look like the library's features are
75+ part of the language:
8076
8177* It includes ` <yorel/yomm2/core.hpp> ` .
8278* It includes ` <yorel/yomm2/cute.hpp> ` , thus making the lowercase macros
@@ -85,11 +81,26 @@ like the library's features are part of the language:
8581
8682### ` <yorel/yomm2/core.hpp> `
8783
88- This header defines the ` yorel::yomm2 ` namespace, which contains the ` method `
89- template, and other C++ mechanisms. Since version 1.3.0, the key mechanisms are
90- documented; thus, it possible to use the library without resorting on the
91- macros. See the [ API tutorial] ( ../tutorials/api.md ) for an introduction to the
92- main features of ` core ` .
84+ This header provides the _ core interface_ , in the ` yorel::yomm2 ` namespace.
85+ Since version 1.3.0, the key mechanisms are documented; thus, it possible to use
86+ the library without resorting on the macros. See the [ API
87+ tutorial] ( ../tutorials/api.md ) for an introduction to the main features of
88+ ` core ` .
89+
90+ The main constructs are:
91+
92+ * ->method, a class template that contains:
93+ * a static function object [ fn] ( method.md#fn ) , to call the method
94+ * nested class templates [ add_function] ( method.md#add_function ) and
95+ [ add_definition] ( method.md#add_definition ) , to add definitions to a method
96+ * [ next_type] ( method.md#next_type ) and [ use_next] ( method.md#use_next ) , to call
97+ the next most specialised method
98+ * ->use_classes, a class template, provides the class and inheritance information.
99+ * ->update_methods, a function that calculates the method dispatch tables, using
100+ the method, definition, and class information.
101+
102+ The header itself does not define any macros, except for its include guard
103+ (` YOREL_YOMM2_CORE_INCLUDED ` ).
93104
94105The header consumes two macros:
95106* ` NDEBUG ` : if defined, no checks are performed during method calls. This
@@ -104,8 +115,13 @@ The header defines the following macros:
104115
105116### ` <yorel/yomm2/symbols.hpp> `
106117
107- This header defines two macros: ` YOMM2_GENSYM ` and ` YOMM2_SYMBOL ` , which are
108- useful when using the API.
118+ This header defines two macros: ` YOMM2_GENSYM ` , which generates a new obfuscated
119+ symbol each time that is is expanded; and ` YOMM2_SYMBOL(seed) ` , which generates
120+ an obfuscated symbol (the same symbol for the same value of ` seed ` ).
121+
122+ These macros are useful when using the core interface, which requires
123+ instantiating static objects to register classes, methods, and definitions; and
124+ for defining the "key" type for the ->method template.
109125
110126### ` <yorel/yomm2/templates.hpp> `
111127
0 commit comments