Skip to content

Commit 571afc1

Browse files
authored
Update virtual table policy diagram.md
1 parent 7b1556f commit 571afc1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

design/virtual table policy diagram.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ The most important feature of this flavor of the framework is to use virtual tab
1414
2. The type of the virtual table is the aggregation of the `VTableEntry` types of each affordance: [`struct VTable: AffordanceSpecifications::VTableEntry... {`](https://github.com/thecppzoo/zoo/blob/d6435fc984ee0bde31979f7908a73473f61ac4bd/inc/zoo/Any/VTablePolicy.h#L247C5-L247C60)
1515
3. The `VTHolder` allows every affordance to access its part of the virtual table via the template member `vTable`, if `Affordance` is the type representing an affordance, `baseManager->template vTable<Affordance>()` returns that section of the virtual table.
1616
4. The base value manager is the provider of the implementations for the default constructed `AnyContainer`.
17-
1. Implementations are either `constexpr` data, or more typically, the pointers to the functions that implement the behaviors. The base manager must defer to the affordances for these values, in particular to the `Default` class-members of the affordances, which are assumed to be of their `VTableEntry` type [^DefaultImplementations]
18-
6. The so-called "concrete value managers" provide the implementations for the value they manage.
17+
1. Implementations are either `constexpr` data, or more typically, the pointers to the functions that implement the behaviors. The base manager must defer to the affordances for these values, in particular to the `Default` class-members of the affordances, which are assumed to be of their `VTableEntry` type. The `Default`s of the affordances are templates that expect to receive the type of base manager. [^DefaultImplementations]. Furthermore, the convention is that the functions in the virtual table entries of the affordances will receive a pointer to the base value manager, as a `void *`, but this is an affordance-maker decision.
18+
6. The so-called "concrete value managers" provide the implementations for the value they manage: `constexpr static inline VTable Operations = { AffordanceSpecifications::template Operation<ConcreteValueManager>... };`, they refer to the `Operations` member of the affordances, and indicate
1919

2020
[^DefaultImplementations]: Code for assembling the default-constructed behaviors:
2121
The virtual table of default-constructed `AnyContainer`:

0 commit comments

Comments
 (0)